mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2026-01-22 14:50:14 +00:00
Compare commits
3 Commits
9c33bc9406
...
ef093ff60d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef093ff60d | ||
|
|
4d6c788b9c | ||
|
|
cda62e28d1 |
4
.github/workflows/cd.yml
vendored
4
.github/workflows/cd.yml
vendored
@@ -14,14 +14,14 @@ jobs:
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3
|
||||
bundler-cache: true
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
|
||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0 # for posts's lastmod
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
bundler-cache: true
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
|
||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
2
.github/workflows/commitlint.yml
vendored
2
.github/workflows/commitlint.yml
vendored
@@ -11,5 +11,5 @@ jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: wagoid/commitlint-github-action@v6
|
||||
|
||||
4
.github/workflows/lint-js.yml
vendored
4
.github/workflows/lint-js.yml
vendored
@@ -16,10 +16,10 @@ jobs:
|
||||
lint-js:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
|
||||
4
.github/workflows/lint-scss.yml
vendored
4
.github/workflows/lint-scss.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
||||
lint-scss:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
|
||||
4
.github/workflows/pr-filter.yml
vendored
4
.github/workflows/pr-filter.yml
vendored
@@ -13,11 +13,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Check PR Content
|
||||
id: intercept
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
# 60 days before marking issues/PRs stale
|
||||
days-before-close: -1 # does not close automatically
|
||||
|
||||
@@ -8,7 +8,7 @@ theme: jekyll-theme-chirpy
|
||||
# otherwise, the layout language will use the default value of 'en'.
|
||||
lang: en
|
||||
|
||||
# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker
|
||||
# Change to your timezone › https://zones.arilyn.cc
|
||||
timezone: Asia/Shanghai
|
||||
|
||||
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% endunless %}
|
||||
|
||||
<p>
|
||||
<audio class="embed-audio" controls>
|
||||
<audio class="embed-audio file" controls>
|
||||
{% assign extension = src | split: '.' | last %}
|
||||
{% assign types = extension | concat: types %}
|
||||
|
||||
|
||||
22
_includes/embed/spotify.html
Normal file
22
_includes/embed/spotify.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% assign size = 352 %}
|
||||
{% assign theme = '' %}
|
||||
|
||||
{% if include.compact %}
|
||||
{% assign size = 152 %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.dark %}
|
||||
{% assign theme = '?theme=0' %}
|
||||
{% endif %}
|
||||
|
||||
<iframe
|
||||
class="embed-audio spotify"
|
||||
src="https://open.spotify.com/embed/track/{{ include.id | append: theme }}"
|
||||
height="{{ size }}"
|
||||
frameBorder="0"
|
||||
allowfullscreen=""
|
||||
allowtransparency="true"
|
||||
allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"
|
||||
loading="lazy"
|
||||
>
|
||||
</iframe>
|
||||
@@ -256,11 +256,9 @@ For normal images:
|
||||
```
|
||||
{: .nolineno }
|
||||
|
||||
### Video
|
||||
### Social Media Platforms
|
||||
|
||||
#### Social Media Platform
|
||||
|
||||
You can embed videos from social media platforms with the following syntax:
|
||||
You can embed video/audio from social media platforms with the following syntax:
|
||||
|
||||
```liquid
|
||||
{% include embed/{Platform}.html id='{ID}' %}
|
||||
@@ -268,15 +266,21 @@ You can embed videos from social media platforms with the following syntax:
|
||||
|
||||
Where `Platform` is the lowercase of the platform name, and `ID` is the video ID.
|
||||
|
||||
The following table shows how to get the two parameters we need in a given video URL, and you can also know the currently supported video platforms.
|
||||
The following table shows how to get the two parameters we need in a given video/audio URL, and you can also know the currently supported video platforms.
|
||||
|
||||
| Video URL | Platform | ID |
|
||||
| -------------------------------------------------------------------------------------------------- | ---------- | :------------- |
|
||||
| [https://www.**youtube**.com/watch?v=**H-B46URT4mg**](https://www.youtube.com/watch?v=H-B46URT4mg) | `youtube` | `H-B46URT4mg` |
|
||||
| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211) | `twitch` | `1634779211` |
|
||||
| [https://www.**bilibili**.com/video/**BV1Q44y1B7Wf**](https://www.bilibili.com/video/BV1Q44y1B7Wf) | `bilibili` | `BV1Q44y1B7Wf` |
|
||||
| Video URL | Platform | ID |
|
||||
| -------------------------------------------------------------------------------------------------------------------------- | ---------- | :----------------------- |
|
||||
| [https://www.**youtube**.com/watch?v=**H-B46URT4mg**](https://www.youtube.com/watch?v=H-B46URT4mg) | `youtube` | `H-B46URT4mg` |
|
||||
| [https://www.**twitch**.tv/videos/**1634779211**](https://www.twitch.tv/videos/1634779211) | `twitch` | `1634779211` |
|
||||
| [https://www.**bilibili**.com/video/**BV1Q44y1B7Wf**](https://www.bilibili.com/video/BV1Q44y1B7Wf) | `bilibili` | `BV1Q44y1B7Wf` |
|
||||
| [https://www.open.**spotify**.com/track/**3OuMIIFP5TxM8tLXMWYPGV**](https://open.spotify.com/track/3OuMIIFP5TxM8tLXMWYPGV) | `spotify` | `3OuMIIFP5TxM8tLXMWYPGV` |
|
||||
|
||||
#### Video Files
|
||||
Spotify supports some additional parameters:
|
||||
|
||||
- `compact` - to display 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 %}`).
|
||||
|
||||
### Video Files
|
||||
|
||||
If you want to embed a video file directly, use the following syntax:
|
||||
|
||||
@@ -310,7 +314,7 @@ Consider an example using all of the above:
|
||||
%}
|
||||
```
|
||||
|
||||
### Audios
|
||||
### Audio Files
|
||||
|
||||
If you want to embed an audio file directly, use the following syntax:
|
||||
|
||||
|
||||
@@ -314,7 +314,14 @@ main {
|
||||
|
||||
.embed-audio {
|
||||
width: 100%;
|
||||
display: block;
|
||||
|
||||
&.file {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.spotify {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
@extend %img-caption;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user