Subscribe
订阅 / Subscribe
通过 RSS/Atom 订阅本站的最新文章,支持 Follow、Feedly、Inoreader 等阅读器。
https://lonetrail.pages.dev/atom.xml
● XML / Atom 1.0● 288 行● Full Content
atom.xml
288 行1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://lonetrail.pages.dev/</id>
<title>Lonetrail</title>
<updated>2026-02-28T16:00:00.000Z</updated>
<generator>Astro - Feed Library</generator>
<author>
<name>Lonetrail</name>
<email>i@chongxi.us</email>
<uri>https://lonetrail.pages.dev/</uri>
</author>
<link rel="alternate" href="https://lonetrail.pages.dev/"/>
<link rel="self" href="https://lonetrail.pages.dev/atom.xml"/>
<subtitle>循此苦旅 直抵群星</subtitle>
<icon>https://lonetrail.pages.dev/favicon.ico</icon>
<rights>All rights reserved 2026, Lonetrail</rights>
<entry>
<title type="html"><![CDATA[Lonetrail 配置说明]]></title>
<id>https://lonetrail.pages.dev/posts/customize/</id>
<link href="https://lonetrail.pages.dev/posts/customize/"/>
<updated>2026-02-28T16:00:00.000Z</updated>
<summary type="html"><![CDATA[站点元信息、导航和作者资料写在 site.yml,功能开关与第三方集成写在 config.ts,两者分工明确。]]></summary>
<content type="html"><![CDATA[<h2>配置分工</h2>
<p>Lonetrail 把配置拆成两层:</p>
<table>
<thead>
<tr>
<th>文件</th>
<th>放什么</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>src/site.yml</code></td>
<td>站点标题、副标题、URL、作者、导航、社交链接、版权、信任域名、标签翻译</td>
</tr>
<tr>
<td><code>src/config.ts</code></td>
<td>语言路由、功能开关(搜索、评论、统计)、Twikoo / Umami 等集成参数</td>
</tr>
</tbody>
</table>
<p><code>src/config.ts</code> 会读取 <code>site.yml</code> 并导出同形的 <code>siteConfig</code> / <code>navBarConfig</code> / <code>profileConfig</code>,组件只关心后者。</p>
<h2>site.yml</h2>
<pre><code class="language-yaml">site:
title: "Lonetrail"
title_en: "Lonetrail"
subtitle: "循此苦旅 直抵群星"
subtitle_en: "Ad Astra Per Aspera"
description: "一个关于代码、安全与网络的个人笔记本。"
description_en: "A personal notebook on code, security and the web."
url: "https://lonetrail.pages.dev"
lang: "zh_CN"
author: "Lonetrail"
email: "i@chongxi.us"
favicon: "/images/favicon.webp"
banner: "/images/banner.webp"
og_image: "/images/og.webp"
avatar: "/images/avatar.webp"
</code></pre>
<p>双语字段成对出现。英文站读 <code>*_en</code>,没填就回退到中文值。</p>
<p><code>url</code> 同时决定了 <code>astro.config.mjs</code> 里的 <code>site</code> 和图片白名单,改域名只改这一处。</p>
<h3>导航</h3>
<p>导航用 <code>key</code> 引用内置文案,中英文自动切换:</p>
<pre><code class="language-yaml">nav:
- key: home
url: "/"
- key: archive
url: "/archive/"
- key: series
url: "/seri/"
- key: essays
url: "/essays/"
- key: about
url: "/about/"
</code></pre>
<p>可用的 <code>key</code>:<code>home</code>、<code>archive</code>、<code>series</code>、<code>essays</code>、<code>about</code>、<code>subscribe</code>。想加自定义链接就直接写 <code>name</code>:</p>
<pre><code class="language-yaml">nav:
- name: "Notes"
url: "/notes/"
</code></pre>
<h3>标签翻译</h3>
<p>英文站展示标签时用的译名,只影响显示,不影响 URL:</p>
<pre><code class="language-yaml">taxonomy:
tags:
"技术": "Technology"
categories:
"技术": "Technology"
</code></pre>
<h2>config.ts</h2>
<pre><code class="language-ts">export const localeConfig = {
defaultLocale: "zh",
locales: ["zh", "en"],
translatedPaths: ["/", "/archive/", "/about/", "/subscribe/", "/essays/"],
};
export const featureConfig = {
comments: true,
search: true,
analytics: "none",
};
export const integrationConfig = {
twikoo: { envId: "" },
umami: { websiteId: "", domains: "" },
};
</code></pre>
<ul>
<li><code>translatedPaths</code>:这些页面有真正的英文版本,其余 <code>/en/</code> 路由是中文页的 fallback,会被标记 noindex</li>
<li><code>featureConfig.comments</code>:关闭后文章页不再渲染评论区</li>
<li><code>featureConfig.search</code>:关闭后不挂载搜索面板</li>
<li><code>featureConfig.analytics</code>:设为 <code>"umami"</code> 并填好 <code>umami.websiteId</code> 才会加载统计脚本</li>
<li><code>integrationConfig.twikoo.envId</code>:留空则不渲染评论</li>
</ul>
<h2>文章 frontmatter</h2>
<pre><code class="language-yaml">---
title: "文章标题"
published: 2026-01-15
updated: 2026-02-01
description: "一句话摘要"
预览前 120 行 · 完整文件共 288 行 ·查看完整文件 →
● Feed● UTF-8● Read Only
将上方 URL 复制到你的 RSS 阅读器中即可订阅。支持 Follow、Feedly、Inoreader、NetNewsWire 等主流阅读器。
