From 7d44930b593ff820952175375f889b9db4917442 Mon Sep 17 00:00:00 2001 From: rbetree Date: Mon, 22 Dec 2025 20:34:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E6=AC=A2=E8=BF=8E=E5=8C=BA=E7=9A=84=20descri?= =?UTF-8?q?ption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/README.md | 3 +-- config/_default/site.yml | 1 - src/generator.js | 2 -- templates/README.md | 1 - templates/pages/home.hbs | 3 +-- 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/config/README.md b/config/README.md index b67b444..61b86cb 100644 --- a/config/README.md +++ b/config/README.md @@ -117,7 +117,7 @@ MeNav 配置系统采用“完全替换”策略(不合并),按以下优 4. **顶部欢迎信息与社交链接** - `profile`:首页顶部欢迎信息 - `social`:侧边栏底部社交链接 - - `profile.description` 可写较长文本,用于放置个性化介绍或使用说明 + - `profile.title` / `profile.subtitle`:分别对应首页顶部主标题与副标题 5. **导航** - `navigation[]`:页面入口列表,`id` 需唯一,并与 `pages/` 中配置文件名对应(例如 `id: home` 对应 `pages/home.yml`) @@ -200,7 +200,6 @@ keywords: "导航,网址,书签,个人主页" profile: title: "个人导航站" subtitle: "我收藏的精选网站" - description: "这是一个用于快速访问常用网站的个人导航页面。" # 字体配置 fonts: diff --git a/config/_default/site.yml b/config/_default/site.yml index 8261b80..a7c6c9a 100644 --- a/config/_default/site.yml +++ b/config/_default/site.yml @@ -34,7 +34,6 @@ fonts: profile: title: Hello, subtitle: Welcome to My Navigation - description: MeNav # 社交媒体链接:显示在侧边栏底部;可按需增删 social: diff --git a/src/generator.js b/src/generator.js index 59e021b..8b19607 100644 --- a/src/generator.js +++ b/src/generator.js @@ -350,7 +350,6 @@ function ensureConfigDefaults(config) { result.profile = result.profile || {}; result.profile.title = result.profile.title || '欢迎使用'; result.profile.subtitle = result.profile.subtitle || 'MeNav个人导航系统'; - result.profile.description = result.profile.description || '简单易用的个人导航站点'; // 处理站点默认值的辅助函数 function processSiteDefaults(site) { @@ -687,7 +686,6 @@ function generatePageContent(pageId, data) {

${escapeHtml(profile.title || '欢迎使用')}

${escapeHtml(profile.subtitle || '个人导航站')}

-

${escapeHtml(profile.description || '快速访问您的常用网站')}

${generateCategories(data.categories)}`; } else { diff --git a/templates/README.md b/templates/README.md index 983eaa1..5fe6aa7 100644 --- a/templates/README.md +++ b/templates/README.md @@ -98,7 +98,6 @@ templates/

{{profile.title}}

{{profile.subtitle}}

-

{{profile.description}}

{{#each categories}} {{> category}} diff --git a/templates/pages/home.hbs b/templates/pages/home.hbs index df2e1eb..56e4fa1 100644 --- a/templates/pages/home.hbs +++ b/templates/pages/home.hbs @@ -1,8 +1,7 @@

{{profile.title}}

{{profile.subtitle}}

-

{{profile.description}}

{{#each categories}} {{> category}} -{{/each}} \ No newline at end of file +{{/each}}