From 1c86bdda2a3067ade9aa765d8d87fe27151dd895 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sun, 21 Dec 2025 16:57:48 +0100 Subject: feat(backend): set content to display like a poem --- backend/parser.go | 2 ++ pull.sh | 2 +- push.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/parser.go b/backend/parser.go index f2537d5..9165c71 100644 --- a/backend/parser.go +++ b/backend/parser.go @@ -17,6 +17,7 @@ type EntryInfo struct { Description string `toml:"description"` Img image `toml:"image"` PubLocalDate toml.LocalDate `toml:"publication_date"` + Poem bool `toml:"poem"` } func renderLinkFunc(url string) func(string, string) template.HTML { @@ -52,6 +53,7 @@ func parse(b []byte, info *EntryInfo, d *data) (template.HTML, bool) { } opt := defaultMarkdownOption opt.RenderLink = renderLinkFunc(d.URL) + opt.Poem = info.Poem content, err := markdown.Parse(dd, &opt) var errMd *markdown.ParseError errors.As(err, &errMd) diff --git a/pull.sh b/pull.sh index 055435e..8fc4084 100755 --- a/pull.sh +++ b/pull.sh @@ -1,3 +1,3 @@ #!/usr/bin/bash -rsync -rvz "vps:~/small-web-data/*" ./ +rsync -riz "vps:~/small-web-data/*" ./ diff --git a/push.sh b/push.sh index 40b3375..a889aa8 100755 --- a/push.sh +++ b/push.sh @@ -1,3 +1,3 @@ #!/usr/bin/bash -rsync -rvz ./{public,data,config.toml,*.sh} vps:~/small-web-data/ +rsync -riz ./{public,data,config.toml,*.sh} vps:~/small-web-data/ -- cgit v1.2.3