We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11ceb7a commit 8185454Copy full SHA for 8185454
src/pages/[slug].astro
@@ -1,7 +1,9 @@
1
---
2
import { CollectionEntry, getCollection } from 'astro:content'
3
4
+import Disqus from '@/components/Disqus.astro'
5
import PostLayout from '@/layouts/PostLayout.astro'
6
+import { getPluginConfig, isPluginEnabled } from '@/utils/plugin'
7
8
export async function getStaticPaths() {
9
const allPosts = await getCollection('leetcode-solutions')
@@ -23,4 +25,14 @@ const { Content } = await entry.render()
23
25
24
26
<PostLayout frontmatter={entry.data}>
27
<Content />
28
+ {
29
+ isPluginEnabled('disqus') && (
30
+ <Disqus
31
+ slot="post-footer"
32
+ {...getPluginConfig('disqus')}
33
+ pageURL={Astro.url.href}
34
+ pageIdentifier={Astro.url.pathname}
35
+ />
36
+ )
37
+ }
38
</PostLayout>
0 commit comments