Skip to content

Commit b65b1f6

Browse files
authored
Merge pull request #41 from SilverRainZ/friendly-index
Friendly index page
2 parents 034e4e6 + c9e7949 commit b65b1f6

49 files changed

Lines changed: 342 additions & 314 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ clean:
4040
fast: Makefile
4141
@$(SPHINXBUILD) -b $@html -c "$(CONFIGDIR)" "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
4242

43-
# Snippet builder: https://sphinx.silverrainz.me/snippet/, for shell completion.
43+
# Picker builder: https://sphinx.silverrainz.me/picker/, for shell completion.
4444
.PHONY: snip
45-
snip: snippet
45+
pick: picker
4646

4747
################################################################################
4848
# View Helpers

conf.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,7 @@
154154
html_css_files.append(f'{html_theme}-custom.css')
155155

156156
# Setup announcement as your need
157-
html_theme_options['announcement'] = '2025 年底翻新计划进行中,' \
158-
'详见 <a href="https://github.com/SilverRainZ/silverrainz.github.io/issues/34">' \
159-
'#34</a>'
157+
html_theme_options['announcement'] = ''
160158

161159
if _D.is_mirror():
162160
if not _D.is_private():
@@ -259,9 +257,8 @@
259257
gtagjs_ids = ['G-FYHS50G6DL']
260258

