Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/WCY-dt/blog
Browse files Browse the repository at this point in the history
  • Loading branch information
WCY-dt committed Dec 31, 2024
2 parents a5567ef + 74746d5 commit 538eaf9
Show file tree
Hide file tree
Showing 59 changed files with 634 additions and 471 deletions.
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.html]
indent_style = space
indent_size = 2

[*.scss]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
indent_size = 2
2 changes: 1 addition & 1 deletion .github/workflows/update-github-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
with:
token: ${{ secrets.PAT }}
repository: WCY-dt/WCY-dt
event-type: blog-page-updated
event-type: blog-page-updated
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"davidanson.vscode-markdownlint", // Markdown Lint
"ritwickdey.LiveServer", // Live Server
]
}
}
11 changes: 6 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"files.associations": {
"*.html": "liquid",
"*.md": "markdown",
"search.json": "liquid"
},
"[liquid]": {
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.autoIndent": "advanced",
"editor.detectIndentation": false,
"editor.detectIndentation": false
},
"[scss]": {
"editor.tabSize": 2,
Expand All @@ -33,13 +34,13 @@
"MD024": false, // Disable multiple headers with the same content check
"MD026": false, // Disable Trailing punctuation in header check
"MD028": false, // Disable blank line inside blockquote check
"MD033": false, // Disable inline HTML check
"MD033": false // Disable inline HTML check
},
"files.exclude": {
"**/_site": true, // Exclude Jekyll build folder from the file explorer
"**/.sass-cache": true,
"**/.jekyll-cache": true,
"**/.jekyll-metadata": true,
"**/.jekyll-metadata": true
},
"liveServer.settings.root": "/_site", // Assuming '_site' is your Jekyll build directory
}
"liveServer.settings.root": "/_site" // Assuming '_site' is your Jekyll build directory
}
2 changes: 1 addition & 1 deletion 404.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
permalink: /404
layout: 404
---
---
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ end
gem 'tzinfo', '~> 2.0', '>= 2.0.6'
gem 'tzinfo-data', '~> 1.2024', '>= 1.2024.2'

