From e8125b419fecbd9197a80389c74d82bddb36ac7e Mon Sep 17 00:00:00 2001 From: nbsp Date: Sun, 12 Jan 2025 14:48:39 +0200 Subject: [PATCH] add symlink to html --- .nanpa/html.kdl | 1 + .nanpa/pager.kdl | 1 + .nanpa/symlink.kdl | 1 + ttbp/ttbp.go | 1 + 4 files changed, 4 insertions(+) create mode 100644 .nanpa/html.kdl create mode 100644 .nanpa/pager.kdl create mode 100644 .nanpa/symlink.kdl diff --git a/.nanpa/html.kdl b/.nanpa/html.kdl new file mode 100644 index 0000000..092dded --- /dev/null +++ b/.nanpa/html.kdl @@ -0,0 +1 @@ +minor type="added" "add html rendering" diff --git a/.nanpa/pager.kdl b/.nanpa/pager.kdl new file mode 100644 index 0000000..e901d4b --- /dev/null +++ b/.nanpa/pager.kdl @@ -0,0 +1 @@ +minor type="added" "add configurable pager" diff --git a/.nanpa/symlink.kdl b/.nanpa/symlink.kdl new file mode 100644 index 0000000..7ed126f --- /dev/null +++ b/.nanpa/symlink.kdl @@ -0,0 +1 @@ +patch type="fixed" "symlink html directory" diff --git a/ttbp/ttbp.go b/ttbp/ttbp.go index 8b30a53..0743eca 100644 --- a/ttbp/ttbp.go +++ b/ttbp/ttbp.go @@ -401,6 +401,7 @@ func Publish() { if _, err := os.Stat(PathUserWWW); os.IsNotExist(err) { os.MkdirAll(PathUserWWW, 0700) os.Symlink(path.Join(PathUserConfig, "style.css"), path.Join(PathUserWWW, "style.css")) + os.Symlink(PathUserWWW, path.Join(PathUserHTML, cfg.PublishDir)) } file, err := os.Create(path.Join(PathUserWWW, "index.html")) defer file.Close()