aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorverdant <i@glowisle.me>2026-02-06 16:41:13 +0800
committerverdant <i@glowisle.me>2026-02-06 16:41:13 +0800
commit327797a634a5b8fe5acbd9063e734da0ffaaa095 (patch)
treea300dba063c1137082d6b44b6442095f57acad73
parent09e3feab20961cabdf9a8675f780aeb7d8fba035 (diff)
downloadniwa-327797a634a5b8fe5acbd9063e734da0ffaaa095.tar.gz
niwa-327797a634a5b8fe5acbd9063e734da0ffaaa095.zip
docs: add note "generate-tag-pages"
-rw-r--r--notes/index.org1
-rw-r--r--notes/tags/emacs.org1
-rw-r--r--notes/tags/technology.org1
-rw-r--r--public/how-do-i-build-this-site.html50
-rw-r--r--public/index.html3
-rw-r--r--public/radical-minimalist-web-design.html2
-rw-r--r--public/tags/emacs.html3
-rw-r--r--public/tags/minimalism.html2
-rw-r--r--public/tags/philosophy.html2
-rw-r--r--public/tags/technology.html3
-rw-r--r--public/tags/web.html2
-rw-r--r--scripts/niwa.sh7
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>我是如何构建这个站点的</title>
@@ -259,10 +259,10 @@ scripts
<h4 id="org1cebfa5"><code>new_note()</code></h4>
<div class="outline-text-4" id="text-org1cebfa5">
<div class="org-src-container">
-<pre class="src src-bash">new_note() {
- file_name=$1
- cp $TEMPLATE_FILE "$NOTES_DIR/${file_name}.org" &amp;&amp; echo "创建笔记成功:$NOTES_DIR/${file_name}.org"
- echo "#+EXPORT_FILE_NAME: $PUBLIC_DIR/${file_name}.html" &gt;&gt; "$NOTES_DIR/${file_name}.org"
+<pre class="src src-bash"><span style="font-weight: bold;">new_note</span>() {
+ <span style="font-weight: bold; font-style: italic;">file_name</span>=$<span style="font-weight: bold; font-style: italic;">1</span>
+ cp $<span style="font-weight: bold; font-style: italic;">TEMPLATE_FILE</span> <span style="font-style: italic;">"$NOTES_DIR/${file_name}.org"</span> &amp;&amp; <span style="font-weight: bold;">echo</span> <span style="font-style: italic;">"&#21019;&#24314;&#31508;&#35760;&#25104;&#21151;&#65306;$NOTES_DIR/${file_name}.org"</span>
+ <span style="font-weight: bold;">echo</span> <span style="font-style: italic;">"#+EXPORT_FILE_NAME: $PUBLIC_DIR/${file_name}.html"</span> &gt;&gt; <span style="font-style: italic;">"$NOTES_DIR/${file_name}.org"</span>
}
</pre>
</div>
@@ -276,8 +276,8 @@ scripts
</p>
<div class="org-src-container">
-<pre class="src src-org">#+title:
-#+SETUPFILE: ~/niwa/template/setup/minimal.setup
+<pre class="src src-org">#+title:<span style="font-weight: bold;">
+</span><span style="font-weight: bold; font-style: italic;">#+SETUPFILE: ~/niwa/template/setup/minimal.setup</span>
</pre>
</div>
@@ -313,11 +313,11 @@ scripts
<h4 id="org88f87df">build()</h4>
<div class="outline-text-4" id="text-org88f87df">
<div class="org-src-container">
-<pre class="src src-bash">build() {
- emacs --batch \
- -l ~/.config/emacs/lisp/doom.el \
- -l "${SCRIPTS_DIR}/publish.el" \
- --eval "(org-publish-project \"niwa\" t)"
+<pre class="src src-bash"><span style="font-weight: bold;">build</span>() {
+ emacs --batch <span style="font-style: italic;">\</span>
+ -l ~/.config/emacs/lisp/doom.el <span style="font-style: italic;">\</span>
+ -l <span style="font-style: italic;">"${SCRIPTS_DIR}/publish.el"</span> <span style="font-style: italic;">\</span>
+ --eval <span style="font-style: italic;">"(org-publish-project \"niwa\" t)"</span>
}
</pre>
</div>
@@ -333,19 +333,19 @@ scripts
<h3 id="org81cae63">publish.el</h3>
<div class="outline-text-3" id="text-org81cae63">
<div class="org-src-container">
-<pre class="src src-elisp">(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"))))
+<pre class="src src-elisp">(<span style="font-weight: bold;">setq</span> org-publish-project-alist
+ '((<span style="font-style: italic;">"niwa-notes"</span>
+ <span style="font-weight: bold;">:base-directory</span> <span style="font-style: italic;">"~/niwa/notes"</span>
+ <span style="font-weight: bold;">:base-extension</span> <span style="font-style: italic;">"org"</span>
+ <span style="font-weight: bold;">:recursive</span> t
+ <span style="font-weight: bold;">:publishing-directory</span> <span style="font-style: italic;">"~/niwa/public"</span>
+ <span style="font-weight: bold;">:publishing-function</span> org-html-publish-to-html
+ <span style="font-weight: bold;">:with-author</span> nil
+ <span style="font-weight: bold;">:with-creator</span> nil
+ <span style="font-weight: bold;">:section-numbers</span> nil)
+
+ (<span style="font-style: italic;">"niwa"</span>
+ <span style="font-weight: bold;">:components</span> (<span style="font-style: italic;">"niwa-notes"</span>))))
</pre>
</div>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Verdant的杂物间</title>
@@ -228,6 +228,7 @@ This is a <a href="https://motherfuckingwebsite.com/">motherfucking-website</a>.
<h2 id="orgfb9cabc">最近更新</h2>
<div class="outline-text-2" id="text-orgfb9cabc">
<ul class="org-ul">
+<li><a href="./generate-tag-pages.html">生成标签页面</a></li>
<li><a href="./how-do-i-build-this-site.html">我是如何构建这个站点的</a></li>
<li><a href="./radical-minimalist-web-design.html">激进极简主义网页设计</a></li>
</ul>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>激进极简主义网页设计</title>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>#emacs</title>
@@ -207,6 +207,7 @@ color: white;
<h1 class="title">#emacs</h1>
<ul class="org-ul">
<li><a href="../how-do-i-build-this-site.html">我是如何构建这个站点的</a></li>
+<li><a href="../generate-tag-pages.html">生成标签页面</a></li>
</ul>
</div>
</body>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>#minimalism</title>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>#philosophy</title>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>#technology</title>
@@ -207,6 +207,7 @@ color: white;
<h1 class="title">#technology</h1>
<ul class="org-ul">
<li><a href="../how-do-i-build-this-site.html">我是如何构建这个站点的</a></li>
+<li><a href="../generate-tag-pages.html">生成标签页面</a></li>
</ul>
</div>
</body>
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">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head>
-<!-- 2026-02-03 二 01:03 -->
+<!-- 2026-02-06 五 16:40 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>#web</title>
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)"
}