Skip to content

Instantly share code, notes, and snippets.

@haixuanTao
Created March 13, 2023 13:33
Show Gist options
  • Save haixuanTao/5e363b31f4b0433eec40f1a2ad8234c2 to your computer and use it in GitHub Desktop.
Save haixuanTao/5e363b31f4b0433eec40f1a2ad8234c2 to your computer and use it in GitHub Desktop.
## Use `mdbook init --theme` first
## Modify the generated `theme/index.hbs
## Go to <div id="content"> and add below {{ content }
## The script that is generated here: https://giscus.app/
<div id="content" class="content">
<main>
{{{ content }}}
<script src="https://giscus.app/client.js"
data-repo="[ENTER REPO HERE]"
data-repo-id="[ENTER REPO ID HERE]"
data-category="[ENTER CATEGORY NAME HERE]"
data-category-id="[ENTER CATEGORY ID HERE]"
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-theme="preferred_color_scheme"
data-lang="en"
crossorigin="anonymous"
async>
</script>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment