feat: updates from the official theme repo

This commit is contained in:
2025-08-22 23:18:52 +09:00
parent cf770b3a38
commit 54be44d4f3
4 changed files with 90 additions and 94 deletions

5
.gitignore vendored
View File

@@ -17,10 +17,11 @@ package-lock.json
# IDE configurations # IDE configurations
.idea .idea
.vscode .vscode/*
!.vscode/settings.json !.vscode/settings.json
!.vscode/extensions.json !.vscode/extensions.json
!.vscode/tasks.json
# Misc # Misc
_sass/dist _sass/vendors
assets/js/dist assets/js/dist

View File

@@ -2,7 +2,7 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.4" gem "jekyll-theme-chirpy", "~> 7.3", ">= 7.3.1"
gem "html-proofer", "~> 5.0", group: :test gem "html-proofer", "~> 5.0", group: :test

View File

@@ -10,7 +10,9 @@ script_includes:
- comment - comment
--- ---
{% include lang.html %} {% include toc-status.html %} {% include lang.html %}
{% include toc-status.html %}
<article class="px-1" data-toc="{{ enable_toc }}"> <article class="px-1" data-toc="{{ enable_toc }}">
<header> <header>
@@ -22,36 +24,40 @@ script_includes:
<div class="post-meta text-muted"> <div class="post-meta text-muted">
<!-- published date --> <!-- published date -->
<span> <span>
{{ site.data.locales[lang].post.posted }} {% include datetime.html {{ site.data.locales[lang].post.posted }}
date=page.date tooltip=true lang=lang %} {% include datetime.html date=page.date tooltip=true lang=lang %}
</span> </span>
<!-- lastmod date --> <!-- lastmod date -->
{% if page.last_modified_at and page.last_modified_at != page.date %} {% if page.last_modified_at and page.last_modified_at != page.date %}
<span> <span>
{{ site.data.locales[lang].post.updated }} {% include datetime.html {{ site.data.locales[lang].post.updated }}
date=page.last_modified_at tooltip=true lang=lang %} {% include datetime.html date=page.last_modified_at tooltip=true lang=lang %}
</span> </span>
{% endif %} {% endif %}
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<!-- author(s) --> <!-- author(s) -->
<span> <span>
{% if page.author %} {% assign authors = page.author %} {% elsif {% if page.author %}
page.authors %} {% assign authors = page.authors %} {% endif %} {{ {% assign authors = page.author %}
site.data.locales[lang].post.written_by }} {% elsif page.authors %}
{% assign authors = page.authors %}
{% endif %}
{{ site.data.locales[lang].post.written_by }}
<em> <em>
{% if authors %} {% for author in authors %} {% if {% if authors %}
site.data.authors[author].url -%} {% for author in authors %}
<a href="{{ site.data.authors[author].url }}" {% if site.data.authors[author].url -%}
>{{ site.data.authors[author].name }}</a <a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
> {%- else -%}
{%- else -%} {{ site.data.authors[author].name }} {%- endif %} {% {{ site.data.authors[author].name }}
unless forloop.last %}{{ '</em {%- endif %}
>, {% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
<em {% endfor %}
>' }}{% endunless %} {% endfor %} {% else %} {% else %}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a> <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
{% endif %} {% endif %}
</em> </em>
@@ -59,8 +65,7 @@ script_includes:
<div> <div>
<!-- pageviews --> <!-- pageviews -->
{% if site.pageviews.provider and {% if site.pageviews.provider and site.analytics[site.pageviews.provider].id %}
site.analytics[site.pageviews.provider].id %}
<span> <span>
<em id="pageviews"> <em id="pageviews">
<i class="fas fa-spinner fa-spin small"></i> <i class="fas fa-spinner fa-spin small"></i>
@@ -77,37 +82,22 @@ script_includes:
</header> </header>
{% if enable_toc %} {% if enable_toc %}
<div <div id="toc-bar" class="d-flex align-items-center justify-content-between invisible">
id="toc-bar"
class="d-flex align-items-center justify-content-between invisible"
>
<span class="label text-truncate">{{ page.title }}</span> <span class="label text-truncate">{{ page.title }}</span>
<button type="button" class="toc-trigger btn me-1"> <button type="button" class="toc-trigger btn me-1">
<i class="fa-solid fa-list-ul fa-fw"></i> <i class="fa-solid fa-list-ul fa-fw"></i>
</button> </button>
</div> </div>
<button <button id="toc-solo-trigger" type="button" class="toc-trigger btn btn-outline-secondary btn-sm">
id="toc-solo-trigger" <span class="label ps-2 pe-1">{{- site.data.locales[lang].panel.toc -}}</span>
type="button"
class="toc-trigger btn btn-outline-secondary btn-sm"
>
<span class="label ps-2 pe-1"
>{{- site.data.locales[lang].panel.toc -}}</span
>
<i class="fa-solid fa-angle-right fa-fw"></i> <i class="fa-solid fa-angle-right fa-fw"></i>
</button> </button>
<dialog id="toc-popup" class="p-0"> <dialog id="toc-popup" class="p-0">
<div <div class="header d-flex flex-row align-items-center justify-content-between">
class="header d-flex flex-row align-items-center justify-content-between"
>
<div class="label text-truncate py-2 ms-4">{{- page.title -}}</div> <div class="label text-truncate py-2 ms-4">{{- page.title -}}</div>
<button <button id="toc-popup-close" type="button" class="btn mx-1 my-1 opacity-75">
id="toc-popup-close"
type="button"
class="btn mx-1 my-1 opacity-75"
>
<i class="fas fa-close"></i> <i class="fas fa-close"></i>
</button> </button>
</div> </div>
@@ -115,7 +105,9 @@ script_includes:
</dialog> </dialog>
{% endif %} {% endif %}
<div class="content">{{ content }}</div> <div class="content">
{{ content }}
</div>
<div class="post-tail-wrapper text-muted"> <div class="post-tail-wrapper text-muted">
<!-- categories --> <!-- categories -->
@@ -123,11 +115,9 @@ script_includes:
<div class="post-meta mb-3"> <div class="post-meta mb-3">
<i class="far fa-folder-open fa-fw me-1"></i> <i class="far fa-folder-open fa-fw me-1"></i>
{% for category in page.categories %} {% for category in page.categories %}
<a <a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/" {%- unless forloop.last -%},{%- endunless -%}
>{{ category }}</a {% endfor %}
>
{%- unless forloop.last -%},{%- endunless -%} {% endfor %}
</div> </div>
{% endif %} {% endif %}
@@ -147,16 +137,21 @@ script_includes:
{% endif %} {% endif %}
<div <div
class="post-tail-bottom d-flex justify-content-between align-items-center mt-5 pb-2" class="
post-tail-bottom
d-flex justify-content-between align-items-center mt-5 pb-2
"
> >
<div class="license-wrapper"> <div class="license-wrapper">
{% if site.data.locales[lang].copyright.license.template %} {% capture {% if site.data.locales[lang].copyright.license.template %}
_replacement %} {% capture _replacement %}
<a href="{{ site.data.locales[lang].copyright.license.link }}"> <a href="{{ site.data.locales[lang].copyright.license.link }}">
{{ site.data.locales[lang].copyright.license.name }} {{ site.data.locales[lang].copyright.license.name }}
</a> </a>
{% endcapture %} {{ site.data.locales[lang].copyright.license.template | {% endcapture %}
replace: ':LICENSE_NAME', _replacement }} {% endif %}
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
{% endif %}
</div> </div>
{% include post-sharing.html lang=lang %} {% include post-sharing.html lang=lang %}

View File

@@ -1,7 +1,7 @@
--- ---
--- ---
@import 'main @use 'main
{%- if jekyll.environment == 'production' -%} {%- if jekyll.environment == 'production' -%}
.bundle .bundle
{%- endif -%} {%- endif -%}