mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 13:44:15 +00:00
Compare commits
12 Commits
b48ea68bf7
...
v7.3.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0e4756200 | ||
|
|
81886b11c0 | ||
|
|
7615d72e93 | ||
|
|
53770e4923 | ||
|
|
d84b72706a | ||
|
|
519e4f193a | ||
|
|
d0f8f9553e | ||
|
|
401e2af0f8 | ||
|
|
ada38aad96 | ||
|
|
61ae6cced8 | ||
|
|
9f38a2dead | ||
|
|
23d953c313 |
@@ -213,7 +213,7 @@ exclude:
|
||||
- README.md
|
||||
- LICENSE
|
||||
- purgecss.js
|
||||
- rollup.config.js
|
||||
- "*.config.js"
|
||||
- "package*.json"
|
||||
|
||||
jekyll-archives:
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<!-- Bootstrap -->
|
||||
{% unless jekyll.environment == 'production' %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css">
|
||||
{% endunless %}
|
||||
|
||||
<!-- Theme style -->
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
{% if page.math %}
|
||||
<!-- MathJax -->
|
||||
<script async src="{{ '/assets/js/data/mathjax.js' | relative_url }}"></script>
|
||||
<script src="{{ '/assets/js/data/mathjax.js' | relative_url }}"></script>
|
||||
<script async src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
|
||||
<script id="MathJax-script" async src="{{ site.data.origin[type].mathjax.js | relative_url }}"></script>
|
||||
{% endif %}
|
||||
|
||||
@@ -2,24 +2,29 @@
|
||||
Get post description or generate it from the post content.
|
||||
{%- endcomment -%}
|
||||
|
||||
{%- assign max_length = include.max_length | default: 200 -%}
|
||||
|
||||
{%- capture description -%}
|
||||
{%- if post.description -%}
|
||||
{{- post.description -}}
|
||||
{%- else -%}
|
||||
{% comment %}
|
||||
Remove the line number of the code snippet.
|
||||
{% endcomment %}
|
||||
{% assign content = post.content %}
|
||||
{%- if post.description -%}
|
||||
{{- post.description -}}
|
||||
{%- else -%}
|
||||
{% comment %}
|
||||
Remove the line number of the code snippet.
|
||||
{% endcomment %}
|
||||
{%- assign content = post.content -%}
|
||||
|
||||
{% if content contains '<td class="rouge-gutter gl"><pre class="lineno">' %}
|
||||
{% assign content = content | replace: '<td class="rouge-gutter gl"><pre class="lineno">', '<!-- <td class="rouge-gutter gl"><pre class="lineno">'%}
|
||||
{% assign content = content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' %}
|
||||
{% endif %}
|
||||
{%- if content contains '<td class="rouge-gutter gl"><pre class="lineno">' -%}
|
||||
{%- assign content = content | replace: '<td class="rouge-gutter gl"><pre class="lineno">', '<!-- <td class="rouge-gutter gl"><pre class="lineno">' -%}
|
||||
{%- assign content = content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' -%}
|
||||
{%- endif -%}
|
||||
|
||||
{{- content | markdownify | strip_html | newline_to_br | replace: '<br />', ' ' | strip_newlines -}}
|
||||
{%- endif -%}
|
||||
{{- content | strip_html | newline_to_br | replace: '<br />', ' ' | strip_newlines -}}
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
|
||||
{{- description | strip | truncate: max_length | escape -}}
|
||||
{%- if include.json -%}
|
||||
{%- assign description = description | jsonify -%}
|
||||
{%- else -%}
|
||||
{%- assign max_length = include.max_length | default: 200 -%}
|
||||
{%- assign description = description | strip | truncate: max_length -%}
|
||||
{%- endif -%}
|
||||
|
||||
{{- description -}}
|
||||
|
||||
@@ -88,9 +88,41 @@
|
||||
{% endfor %}
|
||||
|
||||
<!-- take out classes -->
|
||||
{% assign _wrapper_class = '' %}
|
||||
|
||||
{% if _class %}
|
||||
{% capture _old_class %}class="{{ _class }}"{% endcapture %}
|
||||
{% assign _left = _left | remove: _old_class %}
|
||||
{% assign _remain = _class %}
|
||||
{% assign _class_array = _class | split: ' ' %}
|
||||
|
||||
{% for c in _class_array %}
|
||||
{% assign _pick = false %}
|
||||
|
||||
{% case c %}
|
||||
{% when 'preview-img', 'normal', 'left', 'right', 'light', 'dark' %}
|
||||
{% assign _pick = true %}
|
||||
{% else %}
|
||||
{% if c contains '-' %}
|
||||
{% assign start = c | split: '-' | first %}
|
||||
{% if start == 'w' %}
|
||||
{% assign _pick = true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endcase %}
|
||||
|
||||
{% if _pick %}
|
||||
{% assign _remain = _remain | remove: c | strip %}
|
||||
{% assign _wrapper_class = _wrapper_class | append: ' ' | append: c %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% unless _wrapper_class == '' %}
|
||||
{% capture _old_class %}class="{{ _class }}"{% endcapture %}
|
||||
{% assign _left = _left | remove: _old_class %}
|
||||
{% unless _remain == '' %}
|
||||
{% capture _new_class %}class="{{ _remain }}"{% endcapture %}
|
||||
{% assign _left = _left | append: _new_class %}
|
||||
{% endunless %}
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
|
||||
{% assign _final_src = null %}
|
||||
@@ -110,7 +142,7 @@
|
||||
|
||||
{% if _lqip %}
|
||||
{% assign _lazyload = false %}
|
||||
{% assign _class = _class | append: ' blur' %}
|
||||
{% assign _wrapper_class = _wrapper_class | append: ' blur' %}
|
||||
|
||||
{% unless _lqip contains 'data:' %}
|
||||
{% assign _lqip_alt = 'lqip="' | append: _path_prefix %}
|
||||
@@ -121,7 +153,7 @@
|
||||
{% assign _left = _left | replace: 'src=', 'data-src=' | replace: ' lqip=', ' data-lqip="true" src=' %}
|
||||
|
||||
{% else %}
|
||||
{% assign _class = _class | append: ' shimmer' %}
|
||||
{% assign _wrapper_class = _wrapper_class | append: ' shimmer' %}
|
||||
{% endif %}
|
||||
|
||||
<!-- lazy-load images -->
|
||||
@@ -153,8 +185,8 @@
|
||||
{% assign _wrapper_start = _final_src
|
||||
| default: _src
|
||||
| prepend: '<a href="'
|
||||
| append: '" class="popup img-link '
|
||||
| append: _class
|
||||
| append: '" class="popup img-link'
|
||||
| append: _wrapper_class
|
||||
| append: '">'
|
||||
%}
|
||||
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
layout: page
|
||||
title: "404: Page not found"
|
||||
permalink: /404.html
|
||||
|
||||
redirect_from:
|
||||
- /norobots/
|
||||
- /assets/
|
||||
- /posts/
|
||||
---
|
||||
|
||||
{% include lang.html %}
|
||||
|
||||
<p class="lead">{{ site.data.locales[lang].not_found.statement }}</p>
|
||||
<p class="lead">{{ site.data.locales[lang].not_found.statement }}</p>
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
---
|
||||
|
||||
/* prettier-ignore */
|
||||
@use 'main
|
||||
{%- if jekyll.environment == 'production' -%}
|
||||
.bundle
|
||||
|
||||
@@ -5,16 +5,13 @@ swcache: true
|
||||
|
||||
[
|
||||
{% for post in site.posts %}
|
||||
{%- capture description -%}
|
||||
{% include post-description.html %}
|
||||
{%- endcapture -%}
|
||||
{
|
||||
"title": {{ post.title | jsonify }},
|
||||
"url": {{ post.url | relative_url | jsonify }},
|
||||
"categories": {{ post.categories | join: ', ' | jsonify }},
|
||||
"tags": {{ post.tags | join: ', ' | jsonify }},
|
||||
"date": "{{ post.date }}",
|
||||
"content": "{{ description }}"
|
||||
"date": {{ post.date | jsonify }},
|
||||
"content": {% include post-description.html json=true %}
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
Submodule assets/lib updated: b9e18a1510...02f4ada65d
@@ -1,5 +1,33 @@
|
||||
# Changelog
|
||||
|
||||
## [7.3.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.3.0...v7.3.1) (2025-07-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* escape special JSON characters in search results ([#2481](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2481)) ([7615d72](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7615d72e9300a1514ef2fc8ec941ab2974ba7eb4))
|
||||
|
||||
## [7.3.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.4...v7.3.0) (2025-05-18)
|
||||
|
||||
### Features
|
||||
|
||||
* **i18n:** add Catalan Spanish locale translation ([#2349](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2349)) ([167c98c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/167c98c781d0607c90ede8fc73eb43dffeea6abd))
|
||||
* **i18n:** add Dutch locale ([#2076](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2076)) ([981ddba](https://github.com/cotes2020/jekyll-theme-chirpy/commit/981ddba30e57934f9056b8d468f0d17db131e1e8))
|
||||
* **i18n:** add Japanese locale ([#2295](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2295)) ([571c90f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/571c90f13011eb91d0e1392218f3953060b920c9))
|
||||
* **i18n:** add persian language ([#2238](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2238)) ([7d4d35c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7d4d35cd10109e78d60fbb6b25a9b205f780ad63))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* avoid `mathjax` loading failure on page refresh ([#2389](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2389)) ([401e2af](https://github.com/cotes2020/jekyll-theme-chirpy/commit/401e2af0f8a173d8437e03027c7aff558e8c0bde))
|
||||
* improve accuracy of moving `img` element classes ([#2399](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2399)) ([d0f8f95](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d0f8f9553e41536eb84ae2fdd3f3bc9d13f7ef8c))
|
||||
* prevent the search bar from moving when focused ([#2336](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2336)) ([f744929](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f7449299e88c71da2104f0007f2db23a8fa798be))
|
||||
* recognize global theme mode ([#2357](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2357)) ([7708adb](https://github.com/cotes2020/jekyll-theme-chirpy/commit/7708adbf30e6dea51a84311b86bc224739f656f6))
|
||||
* **search:** avoid missing spaces between paragraphs in search results ([#2199](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2199)) ([0eb7efa](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0eb7efa7f53508bf6b48eb9d773d5c5047c3c525))
|
||||
* **ui:** fix incomplete border color on hover for tags ([#2359](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2359)) ([c626447](https://github.com/cotes2020/jekyll-theme-chirpy/commit/c62644759cb4e0e07f7ee6eb9503ef69be62371b))
|
||||
|
||||
### Improvements
|
||||
|
||||
* **seo:** improve accessibility and aligns with best practices ([#2289](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2289)) ([54d4d59](https://github.com/cotes2020/jekyll-theme-chirpy/commit/54d4d59d22ac543a14bfbd9bb3d6fb6756056041))
|
||||
|
||||
## [7.2.4](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.3...v7.2.4) (2024-12-21)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
5
eslint.config.js
Normal file
5
eslint.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default [
|
||||
{
|
||||
files: ['_javascript/**/*.js']
|
||||
}
|
||||
];
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "jekyll-theme-chirpy"
|
||||
spec.version = "7.2.4"
|
||||
spec.version = "7.3.1"
|
||||
spec.authors = ["Cotes Chung"]
|
||||
spec.email = ["cotes.chung@gmail.com"]
|
||||
|
||||
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
|
||||
|
||||
spec.add_runtime_dependency "jekyll", "~> 4.3"
|
||||
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
|
||||
spec.add_runtime_dependency "jekyll-redirect-from", "~> 0.16"
|
||||
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.8"
|
||||
spec.add_runtime_dependency "jekyll-archives", "~> 2.2"
|
||||
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4"
|
||||
|
||||
30
package.json
30
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jekyll-theme-chirpy",
|
||||
"version": "7.2.4",
|
||||
"version": "7.3.1",
|
||||
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -25,29 +25,29 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"bootstrap": "^5.3.3"
|
||||
"bootstrap": "^5.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.26.0",
|
||||
"@babel/plugin-transform-class-properties": "^7.25.9",
|
||||
"@babel/plugin-transform-private-methods": "^7.25.9",
|
||||
"@babel/preset-env": "^7.26.0",
|
||||
"@commitlint/cli": "^19.6.0",
|
||||
"@commitlint/config-conventional": "^19.6.0",
|
||||
"@babel/core": "^7.27.1",
|
||||
"@babel/plugin-transform-class-properties": "^7.27.1",
|
||||
"@babel/plugin-transform-private-methods": "^7.27.1",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@rollup/plugin-babel": "^6.0.4",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/exec": "^6.0.3",
|
||||
"@semantic-release/exec": "^7.1.0",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"concurrently": "^9.1.0",
|
||||
"concurrently": "^9.1.2",
|
||||
"conventional-changelog-conventionalcommits": "^8.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"purgecss": "^7.0.2",
|
||||
"rollup": "^4.27.4",
|
||||
"semantic-release": "^24.2.0",
|
||||
"stylelint": "^16.10.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0"
|
||||
"rollup": "^4.41.0",
|
||||
"semantic-release": "^24.2.4",
|
||||
"stylelint": "^16.19.1",
|
||||
"stylelint-config-standard-scss": "^15.0.1"
|
||||
},
|
||||
"prettier": {
|
||||
"trailingComma": "none"
|
||||
|
||||
@@ -80,7 +80,7 @@ export default [
|
||||
build('page'),
|
||||
build('post'),
|
||||
build('misc'),
|
||||
build('theme', { src: `${SRC_DEFAULT}/modules`, outputName: 'Theme' }),
|
||||
build('theme', { outputName: 'Theme' }),
|
||||
build('app', { src: SRC_PWA, jekyll: true }),
|
||||
build('sw', { src: SRC_PWA, jekyll: true })
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user