1 .TH BLOG 1 "2024-03-12" "7.0.0" "Blog Manual"
3 blog \- ephemeral blog authoring tool with gemini and gopher archive.
6 \ COMMAND [\fIARGUMENT\fP\]
9 blog is a tool that lets you manage an ephemeral blog via https, and keep a
10 non-ephemeral archive in gemini and gopher. By default, the blog will only
11 keep 3 posts, but you can adjust this by setting the
12 .B BLOG_OUTPUT_DIRECTORY
20 Display version information.
23 Display status of your blog.
26 Adds a new blog post at position 0
28 \fBupdate\fR \fIFILE\fR
29 Update the blog post at position 0
32 Generates the static assets for the blog and archive
34 \fBpublish\fR \fIREMOTE_HOST\fR
35 Copies the files for the ephemeral blog to REMOTE_HOST. (eg. username@host:/path/to/remote)
37 \fBpublish-archive\fR \fIREMOTE_HOST\fR
38 Copies the files for the permanent archive to REMOTE_HOST. (eg. username@host:/path/to/remote)
40 \fBadd-remote\fR \fIGIT_URL\fR
41 Adds or updates a git remote to sync the blog contents
44 Removes the git remote associated with the blog
47 Pushes to the git remote. This will force a push.
50 Gets the files from the blog. This will erase any local changes.
51 .SH ENVIRONMENT VARIABLES
52 You can configure some aspects of the blog using environment variables
55 Sets the maximum number of posts. Defaults to 3.
57 .B BLOG_CONFIG_DIRECTORY
58 Sets the location for configuration. Defaults to \fI$XDG_CONFIG_HOME/blog\fR.
60 .B BLOG_DATA_DIRECTORY
61 Sets the location for the main blog data: posts, archive, templates, and static
62 files. Defaults to \fI$XDG_DATA_HOME/blog\fR.
64 .B BLOG_OUTPUT_DIRECTORY
65 Sets the location for the generated static files ready to be published.
66 Defaults to \fI$XDG_CACHE_HOME/blog\fR.
68 You can override the default templates by creating a \fItemplates\fR directory
69 inside your blog data root (\fBXDG_DATA_HOME/blog\fR).
71 For the ephemeral blog you can create \fIfeed.xml\fR, \fIindex.html\fR, and
72 \fIindex.txt\fR inside of \fItemplates\fR. These files are then parsed with
80 Whether the posts array has any posts or not (boolean)
83 The number of posts in the posts array
86 Each post in the posts collection has the following fields.
93 The numerical timestamp when the blog post was added
96 The RFC-2822 String of post creation date
102 The raw gemini text of the template
105 The parsed html generated from the gemini
108 Same as html, but escaped for inclusion in XML
111 To customize your gemini and gopher archives you can provide an \fIindex.gmi\fR
112 and \fIindex.gph\fR files that will be used as templates for the archive.
113 However the data structure is different.
117 A collection of archive posts
120 The number of archive posts in the posts array
123 Each post in the archive has the following fields
130 The slug of the post (used to generate URLs)
133 The title of the post
135 The template is a subset of DoT. You can print values, iterate over collections,
136 or check conditionals. The template does not allow expressions. You can only
137 reference keys in the structure above.
145 You can iterate over collections. With the format COLLECTION: MEMBER, where
146 MEMBER will become part of the template below, and the template will be
147 repeated for each member of COLLECTION.
155 Finally, you can do conditionals. To negate a conditional you can prepend !.
159 <p> There are no posts </p>
164 Any files inside the \fIstatic\fR directory of your blog data root
165 (\fBXDG_DATA_HOME/blog\fR) will be copied as is. This is useful for any images,
166 javascript files or stylesheets that you use in your posts or templates.
170 .I https://r.bdr.sh/blog.html
172 \ Rubén Beltrán del Río <\fIblog@r.bdr.sh\fP>