mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
feat(doc): add comment section
This commit is contained in:
41
docs/src/components/Content.astro
Normal file
41
docs/src/components/Content.astro
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
import type { Props } from '@astrojs/starlight/props';
|
||||
import Default from '@astrojs/starlight/components/MarkdownContent.astro';
|
||||
|
||||
const slug = Astro.props.slug;
|
||||
const renderCommentSection = !(['', 'challenges/testing', 'challenges/angular-performance']).includes(slug)
|
||||
---
|
||||
|
||||
|
||||
<Default {...Astro.props}><slot /></Default>
|
||||
|
||||
|
||||
<div class="border-t"></div>
|
||||
|
||||
{ renderCommentSection
|
||||
?
|
||||
<script src="https://giscus.app/client.js"
|
||||
data-repo="tomalaforge/angular-challenges"
|
||||
data-repo-id="R_kgDOIXXIfw"
|
||||
data-category="Announcements"
|
||||
data-category-id="DIC_kwDOIXXIf84CSZF_"
|
||||
data-mapping="title"
|
||||
data-strict="0"
|
||||
data-reactions-enabled="1"
|
||||
data-emit-metadata="0"
|
||||
data-input-position="bottom"
|
||||
data-theme="preferred_color_scheme"
|
||||
data-lang="en"
|
||||
data-loading="lazy"
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
: ``}
|
||||
|
||||
<style>
|
||||
.border-t {
|
||||
border-top: solid 1px rgb(36, 37, 38);
|
||||
margin: 3rem 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user