diff --git a/.gitignore b/.gitignore index b2a5535..6824ce8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ index.html posts/*.html index.xml +__pycache__/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..51dfea4 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# cfebs.srht.site + +A blog generator. + +## Usage + +Put posts in `./posts` as `.md` files. + +Add metadata to the head of each post file. + +Example: + +``` +Title: My post +Date: 2024-06-17T22:51:28-04:00 +--- +Now I'll start my _amazing_ markdown post +``` + +Run `python3 ./main.py` to regenerate the site. + +## Templates + +Also required are two template files: `index.html.tmpl`, `index.xml.tmpl` + +`index.html.tmpl` used for index and each post + +* Must contain a `${content}` variable where list of posts and post content will be replaced. + +`index.xml.tmpl` used for RSS + +* Can be used verbatim + +## TODO + +* Do not hard-code domain or posts location +* Make templates examples that user has to move to locations diff --git a/posts/build_a_blog.md b/posts/build_a_blog.md index aaf5097..a987331 100644 --- a/posts/build_a_blog.md +++ b/posts/build_a_blog.md @@ -629,7 +629,7 @@ Reached the end of the afternoon, so this is where I'll leave it. It's not great software. * No tests, no docs -* No input validation +* No validation of input or function arguments * Hard coding values like the domain * Using adhoc dicts for generic structures * Relies on system python version and packages. @@ -655,4 +655,3 @@ Or the full repo tree: [4]: https://python-markdown.github.io/ [5]: https://archlinux.org/packages/extra/any/python-markdown/ [hugo]: https://gohugo.io/ -[jekyll]: https://gohugo.io/