File tree Expand file tree Collapse file tree 6 files changed +182
-0
lines changed
Expand file tree Collapse file tree 6 files changed +182
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ docInfo : false
3+ layout : doc
4+ outline : false
5+ aside : false
6+ docHeader : false
7+ ---
8+
9+ <ForumBlogPostHeader
10+ : title ="params.title"
11+ : date ="params.updatedAt"
12+ : author ="params.author"
13+ : description ="params.description"
14+ />
15+
16+ <!-- @content -->
17+
18+ <ForumTopicFooter prev-page-link =" ./ " :text =" message.forum.topic.backToTeamBlog " />
19+
20+ <div class =" my-2 vp-divider " />
21+
22+ <ForumCommentArea
23+ class="mt-8"
24+ repo="Blog"
25+ v-if="params.commentCount !== -1"
26+ : topic-id ="params.id"
27+ : topic-author-id ="params.author.id"
28+ />
29+
30+ <script setup lang =" ts " >
31+ import { defineClientComponent } from ' vitepress'
32+ import ForumTopicFooter from ' ~/components/forum/topic/ForumTopicFooter.vue'
33+ import ForumBlogPostHeader from ' ~/components/forum/blog/ForumBlogPostHeader.vue'
34+
35+ const ForumCommentArea = defineClientComponent (() => {
36+ return import (' ~/components/forum/ForumCommentArea.vue' )
37+ })
38+
39+ import { useLocalized } from ' @/hooks/useLocalized'
40+
41+ const { message } = useLocalized ()
42+
43+ import { useData } from ' vitepress'
44+
45+ const { params } = useData ()
46+
47+ if (! import .meta.env.SSR) {
48+ document .title = document .title .replace ('VitePress ', params .value .title )
49+ }
50+ < / script>
Original file line number Diff line number Diff line change 1+ import Blog from '../../_data/posts.json'
2+
3+ import type ForumAPI from '../../../.vitepress/theme/apis/forum/api'
4+
5+ export default {
6+ async paths ( ) {
7+ return Blog . map ( ( entry ) => {
8+ return {
9+ params : {
10+ id : entry . id ,
11+ state : entry . state as ForumAPI . TopicState ,
12+ title : entry . title ,
13+ tags : entry . tags ,
14+ createdAt : entry . createdAt ,
15+ updatedAt : entry . updatedAt ,
16+ author : entry . user ,
17+ link : entry . link ,
18+ commentCount : entry . tags
19+ . map ( ( val ) => String ( val ) )
20+ . includes ( 'NO-COMMENT' )
21+ ? - 1
22+ : entry . commentCount ,
23+ } satisfies ForumAPI . PostParams ,
24+ content : entry . contentRaw ,
25+ }
26+ } )
27+ } ,
28+ }
Original file line number Diff line number Diff line change 1+ ---
2+ title : 团队博客
3+ subtext : 了解更多关于地图相关更新资讯和教程
4+ layout : Headline
5+ aside : false
6+ wip : true
7+ ---
8+
9+ <script setup lang =" ts " >
10+ import ForumBlogPage from ' ~/components/forum/blog/ForumBlogPage.vue'
11+ </script >
12+
13+ <ForumBlogPage />
Original file line number Diff line number Diff line change 1+ ---
2+ docInfo : false
3+ layout : doc
4+ outline : false
5+ aside : false
6+ docHeader : false
7+ ---
8+
9+ <ForumBlogPostHeader
10+ : title ="params.title"
11+ : date ="params.updatedAt"
12+ : author ="params.author"
13+ : description ="params.description"
14+ />
15+
16+ <!-- @content -->
17+
18+ <ForumTopicFooter prev-page-link =" ./ " :text =" message.forum.topic.backToTeamBlog " />
19+
20+ <div class =" my-2 vp-divider " />
21+
22+ <ForumCommentArea
23+ class="mt-8"
24+ repo="Blog"
25+ v-if="params.commentCount !== -1"
26+ : topic-id ="params.id"
27+ : topic-author-id ="params.author.id"
28+ />
29+
30+ <script setup lang =" ts " >
31+ import { defineClientComponent } from ' vitepress'
32+ import ForumTopicFooter from ' ~/components/forum/topic/ForumTopicFooter.vue'
33+ import ForumBlogPostHeader from ' ~/components/forum/blog/ForumBlogPostHeader.vue'
34+
35+ const ForumCommentArea = defineClientComponent (() => {
36+ return import (' ~/components/forum/ForumCommentArea.vue' )
37+ })
38+
39+ import { useLocalized } from ' @/hooks/useLocalized'
40+
41+ const { message } = useLocalized ()
42+
43+ import { useData } from ' vitepress'
44+
45+ const { params } = useData ()
46+
47+ if (! import .meta.env.SSR) {
48+ document .title = document .title .replace ('VitePress ', params .value .title )
49+ }
50+ < / script>
Original file line number Diff line number Diff line change 1+ import Blog from '../../_data/posts.json'
2+
3+ import type ForumAPI from '../../../.vitepress/theme/apis/forum/api'
4+
5+ export default {
6+ async paths ( ) {
7+ return Blog . map ( ( entry ) => {
8+ return {
9+ params : {
10+ id : entry . id ,
11+ state : entry . state as ForumAPI . TopicState ,
12+ title : entry . title ,
13+ tags : entry . tags ,
14+ createdAt : entry . createdAt ,
15+ updatedAt : entry . updatedAt ,
16+ author : entry . user ,
17+ link : entry . link ,
18+ commentCount : entry . tags
19+ . map ( ( val ) => String ( val ) )
20+ . includes ( 'NO-COMMENT' )
21+ ? - 1
22+ : entry . commentCount ,
23+ } satisfies ForumAPI . PostParams ,
24+ content : entry . contentRaw ,
25+ }
26+ } )
27+ } ,
28+ }
Original file line number Diff line number Diff line change 1+ ---
2+ title : 团队博客
3+ subtext : 了解更多关于地图相关更新资讯和教程
4+ layout : Headline
5+ aside : false
6+ wip : true
7+ ---
8+
9+ <script setup lang =" ts " >
10+ import ForumBlogPage from ' ~/components/forum/blog/ForumBlogPage.vue'
11+ </script >
12+
13+ <ForumBlogPage />
You can’t perform that action at this time.
0 commit comments