Skip to content

Commit d614fe5

Browse files
committed
feat: 新增站内搜索、在线工具箱与文章关系图
站内搜索 - search.json:构建时生成全文索引(标题/标签/分类/正文) - /search/:纯前端检索,中文按整词+相邻二字切分, 英文与代码片段按词切分,标题/标签/正文加权排序,命中处高亮 - 支持 / 快捷键聚焦、Esc 清空、?q= 参数回填、空结果引导 在线工具箱 - /tools/:JSON 格式化/压缩/校验(含错误行号)、 时间戳与日期互转、Base64 与 URL 编解码(UTF-8 安全)、 UUID v4 生成、SHA-256 计算 - 全部本地计算,不发起任何网络请求 文章关系图 - /graph/:自实现力导向布局的 SVG 网络图,不依赖任何 CDN - 文章、标签、分类三类节点,节点大小反映连接数 - 支持拖拽、点击跳转、键盘操作、窗口自适应重排 其他 - 头部新增胶囊导航,页脚与首页补充入口 - 样式适配深色模式与打印,新增规则均使用 CSS 变量
1 parent 29022d1 commit d614fe5

10 files changed

Lines changed: 1558 additions & 1 deletion

File tree

‎_layouts/default.html‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ <h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repo
2525

2626
<p>{{ site.description | default: site.github.project_tagline }}</p>
2727

28+
<nav class="site-nav">
29+
<a href="{{ "/search/" | relative_url }}">搜索</a>
30+
<a href="{{ "/tools/" | relative_url }}">工具箱</a>
31+
<a href="{{ "/graph/" | relative_url }}">关系图</a>
32+
<a href="{{ "/tags/" | relative_url }}">标签</a>
33+
</nav>
34+
2835
{% if site.github.is_project_page %}
2936
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ site.github.repository_nwo }}</small></a></p>
3037
{% endif %}
@@ -51,6 +58,9 @@ <h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repo
5158
<a href="{{ "/" | absolute_url }}">首页</a> ·
5259
<a href="{{ "/about/" | relative_url }}">关于</a> ·
5360
<a href="{{ "/tags/" | relative_url }}">标签</a> ·
61+
<a href="{{ "/search/" | relative_url }}">搜索</a> ·
62+
<a href="{{ "/tools/" | relative_url }}">工具箱</a> ·
63+
<a href="{{ "/graph/" | relative_url }}">关系图</a> ·
5464
<a href="{{ "/feed.xml" | relative_url }}">RSS</a>
5565
</p>
5666
<p>&copy; {{ site.time | date: "%Y" }} {{ site.author.name | default: site.title }}. Powered by Jekyll.</p>

0 commit comments

Comments
 (0)