261259
if _D is _D.Local:
262-
extensions.append('sphinxnotes.snippet')
263-
snippetconfig = {}
264-
snippet_patterns = {
260+
extensions.append('sphinxnotes.picker')
261+
picker_patterns = {
265262
'd': ['.*'],
266263
's': ['notes/.*', 'jour/.*', 'collections/.*', 'about/.*', 'p/.*', 'in/.*'],
267264
'c': ['p/.*', 'notes/man/.*'],

confs/fetch_artwork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from sphinx.application import Sphinx
66
from sphinx.environment import BuildEnvironment
77
from sphinx.util import logging
8-
from sphinxnotes.data.render.template import _JinjaEnv
8+
from sphinxnotes.render.template import _JinjaEnv
99

1010
from .deploy import Deployment
1111

confs/redirect.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ notes/music-making/linux-recording: /p/linux-recording.html
1414
about/resume: /resume/index.html # external links to https://github.com/SilverRainZ/resume
1515
about/swan: /about/people.html#Swan
1616
notes/zxsys/way-to-artist/find-yourself2: /in/inbox/be-fall-in-love.html
17+
notes/artstory/artistory/index: /p/artistory/index.html
18+
collections/github-halloween: /p/github-halloween.html
19+
collections/devices/instruments: /p/instruments.html
20+
collections/scores/index: /p/lyscores/index.html

confs/schemas.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
'name': 'lines of str, required, ref',
6363
'attrs': {
6464
'movement': 'words of str, ref',
65-
'gallery': 'words of str, ref',
65+
'gallery': 'words of str', # deprecated
6666
'enwiki': 'str',
6767
'zhwiki': 'str',
6868
'artwork': 'words of str',
@@ -74,19 +74,6 @@
7474
'header': '{{ name[0] }}',
7575
},
7676
},
77-
'gallery': {
78-
'schema': {
79-
'name': 'lines of str, required, uniq, ref',
80-
'attrs': {
81-
'website': 'str',
82-
},
83-
},
84-
'templates': {
85-
'obj': open('confs/templates/gallery.rst', 'r').read(),
86-
'ref': '🖼️{{ name[0] }}',
87-
'header': '{{ name[0] }}',
88-
},
89-
},
9077
'event': {
9178
'schema': {
9279
'name': 'str, required, ref',
@@ -130,7 +117,7 @@
130117
'templates': {
131118
'obj': open('confs/templates/term.rst', 'r').read(),
132119
'ref': '#️⃣{{ name[0] }}',
133-
'ref': '#️⃣{{ name[0] }}',
120+
'header': '{{ name[0] }}',
134121
},
135122
},
136123
'jour': {

confs/templates/artist.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{% if movement %}:艺术运动: {% for m in movement %}:artist.movement:`{{ m }} <{{ m }}>` {% endfor %}{% endif %}
2-
{% if gallery %}:画廊: {% for g in gallery %}:gallery:`{{ g }}` {% endfor %}{% endif %}
32
{% if enwiki %}:维基: :enwiki:`{{ enwiki }}`{% endif %}
43
{% if zhwiki %}:维基: :zhwiki:`{{ zhwiki }}`{% endif %}
54
{% if artwork %}:知名作品: {% for a in artwork %} :search:`🎨{{ a }} <{{ name }} {{ a }}>` {% endfor %}{% endif %}

confs/templates/gallery.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/404.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
:orphan:
22
:nosearch:
3+
:layout: 404
34

45
==========
56
本来无一物

src/about/me.rst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SilverRainZ
1919
I am...
2020

2121
:a programmer: I am SilverRainZ__ on GitHub, checkout my resume__ if you are interested
22-
:an artist on the road: my :ref:`works <any-artwork.id+by-hyphen>` are listed here, todo: portfolio
22+
:an artist on the road: my :doc:`works </gallery>` are listed here, todo: portfolio
2323
:a |linux| user: also a member of `Arch Linux CN Community`__
2424
:an |oss| author: I created `Srain IRC Client`__, `Sphinx Notes`__ and `more...`__
2525

@@ -32,18 +32,8 @@ __ https://github.com/SilverRainZ?tab=repositories&q=&type=source&language=&sort
3232

3333
.. |linux| replace:: :abbr:`Linux (I use Arch, btw)`
3434
.. |oss| replace:: :abbr:`OSS (Open Source Software)`
35-
.. |love| replace:: :abbr:`love (❤️)`
3635

37-
I am passionate about (in no particular order):
38-
39-
- creating interesting images (in other words: painting)
40-
- programming (what a typical programmer!)
41-
- building `structured note taking system`__, which is the website you're visiting now (+2!)
42-
- building self-hosted services (+3!)
43-
- saving money (what a typical Chinese!)
44-
- :people:`Swan`, a lovely girl
45-
46-
__ https://github.com/SilverRainZ/bullet
36+
.. _contact-me:
4737

4838
Contact
4939
-------

src/about/site.rst

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,132 +15,164 @@
1515
Sphinx + Sphinx Notes
1616
=====================
1717

18-
本站由 Sphinx |sphinx-badge| + Sphinx Notes |sphinx-notes-badge| 强力驱动。
18+
本站由 Sphinx__ |sphinx-badge| + `Sphinx Notes`__ |sphinx-notes-badge| 强力驱动,
19+
源码托管于 :ghrepo:`SilverRainZ/bullet`。
1920

2021
.. |sphinx-badge| image:: /_assets/sphinx.webp
2122
:target: https://www.sphinx-doc.org
22-
:height: 4em
23+
:height: 2em
2324

2425
.. |sphinx-notes-badge| image:: /_assets/sphinxnotes.webp
25-
:target: https://github.com/sphinx-notes/
26-
:height: 4em
26+
:target: https://sphinx.silverrainz.me/
27+
:height: 2em
28+
29+
__ https://www.sphinx-doc.org
30+
__ https://sphinx.silverrainz.me/
2731

2832
变更记录
2933
========
3034

3135
.. container:: timeline
3236

33-
.. card:: 2025-10
37+
.. card:: :octicon:`calendar` 2026-02
38+
:width: 50%
39+
:margin: 0 2 auto 0
40+
:class-card: surface
41+
42+
得益于 :pypi:`sphinxnotes-render` 的完成,现在 :pypi:`sphinxnotes-any`
43+
支持 ``.. xxx+embed::`` 来嵌入一个对象了。
44+
45+
以此为契机,更新了首页,分为:画廊、博客、笔记 三个大类。
46+
47+
.. seealso:: `2025 TODOs`__ 终于完成了……
48+
49+
__ https://github.com/SilverRainZ/silverrainz.github.io/issues/34
50+
51+
.. card:: :octicon:`calendar` 2025-10
3452
:width: 50%
3553
:margin: 0 2 0 auto
54+
:class-card: surface
3655

3756
换上了 :ghuser:`lepture` 的主题 `Shibuya <https://shibuya.lepture.com/>`_,看上去现代了很多。
3857
但不支持我现在用的 :pypi:`ABlog`,花了一些时间做了点适配工作:
3958
`sunpy/ablog#310 <https://github.com/sunpy/ablog/issues/310>`_
4059

41-
.. card:: 2025-07
60+
.. card:: :octicon:`calendar` 2025-07
4261
:width: 50%
4362
:margin: 0 2 auto 0
63+
:class-card: surface
4464

4565
所有二进制内容(图片、PDF、演示文稿)从仓库里移除(尚未 ``git filter-repo``),
4666
放到单独的私有仓库中。
4767

4868
特别地,:doc:`画作 </collections/art-works/index>` 现在通过 latree
4969
(我的统一文件树)的 artwork 组件,指定 ID 便可获取。
5070

51-
52-
53-
.. card:: 2025-06
71+
.. card:: :octicon:`calendar` 2025-06
5472
:width: 50%
5573
:margin: 0 2 0 auto
74+
:class-card: surface
5675

5776
重写 `简历 </resume>`_,新增英文版本。
5877
因为需要 LaTeX build 所以拆分到单独仓库 :ghrepo:`SilverRainZ/resume`。
5978

60-
.. card:: 2022-02
79+
.. card:: :octicon:`calendar` 2022-02
6180
:width: 50%
6281
:margin: 0 2 auto 0
82+
:class-card: surface
6383

6484
换了个新主题 :pypi:`sphinx-book-theme`,侧边栏支持固定,兼容 ABlog,移动端体验好多了。
6585
主题自带 local-toc 支持,因此文档里的 `.. contents::` 指令没用了,写了个扩展 :pypi:`sphinxnotes-mock` 来屏蔽它。
6686

67-
.. card:: 2021-03
87+
.. card:: :octicon:`calendar` 2021-03
6888
:width: 50%
6989
:margin: 0 2 0 auto
90+
:class-card: surface
7091

7192
- 扩展 :pypi:`sphinxnotes-isso` 投入使用,用了阿哥的腾讯云机器,重新启用 Isso 评论
7293
- 扩展 :pypi:`sphinxnotes.snippet` 投入使用
7394

74-
.. card:: 2021-02
95+
.. card:: :octicon:`calendar` 2021-02
7596
:width: 50%
7697
:margin: 0 2 auto 0
98+
:class-card: surface
7799

78100
:del:`为方便国内访问,建立 Gitee 镜像,地址为: https://silverrainz.gitee.io`
79101

80102
.. seealso:: Gitee Pages 因不可抗力潦草下线:`关于GiteePages无法启动和更新的看过来! · Issue #I9L5FJ · 开源中国/Gitee Feedback - Gitee.com <https://gitee.com/oschina/git-osc/issues/I9L5FJ>`_
81103

82-
.. card:: 2020-12
104+
.. card:: :octicon:`calendar` 2020-12
83105
:width: 50%
84106
:margin: 0 2 0 auto
107+
:class-card: surface
85108

86109
- 将博客迁移到 Sphinx + ABlog,详见 :doc:`/blog/migrate-to-sphinx`
87110
- 扩展 :pypi:`sphinxnotes.any` 投入使用
88111

89-
.. card:: 2020-04
112+
.. card:: :octicon:`calendar` 2020-04
90113
:width: 50%
91114
:margin: 0 2 auto 0
115+
:class-card: surface
92116

93117
评论框维护成本高且各有限制,弃用之,交流请发邮件。
94118

95-
.. card:: 2017-06
119+
.. card:: :octicon:`calendar` 2017-06
96120
:width: 50%
97121
:margin: 0 2 0 auto
122+
:class-card: surface
98123

99124
多说停止服务,评论系统切换到 Isso,之前的评论数据已迁移。参见文章::doc:`/blog/switch-from-duoshuo-to-isso`
100125

101-
.. card:: 2017-04
126+
.. card:: :octicon:`calendar` 2017-04
102127
:width: 50%
103128
:margin: 0 2 auto 0
129+
:class-card: surface
104130

105131
借助 CloudFlare 缓存了 silverrainz.me 和 tech.silverrainz.me,同时启用了 HTTPS。
106132

107-
.. card:: 2017-03
133+
.. card:: :octicon:`calendar` 2017-03
108134
:width: 50%
109135
:margin: 0 2 0 auto
136+
:class-card: surface
110137

111138
将个人笔记 notes.silverrainz.me 从 Gitbook 迁移到 Sphinx,
112139
托管于 Read The Docs,参见文章: 用 Sphinx + reStructuredText 构建笔记系统。
113140

114-
.. card:: 2017-01
141+
.. card:: :octicon:`calendar` 2017-01
115142
:width: 50%
116143
:margin: 0 2 auto 0
144+
:class-card: surface
117145

118146
域名变更为 silverrainz.me,博客地址亦变更为 tech.silverrainz.me,
119147
域名 lastavengers.me 将于 2017 年 8 月失效。
120148

121-
.. card:: 2016-08
149+
.. card:: :octicon:`calendar` 2016-08
122150
:width: 50%
123151
:margin: 0 2 0 auto
152+
:class-card: surface
124153

125154
- Markdown 引擎从 Rdiscount 切换到 Kramdown,
126155
- 启用了域名 lastavengers.me 作为个人主页,博客地址变更为 tech.lastavengers.me
127156
- 移除了 Project 页
128157

129-
.. card:: 2015-11 ~ 2016-01
158+
.. card:: :octicon:`calendar` 2015-11 ~ 2016-01
130159
:width: 50%
131160
:margin: 0 2 auto 0
161+
:class-card: surface
132162

133163
博客升级,增加了 Project,About 页面,支持点击浏览大图,加入了 font-awesome。
134164

135-
.. card:: 2015-03
165+
.. card:: :octicon:`calendar` 2015-03
136166
:width: 50%
137167
:margin: 0 2 0 auto
168+
:class-card: surface
138169

139170
使用 Jekyll 搭建新博客,托管在 Github 上。
140171

141-
.. card:: 2014-01
172+
.. card:: :octicon:`calendar` 2014-01
142173
:width: 50%
143174
:margin: 0 2 auto 0
175+
:class-card: surface
144176

145177
注册 博客园_ 。
146178

0 commit comments

Comments
 (0)