3 Blog at unlimited.pizza -> Only 3 at a time.*
5 The blog is no longer 100% ephemeral. Instead it now keeps an archive
6 in a separate folder. The archive is intended to be used as a gemlog.
10 `npm install -g .` will expose the `blog` binary to your CLI.
12 ## How to add a new entry
14 Create a directory with a `.gmi` gemini file, and an `/assets`
15 directory with anything you want in there. This can be in any directory.
19 └── this-is-an-example-post
22 └── this-is-an-example-post.md
25 You can add this to the blog using the following command, it will shift
26 all entries and remove the oldest one if limit of posts is reached
29 `blog --add path/to/blog_post`
31 These commands will regenerate the static files. At that point you can
32 preview your blog by serving the files on the `static` directory.
34 If you need to make corrections use:
36 `blog --update path/to/blog_post`
38 This will replace the latest with the contents of the `path` without
39 shifting the existing entries.
41 `blog --publish <bucket>`
43 Will publish the blog to the mentioned s3 bucket.
47 ### Overriding Number of Posts
49 Updating the `BLOG_MAX_POSTS` environment variable sets the number of posts
52 ### Overriding Templates
54 You can set the `BLOG_TEMPLATES_DIRECTORY` to any directory you want.
55 The tool will expect a `feed.xml`, `index.html`, and `index.txt` files.
57 These templates are then parsed with [dot][dot] and exposes the following
61 it.posts: <Array[Post]>
64 +id: String // The numerical timestamp when the blog post was added.
65 +createdOn: String // The UTC String of post creation date. (only feed.xml)
66 +title: String // The title of the post. (only feed.xml)
67 +raw: String // The raw gemini text of the template.
68 +html: String // The parsed html generated from the gemini.
71 The default is the `templates` directory inside the root of the `blog`
74 ### Overriding the location of posts.
76 Setting `BLOG_POSTS_DIRECTORY` will update where the posts are saved when
77 added. The default is the `.posts` directory inside the root of the
78 `blog` module directory.
80 ### Overriding the location of static files.
82 Setting `BLOG_STATIC_DIRECTORY` will update where static files are read
83 from. This is also where the generated blog will be placed.
85 The default is the `static` directory inside the root of the `blog` module
88 This directory should also contain files referenced in the templates, like
89 `css`, `js` or `images`.
93 The publishing method is extremely naive. It assumes you have the
94 AWS CLI installed and configured. It will attempt to sync the static
95 directory to the bucket.
99 The archive directory will have a full archive of the posts (currently
102 This gets updated every time you add or update a post.
104 The publishing will not publish the archive. This is up to you to control.
108 If you want to know more about what's going on when blog generates
109 data, set the environment variable `NODE_DEBUG=blog`. This will
110 enable the debug messages
112 [dot]: https://olado.github.io/doT/