Improvements

This commit is contained in:
2021-06-29 12:55:08 +01:00
parent 4ddca735a9
commit a13cbbe5d7
12 changed files with 81 additions and 15 deletions

View File

@@ -2,4 +2,3 @@
title: nikdoof's capsule
---
=> /~nikdoof/logs/ Logs

View File

@@ -1,5 +1,3 @@
---
title: logs
title: Logs
---
The inane ramblings of nikdoof, sysop of dimension.sh.

View File

@@ -1,8 +0,0 @@
---
title: First Post
date: 2021-06-29
---
I've been meaning for a while to create a gemblog, or capsule, however you want to call it. I got tied up with process and spent far too much time trying to convert my existing Hugo website (nikdoof.com) to a Gemini site, as it turns out its a extremely difficult problem to solve and not one that can be done in a quick weekend. So with that I decided to just create a small, rambling log here, different from my main site's content.
=> https://nikdoof.com nikdoof.com

View File

@@ -0,0 +1,6 @@
---
title: First Post
date: 2021-06-29
---
I've been meaning for a while to create a gemblog, or capsule, however you want to call it. I got tied up with process and spent far too much time trying to convert my existing Hugo website ([nikdoof.com](https://nikdoof.com)) to a Gemini site, as it turns out its a extremely difficult problem to solve and not one that can be done in a quick weekend. So with that I decided to just create a small, rambling log here, different from my main site's content.

5
content/notes/_index.gmi Normal file
View File

@@ -0,0 +1,5 @@
---
title: Notes
---
A collection of notes made about various, Gemini-related, tasks and applications.

47
content/notes/kiln.md Normal file
View File

@@ -0,0 +1,47 @@
---
title: Kiln
---
[Kiln](https://git.sr.ht/~adnano/kiln) is a simple static site generator aimed at Gemini use foremost, but it can be configured to support HTML and potentially Gopher. It supports using external tools as pre/post processors, allowing you to manipulate any file format int something it can use.
## Documentation
[https://git.sr.ht/~adnano/kiln/tree/master/item/docs/kiln.1.scd](Kiln Man Page)
[Introduction](https://kiln.adnano.co)
[kiln-discuss mailing list](https://lists.sr.ht/~adnano/kiln-discuss)
## Iterating Subfolders on Templates
Not described too much in the documentation, but you can use the `.Dirs` value passed to index templates to iterate down into the folders and list pages within the folders.
```
{{ range .Dirs }}## {{.Title }}
{{ range .Pages }}=> {{ .Permalink }} {{ if not .Date.IsZero -}}
{{.Date.Format "2006-01-02"}} {{end}}{{.Title}}
{{ end }}
{{ end -}}
```
Produces
```
## Logs
=> /~nikdoof/logs/2021/06/29/first-post/ 2021-06-29 First Post
## Notes
=> /~nikdoof/notes/kiln/ Kiln
```
## Handling Markdown
Adding `preprocess.md` value to your tasks and adding `.md` to the input formats allows you to use Markdown files for generating out Gemini.
```
[[tasks]]
input = [".gmi", ".md"]
output = ".gmi"
template = ".gmi"
static_dir = "static"
output_dir = "public"
preprocess.md = "md2gmn"
```