update documentation to include new header.gmi

This commit is contained in:
nytpu
2021-03-22 08:29:05 -06:00
parent d3d181e8fa
commit 76a10a7b99
3 changed files with 40 additions and 5 deletions
+5
View File
@@ -112,6 +112,11 @@ Within the data directory, the following files are used:
subscription (change its title, update a link, etc) it should be trivial to
manually edit.
*header.gmi*
This file is neither created nor modified by comitium. If it exists and is
nonempty, then it is read and used as custom header for *feed.gmi*. If it
doesn't exist or is empty, then a default header is used.
*feed.gmi*
The outputted text/gemini file containing the subscription items. Is what
should be linked or copied to your server directory to publish it.
+33 -4
View File
@@ -14,6 +14,10 @@ home directory, you can instead find the binary and man page in `build/` after
running `make`. You can then copy or symlink `comitium` to your preferred bin
directory and you can access the man page with `man -l build/comitium.1`.
Prebuilt binraies are also available, but they are x86-64 only and for a limited
number of operating systems, so it is preferable for you to build it yourself,
if possible.
[README]: README.md
@@ -23,7 +27,7 @@ directory and you can access the man page with `man -l build/comitium.1`.
Once you have the binary all set up, you need figure out where you want your
data directory to be. If you're serving from `~/public_gemini` or something like
that, then just put `export $COMITIUM_DATA="~/public_gemini"` in your shell's rc
that, then just put `export COMITIUM_DATA="~/public_gemini"` in your shell's rc
file and the files will all be set up there.
If you're serving from `/var/gemini` or something similar where the directory is
@@ -51,6 +55,31 @@ currently in and run `comitium add` for each of them.
[man]: comitium.1.scd
### customizing header
You can customize the header of your feed.gmi. Simply create a file called
`header.gmi` in your data directory (where your `comitium.json`, `feed.gmi`, and
`subscriptions.gmi` are) and put whatever you want in it. The line linking to
`subscriptions.gmi` and listing the number of subscriptions will be placed after
the contents of `header.gmi`, separated by one newline.
For example, if `header.gmi` contains:
```
# my aggregator
```
then the final `feed.gmi` will contain:
```
# my aggregator
=> subscriptions.gmi Currently aggregating X capsules, gopherholes, and websites.
Generated on ...
```
### refreshing regularly
I just put it in my crontab to refresh on a six hour interval:
@@ -62,9 +91,9 @@ If you set the data directory with an environment variable like mentioned
earlier, make sure to do something like this, because the environment variable
isn't passed to cron:
```
0 */6 * * * /usr/local/bin/comitium refresh -d /home/somebody/public_gemini
0 */6 * * * /home/somebody/bin/comitium refresh -d /home/somebody/public_gemini
```
And there you go! You're all set up, now just browse to `feeds.gmi` and get to
browsin'!
And there you go! You're all set up, now just open up your favorite Gemini
browser, navigate to `feeds.gmi`, and get to surfin'!