diff --git a/_config.yml b/_config.yml
index 7cab47c..87494a1 100644
--- a/_config.yml
+++ b/_config.yml
@@ -7,6 +7,13 @@ description: Mayx's Home Page
timezone: Asia/Shanghai
excerpt_separator:
paginate: 7
+kramdown:
+ syntax_highlighter_opts:
+ span:
+ line_numbers: false
+ block:
+ line_numbers: true
+ start_line: 1
plugins:
- jekyll-sitemap
- jekyll-feed
diff --git a/_layouts/default.html b/_layouts/default.html
index 7dd847f..303c26f 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -129,7 +129,7 @@
diff --git a/_layouts/post.html b/_layouts/post.html
index 2207fae..a1e72b5 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -26,7 +26,6 @@ layout: default
{% if page.layout != "encrypt" %}
-
AI摘要
{% assign ai_cache = site.data.ai-cache[page.url] %}{% if ai_cache %}{{ ai_cache }}{% else %}正在生成中……{% endif %}
{% unless ai_cache %}
@@ -72,7 +71,6 @@ layout: default
{% endunless %}
-
{% endif %}
{% include toc.html html=content sanitize=true h_max=3 %}
diff --git a/assets/css/style.scss b/assets/css/style.scss
index b59d669..5d7a616 100644
--- a/assets/css/style.scss
+++ b/assets/css/style.scss
@@ -99,4 +99,19 @@ div.highlight button:active,
div.highlight button:focus,
div.highlight button:hover {
opacity: 1
+}
+
+table.rouge-table {
+ margin: 0;
+}
+
+td.rouge-gutter,
+td.rouge-code {
+ padding: 0;
+ border-bottom: none;
+}
+
+pre.lineno {
+ padding: 0 10px 0 0;
+ border: none;
}
\ No newline at end of file
diff --git a/assets/js/main.js b/assets/js/main.js
index faac621..72fe6f0 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -88,7 +88,7 @@ codeBlocks.forEach(function (codeBlock) {
codeBlock.append(copyButton);
copyButton.addEventListener('click', function () {
- var code = codeBlock.querySelector('pre code').innerText.trim();
+ var code = codeBlock.querySelector('.rouge-code pre').innerText.trim();
window.navigator.clipboard.writeText(code)
.then(() => {
copyButton.innerText = '✅';