Skip to content

Instantly share code, notes, and snippets.

@eyeseast
Created July 7, 2020 14:17
Show Gist options
  • Save eyeseast/67e11cdbe029f87577dc023b12e60980 to your computer and use it in GitHub Desktop.
Save eyeseast/67e11cdbe029f87577dc023b12e60980 to your computer and use it in GitHub Desktop.
# https://github.com/eyeseast/python-frontmatter/issues/68
import frontmatter
post = frontmatter.Post('Content')
data = {'type': 'bookmark', 'url': 'http://uzpg.me', 'desc': '', 'title': 'Home | UZPG', 'date': '07-07-20', 'tags': [], 'id': 1}
for k, v in data.items():
post[k] = v
print(frontmatter.dumps(post))
---
date: 07-07-20
desc: ''
id: 1
tags: []
title: Home | UZPG
type: bookmark
url: http://uzpg.me
---
Content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment