feat(doc): add comment section

This commit is contained in:
thomas
2023-10-13 21:22:53 +02:00
parent a382701e62
commit ffba1ecf78
7 changed files with 591 additions and 138 deletions

View 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>