diff options
author | Nicholas Johnson <nick@nicksphere.ch> | 2022-09-03 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicksphere.ch> | 2022-09-03 00:00:00 +0000 |
commit | df0539b9c09c676df6da49b446debec9683b9ca234998ae0da467bc57682b971 (patch) | |
tree | 3caca04cf15e235ff55dfd9e054a7a70c632d028b78a21af2e53b1ee53241e0e /layouts/_default/single.gmi | |
parent | f1da7e8259f39530a7f8e8f9884d0c9d42ef8cb4113a6b38a41e0e3b4a972a54 (diff) | |
download | hugo-theme-journal-df0539b9c09c676df6da49b446debec9683b9ca234998ae0da467bc57682b971.tar.gz hugo-theme-journal-df0539b9c09c676df6da49b446debec9683b9ca234998ae0da467bc57682b971.zip |
Flatten headings 4 through 6 for Gemini
The CSS styling reflects that the headings are flattened as well.
Diffstat (limited to 'layouts/_default/single.gmi')
-rw-r--r-- | layouts/_default/single.gmi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index ae4fc3c..39a6cb5 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -3,6 +3,7 @@ {{ $content := .RawContent }} +{{- $content = $content | replaceRE `\n####{0,3}` "\n###" }} {{- $content = $content | replaceRE `\n\[(.+?)\]\((.+?)\)` "\n=> $2 $1" }} {{- $content = $content | replaceRE `\*{3}(.+?)\*{3}|\*{2}(.+?)\*{2}|\*{1}(.+?)\*{1}` "$1$2$3$4$5$6" }} {{- $content = $content | replaceRE `\n- (.+?)` "\n* $1" }} |