From 327797a634a5b8fe5acbd9063e734da0ffaaa095 Mon Sep 17 00:00:00 2001 From: verdant Date: Fri, 6 Feb 2026 16:41:13 +0800 Subject: docs: add note "generate-tag-pages" --- notes/index.org | 1 + notes/tags/emacs.org | 1 + notes/tags/technology.org | 1 + public/how-do-i-build-this-site.html | 50 +++++++++++++++---------------- public/index.html | 3 +- public/radical-minimalist-web-design.html | 2 +- public/tags/emacs.html | 3 +- public/tags/minimalism.html | 2 +- public/tags/philosophy.html | 2 +- public/tags/technology.html | 3 +- public/tags/web.html | 2 +- scripts/niwa.sh | 7 ++++- 12 files changed, 44 insertions(+), 33 deletions(-) diff --git a/notes/index.org b/notes/index.org index 7224737..5733541 100644 --- a/notes/index.org +++ b/notes/index.org @@ -9,6 +9,7 @@ This is a [[https://motherfuckingwebsite.com/][motherfucking-website]]. 这里是 Verdant 的杂物间,[[https://www.glowisle.me/][映屿]]的一部分,也是「[[./radical-minimalist-web-design.org][激进极简主义网页设计]]」的实验田。内容的风格上更像数字花园。会发布一些半成品文章、某些问题的解决方案或笔记。如果你对这个站点使用了什么技术感兴趣,可以阅读[[./how-do-i-build-this-site.org][《我是如何构建这个站点的》]]。 ** 最近更新 +- [[./generate-tag-pages.org][生成标签页面]] - [[./how-do-i-build-this-site.org][我是如何构建这个站点的]] - [[./radical-minimalist-web-design.org][激进极简主义网页设计]] diff --git a/notes/tags/emacs.org b/notes/tags/emacs.org index 9fea31f..86399c4 100644 --- a/notes/tags/emacs.org +++ b/notes/tags/emacs.org @@ -2,3 +2,4 @@ #+SETUPFILE: ../../template/setup/minimal.setup - [[file:../how-do-i-build-this-site.org][我是如何构建这个站点的]] +- [[../generate-tag-pages.org][生成标签页面]] diff --git a/notes/tags/technology.org b/notes/tags/technology.org index d25419e..140e897 100644 --- a/notes/tags/technology.org +++ b/notes/tags/technology.org @@ -2,3 +2,4 @@ #+SETUPFILE: ../../template/setup/minimal.setup - [[file:../how-do-i-build-this-site.org][我是如何构建这个站点的]] +- [[file:../generate-tag-pages.org][生成标签页面]] diff --git a/public/how-do-i-build-this-site.html b/public/how-do-i-build-this-site.html index 452da93..0ff8b18 100644 --- a/public/how-do-i-build-this-site.html +++ b/public/how-do-i-build-this-site.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + 我是如何构建这个站点的 @@ -259,10 +259,10 @@ scripts

new_note()

-
new_note() {
-    file_name=$1
-    cp $TEMPLATE_FILE "$NOTES_DIR/${file_name}.org" && echo "创建笔记成功:$NOTES_DIR/${file_name}.org"
-    echo "#+EXPORT_FILE_NAME: $PUBLIC_DIR/${file_name}.html" >> "$NOTES_DIR/${file_name}.org"
+
new_note() {
+    file_name=$1
+    cp $TEMPLATE_FILE "$NOTES_DIR/${file_name}.org" && echo "创建笔记成功:$NOTES_DIR/${file_name}.org"
+    echo "#+EXPORT_FILE_NAME: $PUBLIC_DIR/${file_name}.html" >> "$NOTES_DIR/${file_name}.org"
 }
 
@@ -276,8 +276,8 @@ scripts

-
#+title:
-#+SETUPFILE: ~/niwa/template/setup/minimal.setup
+
#+title:
+#+SETUPFILE: ~/niwa/template/setup/minimal.setup
 
@@ -313,11 +313,11 @@ scripts

build()

-
build() {
-    emacs --batch \
-	-l ~/.config/emacs/lisp/doom.el \
-	-l "${SCRIPTS_DIR}/publish.el" \
-	--eval "(org-publish-project \"niwa\" t)"
+
build() {
+    emacs --batch \
+        -l ~/.config/emacs/lisp/doom.el \
+        -l "${SCRIPTS_DIR}/publish.el" \
+        --eval "(org-publish-project \"niwa\" t)"
 }
 
@@ -333,19 +333,19 @@ scripts

publish.el

-
(setq org-publish-project-alist
-      '(("niwa-notes"
-	 :base-directory "~/niwa/notes"
-	 :base-extension "org"
-	 :recursive t
-	 :publishing-directory "~/niwa/public"
-	 :publishing-function org-html-publish-to-html
-	 :with-author nil
-	 :with-creator nil
-	 :section-numbers nil)
-
-	 ("niwa"
-	  :components ("niwa-notes"))))
+
(setq org-publish-project-alist
+      '(("niwa-notes"
+         :base-directory "~/niwa/notes"
+         :base-extension "org"
+         :recursive t
+         :publishing-directory "~/niwa/public"
+         :publishing-function org-html-publish-to-html
+         :with-author nil
+         :with-creator nil
+         :section-numbers nil)
+
+         ("niwa"
+          :components ("niwa-notes"))))
 
