hexo-theme-stellar 2.0.0-rc.3 → 2.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -1
- package/_config.yml +2 -0
- package/_data/icons.yml +0 -1
- package/layout/_partial/main/listing_nav/blog.ejs +2 -1
- package/layout/_partial/sidebar/brand.ejs +1 -1
- package/package.json +4 -2
- package/scripts/generators/stellar-icons.js +0 -1
- package/scripts/helpers/brand.js +0 -5
- package/scripts/schema/config-rules.js +1 -0
- package/scripts/schema/content-config-rules.js +1 -0
- package/scripts/schema/model-schema.js +1 -0
- package/source/css/_appearances/minimal.styl +6 -0
- package/source/css/_common/loading.styl +2 -0
- package/source/css/_common/md-link.styl +0 -3
- package/source/css/_components/collection.styl +14 -6
- package/source/css/_components/list.styl +1 -0
- package/source/css/_components/sidebar/nav-area.styl +1 -1
- package/source/css/_components/sidebar/search.styl +0 -1
- package/source/css/_components/tag-plugins/okr.styl +3 -1
- package/source/css/_custom.styl +1 -1
- package/source/js/services/siteinfo.js +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.4
|
|
4
|
+
|
|
5
|
+
> 发布日期:2026-09-10
|
|
6
|
+
|
|
7
|
+
本节记录从公开候选 `2.0.0-rc.3` 到 `2.0.0-rc.4` 最终文件树的净变化。
|
|
8
|
+
|
|
9
|
+
### 修复与改进
|
|
10
|
+
|
|
11
|
+
- 恢复博客列表导航中的专栏入口,使用当前上架专栏索引判断是否显示。
|
|
12
|
+
- 修复移动端专栏文章列表横向溢出,调整 OKR 标签宽度与右对齐;移动端根字号增量由 2px 调整为 1px。
|
|
13
|
+
- 统一集合控件、侧栏菜单与搜索结果字体,修复导航前缀和长标题的布局。
|
|
14
|
+
- minimal 外观下文章、专栏封面与置顶轮播在普通及交互状态均去除边框,保留键盘焦点 outline。
|
|
15
|
+
- Markdown 行内链接的站点信息请求失败时保留原图标,不再显示红色断链图标;数据加载失败时隐藏加载指示器。
|
|
16
|
+
- 将仅用于源码检查的 `glob` 移至开发依赖,并显式声明 ESLint 配置需要的 `@eslint/js` 与 `globals`。
|
|
17
|
+
|
|
18
|
+
### 升级注意(配置变更与破坏性改动)
|
|
19
|
+
|
|
20
|
+
- 站点 Brand 的 GitHub 数据区改为显式读取 `leftbar.brand.ghuser`,默认 `null` 不显示;不再从 ghuser Widget 的 username 推断。需要保留统计时设置 `leftbar.brand.ghuser: 你的GitHub用户名`。该数据区仍仅在左栏 regular 样式下显示,Collection Brand 的仓库统计保持原有来源。
|
|
21
|
+
|
|
22
|
+
Full Changelog: [2.0.0-rc.3...2.0.0-rc.4](https://github.com/xaoxuu/hexo-theme-stellar/compare/2.0.0-rc.3...2.0.0-rc.4)
|
|
23
|
+
|
|
3
24
|
## 2.0.0-rc.3
|
|
4
25
|
|
|
5
26
|
> 发布日期:2026-09-10
|
|
@@ -90,7 +111,7 @@ Full Changelog: [2.0.0-rc.1...2.0.0-rc.2](https://github.com/xaoxuu/hexo-theme-s
|
|
|
90
111
|
- 浏览器后处理必须原样保留 `public/js/runtime/**/*.js` 的 ESM 语义、相对 import 与 JavaScript MIME 类型。
|
|
91
112
|
- v2 当前源码从仓库 `main` 安装并需要执行 `npm install --prefix themes/stellar`;npm 包是否为 v2 以实际公开版本为准。
|
|
92
113
|
|
|
93
|
-
Full Changelog: [1.44.0...
|
|
114
|
+
Full Changelog: [1.44.0...2.0.0-rc.1](https://github.com/xaoxuu/hexo-theme-stellar/compare/1.44.0...2.0.0-rc.1)
|
|
94
115
|
|
|
95
116
|
## 1.44.0
|
|
96
117
|
|
package/_config.yml
CHANGED
package/_data/icons.yml
CHANGED
|
@@ -8,7 +8,6 @@ default:leftbar: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"
|
|
|
8
8
|
default:leftbar-toggle: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M3.172 4.172C2 5.343 2 7.229 2 11v2c0 3.771 0 5.657 1.172 6.828S6.229 21 10 21h5V3h-5C6.229 3 4.343 3 3.172 4.172" clip-rule="evenodd" opacity=".5"/><path fill="currentColor" d="M5.5 9.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5zm1 4a.75.75 0 0 0 0 1.5h4a.75.75 0 0 0 0-1.5zM22 13v-2c0-3.771 0-5.657-1.172-6.828c-.974-.975-3.192-1.139-5.828-1.166v17.988c2.636-.027 4.854-.191 5.828-1.166C22 18.657 22 16.771 22 13"/></svg>
|
|
9
9
|
default:settings: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="currentColor"><path fill-rule="evenodd" d="M12.4277 2C11.3139 2 10.2995 2.6007 8.27081 3.80211L7.58466 4.20846C5.55594 5.40987 4.54158 6.01057 3.98466 7C3.42773 7.98943 3.42773 9.19084 3.42773 11.5937V12.4063C3.42773 14.8092 3.42773 16.0106 3.98466 17C4.54158 17.9894 5.55594 18.5901 7.58466 19.7915L8.27081 20.1979C10.2995 21.3993 11.3139 22 12.4277 22C13.5416 22 14.5559 21.3993 16.5847 20.1979L17.2708 19.7915C19.2995 18.5901 20.3139 17.9894 20.8708 17C21.4277 16.0106 21.4277 14.8092 21.4277 12.4063V11.5937C21.4277 9.19084 21.4277 7.98943 20.8708 7C20.3139 6.01057 19.2995 5.40987 17.2708 4.20846L16.5847 3.80211C14.5559 2.6007 13.5416 2 12.4277 2Z" clip-rule="evenodd" opacity=".5"/><path d="M12.4277 8.25C10.3567 8.25 8.67773 9.92893 8.67773 12C8.67773 14.0711 10.3567 15.75 12.4277 15.75C14.4988 15.75 16.1777 14.0711 16.1777 12C16.1777 9.92893 14.4988 8.25 12.4277 8.25Z"/></g></svg>
|
|
10
10
|
default:link: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="currentColor"><g opacity=".5"><path d="M19.7388 4.26118C17.0572 1.57961 12.7095 1.57961 10.0279 4.26118L9.30707 4.98203C9.01418 5.27492 9.01418 5.7498 9.30707 6.04269C9.59997 6.33558 10.0748 6.33558 10.3677 6.04269L11.0886 5.32184C13.1844 3.22605 16.5823 3.22605 18.6781 5.32184C20.7739 7.41763 20.7739 10.8156 18.6781 12.9114L17.9573 13.6322C17.6644 13.9251 17.6644 14.4 17.9573 14.6929C18.2502 14.9858 18.725 14.9858 19.0179 14.6929L19.7388 13.972C22.4203 11.2905 22.4203 6.94276 19.7388 4.26118Z"/><path d="M6.04269 9.30707C6.33558 9.59997 6.33558 10.0748 6.04269 10.3677L5.32184 11.0886C3.22605 13.1844 3.22605 16.5823 5.32184 18.6781C7.41763 20.7739 10.8156 20.7739 12.9114 18.6781L13.6322 17.9573C13.9251 17.6644 14.4 17.6644 14.6929 17.9573C14.9858 18.2501 14.9858 18.725 14.6929 19.0179L13.972 19.7388C11.2905 22.4203 6.94276 22.4203 4.26118 19.7388C1.57961 17.0572 1.57961 12.7095 4.26118 10.0279L4.98203 9.30707C5.27492 9.01418 5.7498 9.01418 6.04269 9.30707Z"/></g><path d="M14.6933 9.30707C14.9862 9.59997 14.9862 10.0748 14.6933 10.3677L10.3682 14.6928C10.0753 14.9857 9.60045 14.9857 9.30756 14.6928C9.01467 14.3999 9.01467 13.9251 9.30756 13.6322L13.6327 9.30707C13.9255 9.01418 14.4004 9.01418 14.6933 9.30707Z"/></g></svg>
|
|
11
|
-
default:link-broken: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path d="m10 5.049l.367-.343c2.432-2.275 6.376-2.275 8.809 0s2.432 5.961 0 8.235L16.974 15M14 18.928l-.366.35c-2.422 2.316-6.38 2.286-8.802-.03c-2.398-2.293-2.456-6.033-.091-8.358l.905-.89" opacity=".5"/><path d="M6.587 3L7.5 5.205m-3.998.882L9.05 8.795"/></g></svg>
|
|
12
11
|
default:trash: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="currentColor"><path d="M3 6.38597C3 5.90152 3.34538 5.50879 3.77143 5.50879L6.43567 5.50832C6.96502 5.49306 7.43202 5.11033 7.61214 4.54412C7.61688 4.52923 7.62232 4.51087 7.64185 4.44424L7.75665 4.05256C7.8269 3.81241 7.8881 3.60318 7.97375 3.41617C8.31209 2.67736 8.93808 2.16432 9.66147 2.03297C9.84457 1.99972 10.0385 1.99986 10.2611 2.00002H13.7391C13.9617 1.99986 14.1556 1.99972 14.3387 2.03297C15.0621 2.16432 15.6881 2.67736 16.0264 3.41617C16.1121 3.60318 16.1733 3.81241 16.2435 4.05256L16.3583 4.44424C16.3778 4.51087 16.3833 4.52923 16.388 4.54412C16.5682 5.11033 17.1278 5.49353 17.6571 5.50879H20.2286C20.6546 5.50879 21 5.90152 21 6.38597C21 6.87043 20.6546 7.26316 20.2286 7.26316H3.77143C3.34538 7.26316 3 6.87043 3 6.38597Z"/><path fill-rule="evenodd" d="M9.42543 11.4815C9.83759 11.4381 10.2051 11.7547 10.2463 12.1885L10.7463 17.4517C10.7875 17.8855 10.4868 18.2724 10.0747 18.3158C9.66253 18.3592 9.29499 18.0426 9.25378 17.6088L8.75378 12.3456C8.71256 11.9118 9.01327 11.5249 9.42543 11.4815Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14.5747 11.4815C14.9868 11.5249 15.2875 11.9118 15.2463 12.3456L14.7463 17.6088C14.7051 18.0426 14.3376 18.3592 13.9254 18.3158C13.5133 18.2724 13.2126 17.8855 13.2538 17.4517L13.7538 12.1885C13.795 11.7547 14.1625 11.4381 14.5747 11.4815Z" clip-rule="evenodd"/><path d="M11.5956 22.0001H12.4044C15.1871 22.0001 16.5785 22.0001 17.4831 21.1142C18.3878 20.2283 18.4803 18.7751 18.6654 15.8686L18.9321 11.6807C19.0326 10.1037 19.0828 9.31524 18.6289 8.81558C18.1751 8.31592 17.4087 8.31592 15.876 8.31592H8.12405C6.59127 8.31592 5.82488 8.31592 5.37105 8.81558C4.91722 9.31524 4.96744 10.1037 5.06788 11.6807L5.33459 15.8686C5.5197 18.7751 5.61225 20.2283 6.51689 21.1142C7.42153 22.0001 8.81289 22.0001 11.5956 22.0001Z" opacity=".5"/></g></svg>
|
|
13
12
|
default:rightbar: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6h11m-11 6h11m-11 6h11M4 6h1v4m-1 0h2m0 8H4c0-1 2-2 2-3s-1-1.5-2-1"/></svg>
|
|
14
13
|
default:profile: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="currentColor"><path d="M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20" opacity=".5"/><path d="M12 6a3 3 0 1 0 0 6a3 3 0 0 0 0-6m0 7.5c-3.04 0-5.5 1.57-5.5 3.5c0 .65.28 1.26.77 1.77A7.96 7.96 0 0 0 12 20.5a7.96 7.96 0 0 0 4.73-1.73c.49-.51.77-1.12.77-1.77c0-1.93-2.46-3.5-5.5-3.5"/></g></svg>
|
|
@@ -41,7 +41,8 @@ function layoutDiv() {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
var topicItems = stellar_data('topicIndex.items');
|
|
45
|
+
if (Array.isArray(topicItems) && topicItems.length > 0) {
|
|
45
46
|
if (page.layout == 'index_topic') {
|
|
46
47
|
el += '<a class="active" href="' + pretty_url(stellar_config('profiles.topic.path')) + '">' + __("btn.topic") + '</a>';
|
|
47
48
|
} else {
|
|
@@ -82,7 +82,7 @@ function layoutCollectionStats(apiBase) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
function layoutSiteStats(apiBase) {
|
|
85
|
-
var username = typeof
|
|
85
|
+
var username = typeof brand.ghuser === 'string' ? brand.ghuser.trim() : ''
|
|
86
86
|
if (!username) return ''
|
|
87
87
|
var encodedUsername = encodeURIComponent(username)
|
|
88
88
|
var githubHref = `https://github.com/${encodedUsername}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hexo-theme-stellar",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.4",
|
|
4
4
|
"description": "An all-in-one Hexo theme for blogs, project documentation, knowledge bases, series, and notebooks.",
|
|
5
5
|
"main": "package.json",
|
|
6
6
|
"scripts": {
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"cheerio": "^1.1.0",
|
|
49
|
-
"glob": "^10.4.0",
|
|
50
49
|
"hexo-front-matter": "^4.2.1",
|
|
51
50
|
"hexo-pagination": "^3.0.0",
|
|
52
51
|
"hexo-renderer-ejs": "^2.0.0",
|
|
@@ -57,7 +56,10 @@
|
|
|
57
56
|
},
|
|
58
57
|
"homepage": "https://xaoxuu.com/wiki/stellar/",
|
|
59
58
|
"devDependencies": {
|
|
59
|
+
"@eslint/js": "^9.39.5",
|
|
60
60
|
"eslint": "^9.39.5",
|
|
61
|
+
"glob": "^10.4.0",
|
|
62
|
+
"globals": "^14.0.0",
|
|
61
63
|
"hexo-util": "^4.0.0"
|
|
62
64
|
}
|
|
63
65
|
}
|
package/scripts/helpers/brand.js
CHANGED
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
const { replaceConfigTokens, shouldShowMobileBrand } = require("../lib/brand");
|
|
5
5
|
|
|
6
|
-
hexo.extend.helper.register("brandGithubUsername", function() {
|
|
7
|
-
const username = hexo.stellar.data?.widgets?.ghuser?.username;
|
|
8
|
-
return typeof username === "string" ? username.trim() : "";
|
|
9
|
-
});
|
|
10
|
-
|
|
11
6
|
hexo.extend.helper.register("brandText", function(value) {
|
|
12
7
|
return replaceConfigTokens(value, hexo.config);
|
|
13
8
|
});
|
|
@@ -126,6 +126,7 @@ const brandProperties = {
|
|
|
126
126
|
href: item(["string", "null"], { defaultValue: "/", validator: "nullable_safe_navigation_url" })
|
|
127
127
|
};
|
|
128
128
|
const leftbarBrandProperties = {
|
|
129
|
+
ghuser: item(["string", "null"], { defaultValue: null }),
|
|
129
130
|
style: item("string", { defaultValue: "regular", values: ["regular", "compact"] }),
|
|
130
131
|
...brandProperties
|
|
131
132
|
};
|
|
@@ -123,6 +123,7 @@ const CONTENT_OVERRIDE_DEFINITIONS = [
|
|
|
123
123
|
["leftbar.brand.image.variant", ["string", "null"], literal(null), { values: ["avatar", "icon", "plain", null] }],
|
|
124
124
|
["leftbar.brand.name", ["string", "null"], literal(null)],
|
|
125
125
|
["leftbar.brand.tagline", ["string", "null"], literal(null)],
|
|
126
|
+
["leftbar.brand.ghuser", ["string", "null"], literal(null)],
|
|
126
127
|
["leftbar.brand.href", ["string", "null"], literal(null)],
|
|
127
128
|
["leftbar.menu", ["array", "null"], literal(null), { items: MENU_ITEMS }],
|
|
128
129
|
["leftbar.footer", "object", literal({}), { boundary: "sealed" }],
|
|
@@ -89,6 +89,7 @@ function brandSchema(factory, options = {}) {
|
|
|
89
89
|
const { field, object } = factory;
|
|
90
90
|
const properties = {
|
|
91
91
|
...(options.leftbar ? {
|
|
92
|
+
ghuser: field(["string", "null"], { default: literal(null), example: "xaoxuu" }),
|
|
92
93
|
source: field("string", { default: computed("由 Site 或 Collection Brand 来源解析"), example: "site" }),
|
|
93
94
|
style: field("string", { default: literal("regular"), example: "regular" }),
|
|
94
95
|
backButton: field("boolean", { default: literal(true), example: true }),
|
|
@@ -280,6 +280,12 @@ table a:not([class])
|
|
|
280
280
|
.post-list.topic .post-card.topic .cover:focus-visible
|
|
281
281
|
appearance-editorial-outline-active()
|
|
282
282
|
|
|
283
|
+
// 文章、专栏列表与置顶轮播卡片在普通与交互状态均不显示边框,键盘焦点仍使用 outline。
|
|
284
|
+
:root .post-list .post-card.post,
|
|
285
|
+
:root .post-list.topic .post-card.topic .cover,
|
|
286
|
+
:root .pin-slider
|
|
287
|
+
border: 0
|
|
288
|
+
|
|
283
289
|
.post-list.wiki .wiki-card.no-cover,
|
|
284
290
|
.wiki-card-cover.no-cover,
|
|
285
291
|
.md-text .link-card,
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
display: flex
|
|
39
39
|
align-items: center
|
|
40
40
|
gap: 12px
|
|
41
|
+
font-family: inherit
|
|
42
|
+
font-size: $fs-14
|
|
43
|
+
font-weight: inherit
|
|
41
44
|
line-height: 1.2
|
|
42
45
|
position: relative
|
|
43
46
|
&:hover
|
|
@@ -54,7 +57,6 @@ details[open] > .ui-collection__item
|
|
|
54
57
|
button.ui-collection__item
|
|
55
58
|
border: 0
|
|
56
59
|
appearance: none
|
|
57
|
-
font: inherit
|
|
58
60
|
text-align: start
|
|
59
61
|
cursor: pointer
|
|
60
62
|
|
|
@@ -72,11 +74,18 @@ button.ui-collection__item:not(.is-icon-only)
|
|
|
72
74
|
gap: 4px
|
|
73
75
|
|
|
74
76
|
.ui-collection[data-variant='nav'] .ui-collection__content
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
flex-direction: row
|
|
78
|
+
align-items: center
|
|
79
|
+
gap: 0
|
|
80
|
+
.ui-collection__prefix
|
|
81
|
+
display: inline-flex
|
|
82
|
+
align-items: center
|
|
83
|
+
flex-shrink: 0
|
|
84
|
+
&:after
|
|
85
|
+
flex-shrink: 0
|
|
86
|
+
margin: 0 4px
|
|
78
87
|
.ui-collection__title
|
|
79
|
-
|
|
88
|
+
min-width: 0
|
|
80
89
|
|
|
81
90
|
.ui-collection__prefix
|
|
82
91
|
color: var(--text-p2)
|
|
@@ -95,7 +104,6 @@ button.ui-collection__item:not(.is-icon-only)
|
|
|
95
104
|
|
|
96
105
|
.ui-collection__title
|
|
97
106
|
color: inherit
|
|
98
|
-
font-size: $fs-14
|
|
99
107
|
font-weight: $fw-500
|
|
100
108
|
txt-ellipsis()
|
|
101
109
|
|
|
@@ -103,10 +103,12 @@
|
|
|
103
103
|
|
|
104
104
|
@media screen and (max-width: $device-mobile-max)
|
|
105
105
|
.tag-plugin.okr .okr-item
|
|
106
|
-
grid-template-columns: 2.8rem auto
|
|
106
|
+
grid-template-columns: 2.8rem auto 60px
|
|
107
107
|
grid-column-gap: 0.5rem
|
|
108
108
|
padding: 0.5rem
|
|
109
109
|
.okr-left .title
|
|
110
110
|
padding: 0 0.25rem
|
|
111
|
+
.labels
|
|
112
|
+
justify-content: flex-end
|
|
111
113
|
.label
|
|
112
114
|
txt-ellipsis()
|
package/source/css/_custom.styl
CHANGED
|
@@ -78,7 +78,7 @@ $corner-shape = convert(hexo-config('appearance.shape.corner'))
|
|
|
78
78
|
@media screen and (max-width: $device-tablet)
|
|
79
79
|
--side-content-width: 188px
|
|
80
80
|
@media screen and (max-width: $device-mobile-max)
|
|
81
|
-
--fs-root: 'calc(%s +
|
|
81
|
+
--fs-root: 'calc(%s + 1px)' % $fs-root
|
|
82
82
|
--side-content-width: 224px
|
|
83
83
|
|
|
84
84
|
body[data-page-layout='index_wiki']
|
|
@@ -54,13 +54,7 @@ function setMdLinkIcon(nodes, signal) {
|
|
|
54
54
|
};
|
|
55
55
|
image.src = url.href;
|
|
56
56
|
});
|
|
57
|
-
}, undefined, { service: 'siteinfo', signal }).catch(function() {
|
|
58
|
-
if (signal?.aborted || !el.isConnected) return;
|
|
59
|
-
const icon = el.querySelector('.md-link-icon');
|
|
60
|
-
if (!icon) return;
|
|
61
|
-
icon.innerHTML = ctx.icons['default:link-broken'];
|
|
62
|
-
icon.classList.add('is-broken');
|
|
63
|
-
});
|
|
57
|
+
}, undefined, { service: 'siteinfo', signal }).catch(function() {});
|
|
64
58
|
});
|
|
65
59
|
}
|
|
66
60
|
|