From ef736304163e0952735a8620a48564c288864a94 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sun, 22 Dec 2024 02:13:20 +0300 Subject: Auto-commit 2024-12-22 --- layouts/_default/_markup/render-header.html | 0 layouts/_default/list.gmi | 7 +------ layouts/_default/list.html | 2 +- layouts/_default/list.txt | 8 +++++++- layouts/_default/single.html | 31 +++++++++++++++++++++++------ 5 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 layouts/_default/_markup/render-header.html (limited to 'layouts/_default') diff --git a/layouts/_default/_markup/render-header.html b/layouts/_default/_markup/render-header.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/list.gmi b/layouts/_default/list.gmi index 8560760..cbdba50 100644 --- a/layouts/_default/list.gmi +++ b/layouts/_default/list.gmi @@ -1,12 +1,7 @@ # {{ .Title }} -{{ $content := .Content -}} +{{ $content := .RawContent -}} -{{ $content := $content | replaceRE `{{<\s*(?:rel)?ref\s+"([^"]+)"\s*>}}` "$1" -}} -{{ $content := $content | replaceRE `{{<\s*figure\s*(?:.*)?src="([^"]+)"(?:.*)?caption="([^"]+)"(?:.*)?>}}` "![$2]($1)" -}} -{{ $content := $content | replaceRE `{{<\s*image\s*.*?src="([^"]+)".*?>}}` "![]($1)" -}} -{{ $content := $content | replaceRE "(?s:< !--more-- >)" "" -}} -{{ $content := $content | replace "" "" -}} {{ $content := $content | replaceRE `\[(.+?)\]\((.+?)\)` "\n=> $2 $1\n" -}} {{ $content }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b7799ea..6409b6c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,7 +7,7 @@ {{ .Title }} {{ .Content }} - {{ partial "icon.html" "rss" }} Пописка + {{ partial "icon.html" "rss" }} Подписка {{ end }}
diff --git a/layouts/_default/list.txt b/layouts/_default/list.txt index 3dbd917..0d9cee8 100644 --- a/layouts/_default/list.txt +++ b/layouts/_default/list.txt @@ -1,3 +1,9 @@ +# {{ .Title }} + +{{ $content := .RawContent -}} + +{{ $content }} + {{ range .Pages.ByPublishDate.Reverse }} -{{ .Date.Format "2006-01-02" }} {{ .Title }} {{ with .OutputFormats.Get "txt" -}} {{ .RelPermalink }}{{ end }} +=> {{ .RelPermalink | replaceRE `index.txt` `` }}{{if .Date }} {{ .Date.Format "2006-01-02" }}{{ end }} {{ .Title }} {{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c5f73ba..507553d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,9 +1,28 @@ {{ define "main" }} -
-
- {{ partial "single/header.html" . }} -
{{ .Content }}
- {{ partial "single/footer.html" . }} -
+
+
+ +
+
+ {{ partial "single/header.html" . }} +
{{ .Content }}
+ {{ partial "single/footer.html" . }} +
+
+
{{ end }} -- cgit v1.2.3