Skip to content

Commit

Permalink
feat: support the discussion for each episode
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Oct 9, 2022
1 parent 61c522d commit ea0de28
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pnpm dev
- PWA
- favicon
- 搜索
- 评论 (TBD)

## License

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"lint:fix": "eslint --ext .js,.ts,.vue . --fix"
},
"dependencies": {
"@giscus/vue": "^2.2.0",
"@vueuse/core": "^9.3.0",
"@vueuse/head": "^0.9.7",
"date-fns": "^2.29.3",
Expand Down
46 changes: 46 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/components/episode-content.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import Giscus from '@giscus/vue'
import { getAllEpisode } from '../utils/episode'
const episodes = getAllEpisode()
Expand All @@ -16,5 +17,22 @@ const episode = $computed(() => episodes.find((episode) => episode.id === id))
</div>

<component :is="episode.default" />

<Giscus
id="comments"
repo="opensource-f2f/website"
repo-id="R_kgDOH62a3Q="
category="General"
category-id="DIC_kwDOH62a3c4CR4dr"
mapping="pathname"
term="欢迎来到《开源面对面》"
reactions-enabled="1"
emit-metadata="0"
input-position="top"
theme="preferred_color_scheme"
lang="zh-CN"
crossorigin="anonymous"
loading="lazy"
/>
</div>
</template>

0 comments on commit ea0de28

Please sign in to comment.