From 6cd62e795e3716aa0cbd2d1ff8c1b3a345803563 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 14 Feb 2024 16:58:56 +0100 Subject: Use modules, use XDG dirs --- README.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a598cb0..2765c97 100644 --- a/README.md +++ b/README.md @@ -75,10 +75,15 @@ blog --sync-down Updating the `BLOG_MAX_POSTS` environment variable sets the number of posts that will be kept. -### Overriding Templates +### Overriding Configuration Directory -You can set the `BLOG_TEMPLATES_DIRECTORY` to any directory you want. -The tool will expect a `feed.xml`, `index.html`, and `index.txt` files. +You can set the `BLOG_CONFIG_DIRECTORY` to any directory you want. This +defaults to `$XDG_CONFIG_HOME/blog/` and is used to store the blog remote +config, static files, and template + +The tool will expect a `feed.xml`, `index.html`, and `index.txt` files in the +`templates` directory inside the config directory. If they're not found it will +default to the included tepmlates. These templates are then parsed with [dot][dot] and exposes the following variables: @@ -94,22 +99,16 @@ Post +html: String // The parsed html generated from the gemini. ``` -The default is the `templates` directory inside the root of the `blog` -module directory. - ### Overriding the location of posts. -Setting `BLOG_POSTS_DIRECTORY` will update where the posts are saved when -added. The default is the `.posts` directory inside the root of the -`blog` module directory. +Setting `BLOG_DATA_DIRECTORY` will update where the posts and archive are saved +when added. The default is the `$XDG_DATA_HOME/blog`. -### Overriding the location of static files. +### Overriding the location of generated files. -Setting `BLOG_STATIC_DIRECTORY` will update where static files are read -from. This is also where the generated blog will be placed. +Setting `BLOG_OUTPUT_DIRECTORY` will update where generated files are placed. -The default is the `static` directory inside the root of the `blog` module -directory. +The default is `$XDG_CACHE_HOME/blog`. This directory should also contain files referenced in the templates, like `css`, `js` or `images`. -- cgit