diff --git a/public/index.html b/public/index.html index 14069cf..b84f2ad 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Verdant的杂物间 @@ -228,6 +228,7 @@ This is a motherfucking-website.

最近更新

diff --git a/public/radical-minimalist-web-design.html b/public/radical-minimalist-web-design.html index c407fec..18d793b 100644 --- a/public/radical-minimalist-web-design.html +++ b/public/radical-minimalist-web-design.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + 激进极简主义网页设计 diff --git a/public/tags/emacs.html b/public/tags/emacs.html index 90e3eaa..0508996 100644 --- a/public/tags/emacs.html +++ b/public/tags/emacs.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + #emacs @@ -207,6 +207,7 @@ color: white;

#emacs

diff --git a/public/tags/minimalism.html b/public/tags/minimalism.html index 10dc97b..c21ca87 100644 --- a/public/tags/minimalism.html +++ b/public/tags/minimalism.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + #minimalism diff --git a/public/tags/philosophy.html b/public/tags/philosophy.html index 7402ce6..47afff0 100644 --- a/public/tags/philosophy.html +++ b/public/tags/philosophy.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + #philosophy diff --git a/public/tags/technology.html b/public/tags/technology.html index 3fbbdcb..ffb85ba 100644 --- a/public/tags/technology.html +++ b/public/tags/technology.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + #technology @@ -207,6 +207,7 @@ color: white;

#technology

diff --git a/public/tags/web.html b/public/tags/web.html index 5c0fc0c..ae7aca7 100644 --- a/public/tags/web.html +++ b/public/tags/web.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + #web diff --git a/scripts/niwa.sh b/scripts/niwa.sh index e1f29d6..8398f88 100644 --- a/scripts/niwa.sh +++ b/scripts/niwa.sh @@ -19,8 +19,13 @@ new_note() { build() { emacs --batch \ - -l ~/.config/emacs/lisp/doom.el \ + --no-init-file \ + --no-site-file \ -l "${SCRIPTS_DIR}/publish.el" \ + --eval "(setq package-archives '((\"gnu\" . \"https://elpa.gnu.org/packages/\") (\"melpa\" . \"https://melpa.org/packages/\")))" \ + --eval "(package-initialize)" \ + --eval "(unless (package-installed-p 'org) (package-refresh-contents) (package-install 'org))" \ + --eval "(unless (package-installed-p 'htmlize) (package-refresh-contents) (package-install 'htmlize))" \ --eval "(org-publish-project \"niwa\" t)" } -- cgit v1.2.3