From 99deed9ef6ab7624d5485ed582de015fae6b578b Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Thu, 2 Jan 2025 19:52:06 +0300 Subject: Auto-commit 2025-01-02 --- layouts/_default/_markup/render-image.txt | 2 ++ layouts/_default/list.txt | 10 ++++------ layouts/_default/single.txt | 9 +++------ layouts/partials/content.txt | 5 +++++ 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 layouts/_default/_markup/render-image.txt create mode 100644 layouts/partials/content.txt (limited to 'layouts') diff --git a/layouts/_default/_markup/render-image.txt b/layouts/_default/_markup/render-image.txt new file mode 100644 index 0000000..e2d496a --- /dev/null +++ b/layouts/_default/_markup/render-image.txt @@ -0,0 +1,2 @@ +Изображение «{{- if .Text -}}{{- .Text -}}{{- else -}}{{- .Title -}}{{- end -}}»: +{{ .Destination | safeURL }} \ No newline at end of file diff --git a/layouts/_default/list.txt b/layouts/_default/list.txt index 0d9cee8..c129a19 100644 --- a/layouts/_default/list.txt +++ b/layouts/_default/list.txt @@ -1,9 +1,7 @@ -# {{ .Title }} - -{{ $content := .RawContent -}} - -{{ $content }} +{{ .Title }} +================================================================================ +{{ partial "content.txt" . }} {{ range .Pages.ByPublishDate.Reverse }} -=> {{ .RelPermalink | replaceRE `index.txt` `` }}{{if .Date }} {{ .Date.Format "2006-01-02" }}{{ end }} {{ .Title }} +* {{if .Date }} {{ .Date.Format "2006-01-02" }}{{ end }}{{- .Title }} ({{ .RelPermalink | replaceRE `text/index.txt` `` }}) {{ end }} \ No newline at end of file diff --git a/layouts/_default/single.txt b/layouts/_default/single.txt index 51f0239..7a44b8b 100644 --- a/layouts/_default/single.txt +++ b/layouts/_default/single.txt @@ -1,8 +1,5 @@ {{ .Title }} - -{{ $content := .RawContent -}} -{{ $content := $content | replaceRE "(?s:< !--more-- >)" "" -}} -{{ $content }} - ---- +================================================================================ +{{ partial "content.txt" . }} +================================================================================ NeonXP at {{ .Date.Format "2006-01-02" }} diff --git a/layouts/partials/content.txt b/layouts/partials/content.txt new file mode 100644 index 0000000..26a7901 --- /dev/null +++ b/layouts/partials/content.txt @@ -0,0 +1,5 @@ +{{ $content := .RawContent -}} +{{ $content := $content | replaceRE "(?s:)" "" -}} +{{ $content := $content | replaceRE `\!\[.*?\]\((.*?)\)` "$1" -}} +{{ $content := $content | replaceRE `\[(.*?)\]\((.*?)\)` "$1 ($2)" -}} +{{ $content }} \ No newline at end of file -- cgit v1.2.3