diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-02-14 16:58:56 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-02-14 16:58:56 +0100 |
| commit | 6cd62e795e3716aa0cbd2d1ff8c1b3a345803563 (patch) | |
| tree | f35cfd157529d890d8d5e8e4280c9d44d77a5e01 /README.md | |
| parent | 02f408c24d82d1fac4e55c146c4fa57cbdcdeca4 (diff) | |
Use modules, use XDG dirs
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -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`. |