Skip to content

Commit

Permalink
📃 docs: 文档修改
Browse files Browse the repository at this point in the history
  • Loading branch information
白云苍狗 committed May 28, 2024
1 parent f9b244a commit e4fa4da
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 6 deletions.
5 changes: 5 additions & 0 deletions demo/_config.async.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ top_bars:
url: /
- title: menu.archives
url: /archives/
children:
- title: 标签
url: /tags/
- title: 分类
url: /categories/
- title: menu.links
url: /links/
- title: menu.about
Expand Down
5 changes: 5 additions & 0 deletions demo/source/categories/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 分类
date: 2019-11-16 10:46:27
layout: category
---
33 changes: 29 additions & 4 deletions docs/.vitepress/assets/log.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
[
{
"large_version": "v2.2.x",
"children": [
{
"version": "2.2.1",
"date": "2023-05-28",
"logs": [
{
"type": "style",
"text": "优化二级菜单居中 #d122"
}
]
},
{
"version": "2.2.0",
"date": "2023-05-23",
"logs": [
{
"type": "style",
"text": "卡片样式风格调整"
}
]
}
]
},
{
"large_version": "v2.1.x",
"children": [
Expand Down Expand Up @@ -32,7 +57,7 @@
"logs": [
{
"type": "feat",
"text": "404 添加配置 <a href='https://github.com/MaLuns/hexo-theme-async/issues/117' target='_blank' rel='noreferrer'>#117</a>"
"text": "404 添加配置 #117"
}
]
},
Expand Down Expand Up @@ -269,7 +294,7 @@
"logs": [
{
"type": "fix",
"text": "修复标题样式 (<a href='https://github.com/MaLuns/hexo-theme-async/issues/68'>#68</a>)"
"text": "修复标题样式 (#68)"
}
]
},
Expand All @@ -279,7 +304,7 @@
"logs": [
{
"type": "fix",
"text": "修复 Google Analytics 地址(<a href='https://github.com/MaLuns/hexo-theme-async/issues/64'>#64</a>)"
"text": "修复 Google Analytics 地址(#64)"
}
]
},
Expand Down Expand Up @@ -665,7 +690,7 @@
},
{
"type": "fix",
"text": "窗体大小变化时,滚动插件未刷新 (详情见:<a href='https://github.com/MaLuns/hexo-theme-async/issues/9' target='_blank' rel='noreferrer'>issues</a>"
"text": "窗体大小变化时,滚动插件未刷新 (详情见:#9"
}
]
},
Expand Down
19 changes: 17 additions & 2 deletions docs/.vitepress/components/ChangeLog.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script setup>
import { computed } from "vue";
const types = {
feat: "",
fix: "🐞",
Expand All @@ -7,20 +9,33 @@ const types = {
style: "🌈",
docs: "📃",
};
defineProps({
const props = defineProps({
type: String,
text: {
type: String,
default: "",
},
});
const htmlstr = computed(() => {
return props.text
.replace(/#d\d{1,}/, p => {
const id = p.replace(/#d/, "");
return `<a href='https://github.com/MaLuns/hexo-theme-async/discussions/${id}' target='_blank' rel='noreferrer'>#${id}</a>`;
})
.replace(/#\d{1,}/, p => {
const id = p.replace(/#/, "");
return `<a href='https://github.com/MaLuns/hexo-theme-async/issues/${id}' target='_blank' rel='noreferrer'>#${id}</a>`;
});
});
</script>

<template>
<li class="log" :class="type" :title="type">
<slot>
<span class="type">{{ types[type] }}:</span>
<span v-html="text"></span>
<span v-html="htmlstr"></span>
</slot>
</li>
</template>
Expand Down

0 comments on commit e4fa4da

Please sign in to comment.