mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2026-03-22 19:08:15 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d15b898c72 | ||
|
|
525c2888c5 | ||
|
|
4950edc75e | ||
|
|
66bf232951 | ||
|
|
37377a43e0 | ||
|
|
7f35d8e550 |
@@ -15,9 +15,7 @@
|
|||||||
{%- if url -%}
|
{%- if url -%}
|
||||||
{% unless url contains ':' %}
|
{% unless url contains ':' %}
|
||||||
{%- comment -%} Add media resources subpath prefix {%- endcomment -%}
|
{%- comment -%} Add media resources subpath prefix {%- endcomment -%}
|
||||||
{% if include.subpath %}
|
{% assign url = include.subpath | default: '' | append: '/' | append: url %}
|
||||||
{% assign url = include.subpath | append: '/' | append: url %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%- comment -%} Prepend CND URL {%- endcomment -%}
|
{%- comment -%} Prepend CND URL {%- endcomment -%}
|
||||||
{% if site.cdn %}
|
{% if site.cdn %}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ layout: compress
|
|||||||
|
|
||||||
<div class="row flex-grow-1">
|
<div class="row flex-grow-1">
|
||||||
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
|
||||||
{% if layout.refactor or layout.layout == 'default' %}
|
{% if layout.layout == 'default' %}
|
||||||
{% include refactor-content.html content=content lang=lang %}
|
{% include refactor-content.html content=content lang=lang %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
refactor: true
|
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
{% include lang.html %}
|
||||||
@@ -55,19 +54,39 @@ refactor: true
|
|||||||
|
|
||||||
{% if post.image %}
|
{% if post.image %}
|
||||||
{% assign src = post.image.path | default: post.image %}
|
{% assign src = post.image.path | default: post.image %}
|
||||||
{% capture src %}{% include media-url.html src=src subpath=post.media_subpath %}{% endcapture %}
|
|
||||||
|
{% if post.media_subpath %}
|
||||||
|
{% unless src contains '://' %}
|
||||||
|
{% assign src = post.media_subpath
|
||||||
|
| append: '/'
|
||||||
|
| append: src
|
||||||
|
| replace: '///', '/'
|
||||||
|
| replace: '//', '/'
|
||||||
|
%}
|
||||||
|
{% endunless %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if post.image.lqip %}
|
||||||
|
{% assign lqip = post.image.lqip %}
|
||||||
|
|
||||||
|
{% if post.media_subpath %}
|
||||||
|
{% unless lqip contains 'data:' %}
|
||||||
|
{% assign lqip = post.media_subpath
|
||||||
|
| append: '/'
|
||||||
|
| append: lqip
|
||||||
|
| replace: '///', '/'
|
||||||
|
| replace: '//', '/'
|
||||||
|
%}
|
||||||
|
{% endunless %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% assign lqip_attr = 'lqip="' | append: lqip | append: '"' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
||||||
|
|
||||||
{% assign lqip = null %}
|
|
||||||
|
|
||||||
{% if post.image.lqip %}
|
|
||||||
{% capture lqip_url %}{% include media-url.html src=post.image.lqip subpath=post.media_subpath %}{% endcapture %}
|
|
||||||
{% assign lqip = 'lqip="' | append: lqip_url | append: '"' %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
|
<img src="{{ src }}" alt="{{ alt }}" {{ lqip_attr }}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% assign card_body_col = '7' %}
|
{% assign card_body_col = '7' %}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
refactor: true
|
|
||||||
panel_includes:
|
panel_includes:
|
||||||
- toc
|
- toc
|
||||||
tail_includes:
|
tail_includes:
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Moon
|
|||||||
|
|
||||||
## Footnote
|
## Footnote
|
||||||
|
|
||||||
Click the hook will locate the footnote[^footnote], and here is another footnote[^fn-nth-2].
|
Clicking the hook will locate the footnote[^footnote], and here is another footnote[^fn-nth-2].
|
||||||
|
|
||||||
## Inline code
|
## Inline code
|
||||||
|
|
||||||
@@ -113,7 +113,8 @@ Here is the `/path/to/the/file.extend`{: .filepath}.
|
|||||||
|
|
||||||
### Common
|
### Common
|
||||||
|
|
||||||
```text
|
<!-- markdownlint-disable-next-line MD040 -->
|
||||||
|
```
|
||||||
This is a common code snippet, without syntax highlight and line number.
|
This is a common code snippet, without syntax highlight and line number.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ tags: [writing]
|
|||||||
render_with_liquid: false
|
render_with_liquid: false
|
||||||
---
|
---
|
||||||
|
|
||||||
This tutorial will guide you how to write a post in the _Chirpy_ template, and it's worth reading even if you've used Jekyll before, as many features require specific variables to be set.
|
This tutorial will guide you on how to write a post in the _Chirpy_ template, and it's worth reading even if you've used Jekyll before, as many features require specific variables to be set.
|
||||||
|
|
||||||
## Naming and Path
|
## Naming and Path
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ By default, the image is centered, but you can specify the position by using one
|
|||||||
|
|
||||||
- **Normal position**
|
- **Normal position**
|
||||||
|
|
||||||
Image will be left aligned in below sample:
|
The image will be left aligned in the below sample:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
{: .normal }
|
{: .normal }
|
||||||
@@ -277,7 +277,7 @@ The following table shows how to get the two parameters we need in a given video
|
|||||||
|
|
||||||
Spotify supports some additional parameters:
|
Spotify supports some additional parameters:
|
||||||
|
|
||||||
- `compact` - to display compact player instead (ex. `{% include embed/spotify.html id='3OuMIIFP5TxM8tLXMWYPGV' compact=1 %}`);
|
- `compact` - to display a compact player instead (ex. `{% include embed/spotify.html id='3OuMIIFP5TxM8tLXMWYPGV' compact=1 %}`);
|
||||||
- `dark` - to force dark theme (ex. `{% include embed/spotify.html id='3OuMIIFP5TxM8tLXMWYPGV' dark=1 %}`).
|
- `dark` - to force dark theme (ex. `{% include embed/spotify.html id='3OuMIIFP5TxM8tLXMWYPGV' dark=1 %}`).
|
||||||
|
|
||||||
### Video Files
|
### Video Files
|
||||||
@@ -293,7 +293,7 @@ Where `URL` is a URL to a video file e.g. `/path/to/sample/video.mp4`.
|
|||||||
You can also specify additional attributes for the embedded video file. Here is a full list of attributes allowed.
|
You can also specify additional attributes for the embedded video file. Here is a full list of attributes allowed.
|
||||||
|
|
||||||
- `poster='/path/to/poster.png'` — poster image for a video that is shown while video is downloading
|
- `poster='/path/to/poster.png'` — poster image for a video that is shown while video is downloading
|
||||||
- `title='Text'` — title for a video that appears below the video and looks same as for images
|
- `title='Text'` — title for a video that appears below the video and looks the same as for images
|
||||||
- `autoplay=true` — video automatically begins to play back as soon as it can
|
- `autoplay=true` — video automatically begins to play back as soon as it can
|
||||||
- `loop=true` — automatically seek back to the start upon reaching the end of the video
|
- `loop=true` — automatically seek back to the start upon reaching the end of the video
|
||||||
- `muted=true` — audio will be initially silenced
|
- `muted=true` — audio will be initially silenced
|
||||||
@@ -326,7 +326,7 @@ Where `URL` is a URL to an audio file e.g. `/path/to/audio.mp3`.
|
|||||||
|
|
||||||
You can also specify additional attributes for the embedded audio file. Here is a full list of attributes allowed.
|
You can also specify additional attributes for the embedded audio file. Here is a full list of attributes allowed.
|
||||||
|
|
||||||
- `title='Text'` — title for an audio that appears below the audio and looks same as for images
|
- `title='Text'` — title for an audio that appears below the audio and looks the same as for images
|
||||||
- `types` — specify the extensions of additional audio formats separated by `|`. Ensure these files exist in the same directory as your primary audio file.
|
- `types` — specify the extensions of additional audio formats separated by `|`. Ensure these files exist in the same directory as your primary audio file.
|
||||||
|
|
||||||
Consider an example using all of the above:
|
Consider an example using all of the above:
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ For Unix-like systems, you can set up the environment natively for optimal perfo
|
|||||||
1. Follow the [Jekyll installation guide](https://jekyllrb.com/docs/installation/) to install Jekyll and ensure [Git](https://git-scm.com/) is installed.
|
1. Follow the [Jekyll installation guide](https://jekyllrb.com/docs/installation/) to install Jekyll and ensure [Git](https://git-scm.com/) is installed.
|
||||||
2. Clone your repository to your local machine.
|
2. Clone your repository to your local machine.
|
||||||
3. If you forked the theme, install [Node.js][nodejs] and run `bash tools/init.sh` in the root directory to initialize the repository.
|
3. If you forked the theme, install [Node.js][nodejs] and run `bash tools/init.sh` in the root directory to initialize the repository.
|
||||||
4. Run command `bundle` in the root of your repository to install the dependencies.
|
4. Run command `bundle install` in the root of your repository to install the dependencies.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ Before deploying, check the `_config.yml`{: .filepath} file and ensure the `url`
|
|||||||
|
|
||||||
Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
|
Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
|
||||||
|
|
||||||
### Deploy Using Github Actions
|
### Deploy Using GitHub Actions
|
||||||
|
|
||||||
Prepare the following:
|
Prepare the following:
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [7.4.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.4.0...v7.4.1) (2025-10-26)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* avoid duplicate base URL for homepage preview images ([#2568](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2568)) ([66bf232](https://github.com/cotes2020/jekyll-theme-chirpy/commit/66bf232951fbe752821b623dc1e7e4e2824c15bf))
|
||||||
|
|
||||||
## [7.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.3.1...v7.4.0) (2025-10-19)
|
## [7.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.3.1...v7.4.0) (2025-10-19)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "jekyll-theme-chirpy"
|
spec.name = "jekyll-theme-chirpy"
|
||||||
spec.version = "7.4.0"
|
spec.version = "7.4.1"
|
||||||
spec.authors = ["Cotes Chung"]
|
spec.authors = ["Cotes Chung"]
|
||||||
spec.email = ["cotes.chung@gmail.com"]
|
spec.email = ["cotes.chung@gmail.com"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jekyll-theme-chirpy",
|
"name": "jekyll-theme-chirpy",
|
||||||
"version": "7.4.0",
|
"version": "7.4.1",
|
||||||
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
|
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user