Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ nav:

theme:
name: material
custom_dir: overrides
language: zh
features:
- search.highlight
Expand Down Expand Up @@ -143,3 +144,4 @@ extra_javascript:
# - https://polyfill.io/v3/polyfill.min.js?features=es6
- https://polyfill.alicdn.com/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

37 changes: 37 additions & 0 deletions docs/overrides/partials/content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- 原有页面内容 -->
{{ page.content }}

<!-- Giscus 评论区 -->
{% if page and page.meta and page.meta.comments != false %}
{# 可选:如果 MD 文件开头有 --- comments: false ---,则隐藏 #}
{% endif %}
<h2 id="__comments">讨论区</h2>
<div class="giscus"></div>

<!-- Giscus 脚本 -->
<script src="https://giscus.app/client.js"
data-repo="oceanbase/miniob"
data-category="Comments"
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="zh-CN"
crossorigin="anonymous"
async>
</script>

<!-- 可选:自定义 CSS(嵌入 style 标签) -->
<style>
.giscus {
margin-top: 2em;
border: 1px solid #e1e4e8;
border-radius: 8px;
}
.giscus-frame {
width: 100%;
height: 500px; /* 可调整高度 */
}
</style>