add symlink to html

trunk
nbsp 2025-01-12 14:48:39 +02:00
parent 50cb60cdc4
commit e8125b419f
No known key found for this signature in database
GPG Key ID: 7184AC1C9835CE48
4 changed files with 4 additions and 0 deletions

1
.nanpa/html.kdl 100644
View File

@ -0,0 +1 @@
minor type="added" "add html rendering"

1
.nanpa/pager.kdl 100644
View File

@ -0,0 +1 @@
minor type="added" "add configurable pager"

View File

@ -0,0 +1 @@
patch type="fixed" "symlink html directory"

View File

@ -401,6 +401,7 @@ func Publish() {
if _, err := os.Stat(PathUserWWW); os.IsNotExist(err) { if _, err := os.Stat(PathUserWWW); os.IsNotExist(err) {
os.MkdirAll(PathUserWWW, 0700) os.MkdirAll(PathUserWWW, 0700)
os.Symlink(path.Join(PathUserConfig, "style.css"), path.Join(PathUserWWW, "style.css")) 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")) file, err := os.Create(path.Join(PathUserWWW, "index.html"))
defer file.Close() defer file.Close()