gem 'wdm', '~> 0.2.0' if Gem.win_platform?
gem 'wdm', '~> 0.2.0' if Gem.win_platform?
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ timezone: Asia/Shanghai
# display powered by jekyll in footer
powered_by: false
# the subpath of your site
baseurl:
baseurl:
# the base hostname & protocol for your site
url: https://blog.ch3nyang.top
# OPTIONAL settings: delete the following line if you don't need
Expand Down Expand Up @@ -84,4 +84,4 @@ webrick:
Access-Control-Allow-Origin: "*"
exclude:
- LICENSE.txt
- README.md
- README.md
48 changes: 27 additions & 21 deletions _includes/comment.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
{% if page.comments and site.giscus %}
<div id="comment-container" class="no-select no-print">
<div id='comment-container' class='no-select no-print'>
<h1>Comments</h1>
<script
src="https://giscus.app/client.js"
data-repo="{{ site.giscus.data-repo }}"
data-repo-id="{{ site.giscus.data-repo-id }}"
data-category="Comments"
data-category-id="{{ site.giscus.data-category-id }}"
data-mapping="title"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="{{ site.url }}/assets/css/giscus_light.css"
data-lang="en"
data-loading="lazy"
crossorigin="anonymous"
src='https://giscus.app/client.js'
data-repo='{{ site.giscus.data-repo }}'
data-repo-id='{{ site.giscus.data-repo-id }}'
data-category='Comments'
data-category-id='{{ site.giscus.data-category-id }}'
data-mapping='title'
data-strict='0'
data-reactions-enabled='1'
data-emit-metadata='0'
data-input-position='top'
data-theme='{{ site.url }}/assets/css/giscus_light.css'
data-lang='en'
data-loading='lazy'
crossorigin='anonymous'
async
></script>
</div>
<script>
const commentScript = document.querySelector('#comment-container script');
const commentScript = document.querySelector('#comment-container script')
function setCommentTheme(currentTheme) {
commentScript.setAttribute('data-theme', `{{ site.url }}/assets/css/giscus_${currentTheme}.css`);
commentScript.setAttribute(
'data-theme',
`{{ site.url }}/assets/css/giscus_${currentTheme}.css`
)

const giscusFrame = document.querySelector('.giscus-frame');
const giscusFrame = document.querySelector('.giscus-frame')
if (giscusFrame) {
let giscusFrameSrc = giscusFrame.getAttribute('src');
giscusFrameSrc = giscusFrameSrc.replace(/giscus_(light|dark).css/, `giscus_${currentTheme}.css`);
giscusFrame.src = giscusFrameSrc;
let giscusFrameSrc = giscusFrame.getAttribute('src')
giscusFrameSrc = giscusFrameSrc.replace(
/giscus_(light|dark).css/,
`giscus_${currentTheme}.css`
)
giscusFrame.src = giscusFrameSrc
}
}
</script>
Expand Down
50 changes: 27 additions & 23 deletions _includes/copyright.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
{%- if page.copyrights contains '原创' -%}
<div id="copyright-container">
<div id='copyright-container'>
<img
src="/assets/img/cc.svg"
alt="copyright cc"
class="no-select"
src='/assets/img/cc.svg'
alt='copyright cc'
class='no-select'
>
<img
src="/assets/img/by.svg"
alt="copyright by"
class="no-select"
src='/assets/img/by.svg'
alt='copyright by'
class='no-select'
>
<img
src="/assets/img/nc.svg"
alt="copyright nc"
class="no-select"
src='/assets/img/nc.svg'
alt='copyright nc'
class='no-select'
>
<img
src="/assets/img/sa.svg"
alt="copyright sa"
class="no-select"
src='/assets/img/sa.svg'
alt='copyright sa'
class='no-select'
>
<p
xmlns:cc='http://creativecommons.org/ns#'
xmlns:dct='http://purl.org/dc/terms/'
class='no-print'
>
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/" class="no-print">
<a
property="dct:title"
rel="cc:attributionURL"
href="{{ page.url | absolute_url }}"
property='dct:title'
rel='cc:attributionURL'
href='{{ page.url | absolute_url }}'
>
{{- page.title -}}
</a>
© {{ page.date | date: '%Y' }} by
<a
rel="cc:attributionURL dct:creator"
property="cc:attributionName"
href="{{ site.author.link }}"
rel='cc:attributionURL dct:creator'
property='cc:attributionName'
href='{{ site.author.link }}'
>
{{- site.author.name -}}
</a>
is licensed under
<a
href="https://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1"
target="_blank"
rel="license noopener noreferrer"
href='https://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1'
target='_blank'
rel='license noopener noreferrer'
>CC BY-NC-SA 4.0</a
>
</p>
Expand Down
7 changes: 4 additions & 3 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div id="footer-container">
<div id='footer-container'>
<p>
© {{ site.time | date: '%Y' }}
<a href="{{ site.author.link }}">{{ site.author.name }}</a>. All rights reserved.
<a href='{{ site.author.link }}'>{{ site.author.name }}</a>. All rights
reserved.
{% if site.powered_by %}
Powered by <a href="https://github.com/WCY-dt/tangerine">Tangerine</a>.
Powered by <a href='https://github.com/WCY-dt/tangerine'>Tangerine</a>.
{% endif %}
</p>
</div>
30 changes: 18 additions & 12 deletions _includes/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,33 @@
{%- if post.draft -%}
{%- continue -%}
{%- endif -%}
<a id="pagination-item-container" class="no-select no-print" href="{{ post.url | relative_url }}">
<span id="pagination-item-title">
<a
id='pagination-item-container'
class='no-select no-print'
href='{{ post.url | relative_url }}'
>
<span id='pagination-item-title'>
{% if post.series %}
<div id="pagination-item-series">{{ post.series }} | ({{ post.series_index }})</div>
<div id='pagination-item-series'>
{{ post.series }} | ({{ post.series_index }})
</div>
{% endif %}
<div id="pagination-item-title-text">
<div id='pagination-item-title-text'>
{{ post.title }}
</div>
</span>
<div id="pagination-item-info">
<div id="pagination-item-time">
<span class="material-symbols-outlined"> calendar_month </span>
<div id='pagination-item-info'>
<div id='pagination-item-time'>
<span class='material-symbols-outlined'> calendar_month </span>
{{- post.date | date: site.theme_config.date_format -}}
</div>
<div id="pagination-item-category">
<span class="material-symbols-outlined"> archive </span>
<div id='pagination-item-category'>
<span class='material-symbols-outlined'> archive </span>
{{- post.categories -}}
</div>
<div id="pagination-item-tag">
<div id='pagination-item-tag'>
{% for tag in post.tags %}
<span class="material-symbols-outlined"> tag </span>{{ tag }}
<span class='material-symbols-outlined'> tag </span>{{ tag }}
{% endfor %}
</div>
</div>
Expand All @@ -41,7 +47,7 @@
{%- endunless -%}
{%- endfor -%}

<p id="pagination-count" class="no-select no-print">
<p id='pagination-count' class='no-select no-print'>
{%- if non_draft_posts_count == 0 -%}
- no public post -
{%- elsif non_draft_posts_count == 1 -%}
Expand Down
Loading

0 comments on commit 538eaf9

Please sign in to comment.