summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormayx <mayx@outlook.com>2025-04-17 05:51:49 +0200
committermayx <mayx@outlook.com>2025-04-17 05:51:49 +0200
commit9f2bed804edb18f5fca4ed27a2121943c64c6022 (patch)
treedbe87d16c5ec459c17b35005ff2bf7c770116cd0
parent8211f6d1a2f152fe8a1f5d81382d0947e9b7ad07 (diff)
Update 5 files
- /_config.yml - /assets/css/style.scss - /assets/js/main.js - /_layouts/default.html - /_layouts/post.html
-rw-r--r--_config.yml7
-rw-r--r--_layouts/default.html2
-rw-r--r--_layouts/post.html2
-rw-r--r--assets/css/style.scss15
-rw-r--r--assets/js/main.js2
5 files changed, 24 insertions, 4 deletions
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: <!--more-->
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 @@
<!-- <![endif]-->
<footer>
<p>
- <small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.toLocaleString());</script><br /> 总字数:{% include_cached word_count.html %} - 文章数:{{ site.posts.size }} - <a href="{{ site.feed.path | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
+ <small>Made with ❤ by Mayx<br />Last updated at {{ site.time | date: "%F %T" }}<br /> 总字数:{% include_cached word_count.html %} - 文章数:{{ site.posts.size }} - <a href="{{ site.feed.path | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
</p>
</footer>
</div>
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
<hr />
{% if page.layout != "encrypt" %}
-<!--[if !IE]> -->
<b>AI摘要</b>
<p id="ai-output">{% assign ai_cache = site.data.ai-cache[page.url] %}{% if ai_cache %}{{ ai_cache }}{% else %}正在生成中……{% endif %}</p>
{% unless ai_cache %}
@@ -72,7 +71,6 @@ layout: default
</script>
{% endunless %}
<hr />
-<!-- <![endif]-->
{% 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 = '✅';