laplacetw / blog-comments

0 stars 0 forks source link

使用VitePress和GitHub Pages建立部落格 | LaplaceTW #3

Open utterances-bot opened 4 months ago

utterances-bot commented 4 months ago

使用VitePress和GitHub Pages建立部落格 | LaplaceTW

A personal blog powered by VitePress

https://laplace.tw/posts/quick-build-blog-with-vitepress

Mr54233 commented 4 months ago

大佬,你这个分类和归档是怎么做的

laplacetw commented 3 months ago

基本上就是使用VitePress的 Data Loader API - createContentLoader 載入posts的數據,有了數據就看我們怎麼使用了。

實作的話,你可以參考我部落格主題的 posts.data.tsCategory.vueArchives.vue,分類頁面還有搭配一個簡單的 store 狀態管理做動態切換。