1
0

design.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. single file json db -> using tinydb
  2. the following collections exists
  3. [ posts ]
  4. [ pages ]
  5. [ templates ]
  6. [ tags / categories ]
  7. - when adding a post only that page and the main page are compiled
  8. - when adding a post tags are extracted from it, and only these tags atom feeds
  9. are compiled
  10. # example post record, and page records
  11. [ {_id:1, title: "this is a post title", "published": [true, false], tags: ["foo,
  12. bar"], author: "mr. blogger", date: 2014-01-11, source: "path/to/file.md",
  13. output: "path/to/file.html", template:"template_name"}]
  14. # example template record
  15. [ {"template_name": "basic.html", path: "/path/to/template.html" } ]
  16. tag :
  17. # { tag_name : "foo", posts_id: [ 1, 2, 3, 4, 5 ] }
  18. ----
  19. rendering should be done with a call to a rendering function, e.g jinja2
  20. or any other string manipulation function. This will make testing is easier!
  21. tinydb, does not have a unique id... when creating a new tag, first check
  22. it does not already exist.
  23. # Todo:
  24. # https://pypi.python.org/pypi/watchdog/0.8.3
  25. # port some jekyll themes
  26. done: ~~replace metadata format with with metadata block, drop YAML dependency~~
  27. see https://github.com/trentm/python-markdown2/wiki/metadata