added readme.md

This commit is contained in:
RaphyJake 2021-12-01 13:33:11 +01:00
parent 581ecd6eb8
commit 423ce48e80
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,49 @@
## Rugem, a barely working gemini site generator written in Rust.
Rugem assumes your have this directory structure:
```
root
|
|-index.gmi
|
|-some_file.mp4
|-some_gmi_file.gmi
|
|-entry-11-10-2021.gmi
|-second_entry-10-7-2020.gmi
|
|-subfolder
| |
| |-index.gmi
| |-music-12-2-2021.gmi
| .
|
|-subfolder2
| |
| |-something-4-7-2014.gmi
. .
```
A single directory, let's call it Gemdir, can contain:
- an index.gmi file
- some entries with dates, with format `title-dd-mm-yyyy.gmi`. Underscores in title will be substituted with spaces, more on this later.
- any kind other of file, be a .gmi file without a date in its name or not.
- subfolders, which are treated as Gemdirs themselves.
The idea is to have a recursive structure. Every subfolder can contain anything listed above. During blog generation, a folder will be created, and every file will be copied over unchanged, except every index.gmi file:
- `{{ full-list }}` will be substituted with a list of EVERY single dated post in the current directory and in every subdirectory. Use this if you want to generate a list of every single post sorted in order.
- `{{ folders }}` will print, for each subfolder, the title of the subfolder and then a list of posts with date. If the subfolder contains and index.gmi file, a link will be created below the name of the subfolder.
More examples can be found in the examples folder. More features (namely, only printing a handful of files and expanding macros in other .gmi files) will be added later.
## Usage
`rugem origin/ target/ "Feed Title" "gemini://www.baseurl.com" "Author Name"`
The last three arguments are needed to generate the atom feed.

2
todo
View File

@ -1,3 +1,3 @@
- Fix relative / absolute urls
- Proper module segmentation
- Output to HTML...
- More macro features (only write n posts, expand macros in other files besides index.gmi)