@sugarat/theme 0.1.31 → 0.1.32
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/node.d.ts +1 -0
- package/node.js +4 -0
- package/package.json +1 -1
- package/src/components/BlogList.vue +1 -1
- package/src/composables/config/index.ts +2 -0
- package/src/node.ts +8 -0
- package/src/styles/index.scss +21 -0
package/node.d.ts
CHANGED
package/node.js
CHANGED
|
@@ -279,6 +279,10 @@ function getThemeConfig(cfg) {
|
|
|
279
279
|
const wordCount = 100;
|
|
280
280
|
meta.description = meta.description || getTextSummary(fileContent, wordCount);
|
|
281
281
|
meta.cover = meta.cover || fileContent.match(/[!]\[.*?\]\((https:\/\/.+)\)/)?.[1] || "";
|
|
282
|
+
if (meta.publish === false) {
|
|
283
|
+
meta.hidden = true;
|
|
284
|
+
meta.recommend = false;
|
|
285
|
+
}
|
|
282
286
|
return {
|
|
283
287
|
route: `/${route}`,
|
|
284
288
|
meta
|
package/package.json
CHANGED
|
@@ -51,7 +51,7 @@ const activeTag = useActiveTag()
|
|
|
51
51
|
const activeTagLabel = computed(() => activeTag.value.label)
|
|
52
52
|
|
|
53
53
|
const wikiList = computed(() => {
|
|
54
|
-
const topList = docs.value.filter((v) => !!v.meta.top)
|
|
54
|
+
const topList = docs.value.filter((v) => !v.meta.hidden && !!v.meta.top)
|
|
55
55
|
topList.sort((a, b) => {
|
|
56
56
|
const aTop = a?.meta?.top
|
|
57
57
|
const bTop = b?.meta.top
|
package/src/node.ts
CHANGED
|
@@ -48,6 +48,7 @@ export function getThemeConfig(cfg?: Partial<Theme.BlogConfig>) {
|
|
|
48
48
|
const meta: Partial<Theme.PageMeta> = {
|
|
49
49
|
...matter(fileContent).data
|
|
50
50
|
}
|
|
51
|
+
|
|
51
52
|
if (!meta.title) {
|
|
52
53
|
meta.title = getDefaultTitle(fileContent)
|
|
53
54
|
}
|
|
@@ -85,6 +86,13 @@ export function getThemeConfig(cfg?: Partial<Theme.BlogConfig>) {
|
|
|
85
86
|
meta.cover ||
|
|
86
87
|
fileContent.match(/[!]\[.*?\]\((https:\/\/.+)\)/)?.[1] ||
|
|
87
88
|
''
|
|
89
|
+
|
|
90
|
+
// 是否发布 默认发布
|
|
91
|
+
if (meta.publish === false) {
|
|
92
|
+
meta.hidden = true
|
|
93
|
+
meta.recommend = false
|
|
94
|
+
}
|
|
95
|
+
|
|
88
96
|
return {
|
|
89
97
|
route: `/${route}`,
|
|
90
98
|
meta
|
package/src/styles/index.scss
CHANGED
|
@@ -103,3 +103,24 @@ html[class='dark'] {
|
|
|
103
103
|
word-break: break-all;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
::-webkit-scrollbar {
|
|
108
|
+
width: 5px;
|
|
109
|
+
height: 5px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
::-webkit-scrollbar-track-piece {
|
|
113
|
+
background-color: rgba(0, 0, 0, 0);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
::-webkit-scrollbar-thumb:vertical {
|
|
117
|
+
height: 5px;
|
|
118
|
+
border-radius: 4px;
|
|
119
|
+
background-color: var(--el-color-primary);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
::-webkit-scrollbar-thumb:horizontal {
|
|
123
|
+
width: 5px;
|
|
124
|
+
border-radius: 4px;
|
|
125
|
+
background-color: var(--el-color-primary);
|
|
126
|
+
}
|