Merge branch 'master' into production
This commit is contained in:
commit
7cc36c5287
40 changed files with 639 additions and 386 deletions
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -22,7 +22,7 @@ Please select the desired item checkbox and change it to "[x]", then delete opti
|
||||||
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
|
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
|
||||||
-->
|
-->
|
||||||
|
|
||||||
- [ ] I have run `bash ./tools/deploy.sh --dry-run` (at the root of the project) locally and passed
|
- [ ] I have run `bash ./tools/test.sh` (at the root of the project) locally and passed
|
||||||
- [ ] I have tested this feature in the browser
|
- [ ] I have tested this feature in the browser
|
||||||
|
|
||||||
### Test Configuration
|
### Test Configuration
|
||||||
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -20,18 +20,22 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruby: [2.5, 2.6, 2.7, 3]
|
ruby: [2.5, 2.6, 2.7, 3]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # for posts's lastmod
|
fetch-depth: 0 # for posts's lastmod
|
||||||
|
|
||||||
- name: Setup Ruby
|
- name: Setup Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Test Site
|
- name: Test Site
|
||||||
run: bash tools/deploy.sh --dry-run
|
run: bash tools/test.sh
|
||||||
|
|
59
.github/workflows/pages-deploy.yml.hook
vendored
59
.github/workflows/pages-deploy.yml.hook
vendored
|
@ -1,29 +1,72 @@
|
||||||
name: 'Automatic build'
|
name: "Build and deploy"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- main
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- .gitignore
|
||||||
- README.md
|
- README.md
|
||||||
- LICENSE
|
- LICENSE
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
# Allow one concurrent deployment
|
||||||
|
concurrency:
|
||||||
|
group: "pages"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
continuous-delivery:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # for posts's lastmod
|
fetch-depth: 0
|
||||||
|
# submodules: true
|
||||||
|
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
|
||||||
|
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
|
||||||
|
|
||||||
|
- name: Setup Pages
|
||||||
|
id: pages
|
||||||
|
uses: actions/configure-pages@v1
|
||||||
|
|
||||||
- name: Setup Ruby
|
- name: Setup Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.7
|
ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Deploy
|
- name: Build site
|
||||||
run: bash tools/deploy.sh
|
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
|
||||||
|
env:
|
||||||
|
JEKYLL_ENV: "production"
|
||||||
|
|
||||||
|
- name: Test site
|
||||||
|
run: |
|
||||||
|
bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href
|
||||||
|
|
||||||
|
- name: Upload site artifact
|
||||||
|
uses: actions/upload-pages-artifact@v1
|
||||||
|
with:
|
||||||
|
path: "_site${{ steps.pages.outputs.base_path }}"
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
name: "Deploy site"
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v1
|
||||||
|
|
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -2,6 +2,26 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [5.3.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.2.1...v5.3.0) (2022-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add multiple authors to a post ([#677](https://github.com/cotes2020/jekyll-theme-chirpy/issues/677)) ([f1d9e99](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f1d9e99bc02d3cd0a6b0cd1beac545f0cc7a24f8)), closes [#675](https://github.com/cotes2020/jekyll-theme-chirpy/issues/675)
|
||||||
|
* **i18n:** add Bulgarian support ([#612](https://github.com/cotes2020/jekyll-theme-chirpy/issues/612)) ([2fed338](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2fed338ce6d078bf528c9717201fbc475f88cd22))
|
||||||
|
* **i18n:** add German locale file ([#663](https://github.com/cotes2020/jekyll-theme-chirpy/issues/663)) ([940b281](https://github.com/cotes2020/jekyll-theme-chirpy/commit/940b2810e95065e30600ae8d5e4612e7183da60e))
|
||||||
|
* **i18n:** add Hungarian locale file ([#597](https://github.com/cotes2020/jekyll-theme-chirpy/issues/597), [#598](https://github.com/cotes2020/jekyll-theme-chirpy/issues/598)) ([b032977](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b0329775fc24d0323e5cc04cda46ece8b4531802))
|
||||||
|
* **i18n:** add Turkish language ([#631](https://github.com/cotes2020/jekyll-theme-chirpy/issues/631)) ([ad137fa](https://github.com/cotes2020/jekyll-theme-chirpy/commit/ad137fa2945b1870b9c1dd5e9212a5f4af7c3580))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add missing color to linkedin icon for share list ([#683](https://github.com/cotes2020/jekyll-theme-chirpy/issues/683)) ([0dcd39d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0dcd39d491c9c49e4acf7f75f83fe6e1d1839e37))
|
||||||
|
* code contains spaces in headings ([#644](https://github.com/cotes2020/jekyll-theme-chirpy/issues/644)) ([3fa1bf3](https://github.com/cotes2020/jekyll-theme-chirpy/commit/3fa1bf305451f645a7f3aa93863b076463c8f165))
|
||||||
|
* correct spelling of `panel` ([#686](https://github.com/cotes2020/jekyll-theme-chirpy/issues/686)) ([b288587](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b288587c1c3d113a1c52c2d25fb46cddda348961))
|
||||||
|
* correct the i18n for tab titles ([0c5b697](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0c5b697fd3b283b6a5c926742b61ed49d8688c18))
|
||||||
|
* the `code` doesn’t wrap inside the prompt ([#626](https://github.com/cotes2020/jekyll-theme-chirpy/issues/626)) ([378b65a](https://github.com/cotes2020/jekyll-theme-chirpy/commit/378b65a0617787813519dde74d6f741f255eff3d))
|
||||||
|
|
||||||
## [5.2.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.2.0...v5.2.1) (2022-06-17)
|
## [5.2.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.2.0...v5.2.1) (2022-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ After a while, navigate to the site at <http://localhost:4000>.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/) / [wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Note that the tutorial is based on the [latest tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags), and the features of the default branch are usually ahead of the documentation.
|
For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/) / [wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Note that the tutorial is based on the [latest release](https://github.com/cotes2020/jekyll-theme-chirpy/releases/latest), and the features of the default branch are usually ahead of the documentation.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
83
_data/locales/bg-BG.yml
Normal file
83
_data/locales/bg-BG.yml
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
# The layout text of site
|
||||||
|
|
||||||
|
# ----- Commons label -----
|
||||||
|
|
||||||
|
layout:
|
||||||
|
post: Публикация
|
||||||
|
category: Категория
|
||||||
|
tag: Тагове
|
||||||
|
|
||||||
|
# The tabs of sidebar
|
||||||
|
tabs:
|
||||||
|
# format: <filename_without_extension>: <value>
|
||||||
|
home: Начало
|
||||||
|
categories: Категории
|
||||||
|
tags: Тагове
|
||||||
|
archives: Архив
|
||||||
|
about: За мен
|
||||||
|
|
||||||
|
# the text displayed in the search bar & search results
|
||||||
|
search:
|
||||||
|
hint: търси
|
||||||
|
cancel: Отмени
|
||||||
|
no_results: Упс! Не са намерени резултати.
|
||||||
|
|
||||||
|
panel:
|
||||||
|
lastmod: Наскоро обновени
|
||||||
|
trending_tags: Популярни тагове
|
||||||
|
toc: Съдържание
|
||||||
|
|
||||||
|
copyright:
|
||||||
|
# Shown at the bottom of the post
|
||||||
|
license:
|
||||||
|
template: Тази публикация е лицензирана под :LICENSE_NAME от автора.
|
||||||
|
name: CC BY 4.0
|
||||||
|
link: https://creativecommons.org/licenses/by/4.0/
|
||||||
|
|
||||||
|
# Displayed in the footer
|
||||||
|
brief: Някои права запазени.
|
||||||
|
verbose: >-
|
||||||
|
Освен ако не е посочено друго, публикациите в блога на този сайт са лицензирани
|
||||||
|
под лиценза Creative Commons Attribution 4.0 (CC BY 4.0) от автора.
|
||||||
|
|
||||||
|
meta: Създадено чрез :PLATFORM и :THEME тема.
|
||||||
|
|
||||||
|
not_found:
|
||||||
|
statment: Съжалявам, но този на този URL адрес няма налично съдържание.
|
||||||
|
|
||||||
|
notification:
|
||||||
|
update_found: Налична е нова версия на съдържанието.
|
||||||
|
update: Обнови
|
||||||
|
|
||||||
|
# ----- Posts related labels -----
|
||||||
|
|
||||||
|
post:
|
||||||
|
written_by: Автор
|
||||||
|
posted: Публикувана
|
||||||
|
updated: Обновена
|
||||||
|
words: думи
|
||||||
|
pageview_measure: преглеждания
|
||||||
|
read_time:
|
||||||
|
unit: мин
|
||||||
|
prompt: четиво
|
||||||
|
relate_posts: Още за четене
|
||||||
|
share: Споделете
|
||||||
|
button:
|
||||||
|
next: По-нови
|
||||||
|
previous: По-стари
|
||||||
|
copy_code:
|
||||||
|
succeed: Копирано!
|
||||||
|
share_link:
|
||||||
|
title: Копирай линк
|
||||||
|
succeed: Линкът е копиран успешно!
|
||||||
|
# pinned prompt of posts list on homepage
|
||||||
|
pin_prompt: Прикрепен
|
||||||
|
|
||||||
|
# categories page
|
||||||
|
categories:
|
||||||
|
category_measure:
|
||||||
|
singular: категория
|
||||||
|
plural: категории
|
||||||
|
post_measure:
|
||||||
|
singular: публикация
|
||||||
|
plural: публикации
|
82
_data/locales/de-DE.yml
Normal file
82
_data/locales/de-DE.yml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# The layout text of site
|
||||||
|
|
||||||
|
# ----- Commons label -----
|
||||||
|
|
||||||
|
layout:
|
||||||
|
post: Eintrag
|
||||||
|
category: Kategorie
|
||||||
|
tag: Tag
|
||||||
|
|
||||||
|
# The tabs of sidebar
|
||||||
|
tabs:
|
||||||
|
# format: <filename_without_extension>: <value>
|
||||||
|
home: Startseite
|
||||||
|
categories: Kategorien
|
||||||
|
tags: Tags
|
||||||
|
archives: Archiv
|
||||||
|
about: Über
|
||||||
|
|
||||||
|
# the text displayed in the search bar & search results
|
||||||
|
search:
|
||||||
|
hint: Suche
|
||||||
|
cancel: Abbrechen
|
||||||
|
no_results: Ups! Keine Einträge gefunden.
|
||||||
|
|
||||||
|
panel:
|
||||||
|
lastmod: Kürzlich aktualisiert
|
||||||
|
trending_tags: Beliebte Tags
|
||||||
|
toc: Inhalt
|
||||||
|
|
||||||
|
copyright:
|
||||||
|
# Shown at the bottom of the post
|
||||||
|
license:
|
||||||
|
template: Dieser Eintrag ist vom Autor unter :LICENSE_NAME lizensiert.
|
||||||
|
name: CC BY 4.0
|
||||||
|
link: https://creativecommons.org/licenses/by/4.0/
|
||||||
|
|
||||||
|
# Displayed in the footer
|
||||||
|
brief: Einige Rechte vorbehalten.
|
||||||
|
verbose: >-
|
||||||
|
Alle Einträge auf dieser Seite stehen, soweit nicht anders angegeben, unter der Lizenz Creative Commons Attribution 4.0 (CC BY 4.0).
|
||||||
|
|
||||||
|
meta: Powered by :PLATFORM with :THEME theme.
|
||||||
|
|
||||||
|
not_found:
|
||||||
|
statment: Entschuldigung, dieser Link verweist auf keine vorhandene Ressource.
|
||||||
|
|
||||||
|
notification:
|
||||||
|
update_found: Eine neue Version ist verfügbar.
|
||||||
|
update: Neue Version
|
||||||
|
|
||||||
|
# ----- Posts related labels -----
|
||||||
|
|
||||||
|
post:
|
||||||
|
written_by: Von
|
||||||
|
posted: Veröffentlicht
|
||||||
|
updated: Aktualisiert
|
||||||
|
words: Wörter
|
||||||
|
pageview_measure: Aufrufe
|
||||||
|
read_time:
|
||||||
|
unit: Minuten
|
||||||
|
prompt: lesen
|
||||||
|
relate_posts: Weiterlesen
|
||||||
|
share: Teilen
|
||||||
|
button:
|
||||||
|
next: Nächster Eintrag
|
||||||
|
previous: Eintrag vorher
|
||||||
|
copy_code:
|
||||||
|
succeed: Kopiert!
|
||||||
|
share_link:
|
||||||
|
title: Link kopieren
|
||||||
|
succeed: Link erfolgreich kopiert!
|
||||||
|
# pinned prompt of posts list on homepage
|
||||||
|
pin_prompt: Angepinnt
|
||||||
|
|
||||||
|
# categories page
|
||||||
|
categories:
|
||||||
|
category_measure:
|
||||||
|
singular: Kategorie
|
||||||
|
plural: Kategorien
|
||||||
|
post_measure:
|
||||||
|
singular: Eintrag
|
||||||
|
plural: Einträge
|
81
_data/locales/hu-HU.yml
Normal file
81
_data/locales/hu-HU.yml
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
# The layout text of site
|
||||||
|
|
||||||
|
# ----- Commons label -----
|
||||||
|
|
||||||
|
layout:
|
||||||
|
post: Bejegyzés
|
||||||
|
category: Kategória
|
||||||
|
tag: Címke
|
||||||
|
|
||||||
|
# The tabs of sidebar
|
||||||
|
tabs:
|
||||||
|
# format: <filename_without_extension>: <value>
|
||||||
|
home: Kezdőlap
|
||||||
|
categories: Kategóriák
|
||||||
|
tags: Címkék
|
||||||
|
archives: Archívum
|
||||||
|
about: Rólam
|
||||||
|
|
||||||
|
# the text displayed in the search bar & search results
|
||||||
|
search:
|
||||||
|
hint: keresés
|
||||||
|
cancel: Mégse
|
||||||
|
no_results: Oops! Nincs találat a keresésre.
|
||||||
|
|
||||||
|
panel:
|
||||||
|
lastmod: Legutóbb frissítve
|
||||||
|
trending_tags: Népszerű Címkék
|
||||||
|
toc: Tartalom
|
||||||
|
links: Blog linkek
|
||||||
|
|
||||||
|
copyright:
|
||||||
|
# Shown at the bottom of the post
|
||||||
|
license:
|
||||||
|
template: A bejegyzés :LICENSE_NAME licenccel rendelkezik.
|
||||||
|
name: CC BY 4.0
|
||||||
|
link: https://creativecommons.org/licenses/by/4.0/
|
||||||
|
|
||||||
|
# Displayed in the footer
|
||||||
|
brief: Néhány jog fenntartva.
|
||||||
|
verbose: >-
|
||||||
|
Az oldalon található tartalmak
|
||||||
|
Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
|
||||||
|
hacsak másképp nincs jelezve.
|
||||||
|
|
||||||
|
meta: Készítve :PLATFORM motorral :THEME témával.
|
||||||
|
|
||||||
|
not_found:
|
||||||
|
statment: Sajnáljuk, az URL-t rosszul helyeztük el, vagy valami nem létezőre mutat.
|
||||||
|
|
||||||
|
notification:
|
||||||
|
update_found: Elérhető a tartalom új verziója.
|
||||||
|
update: Frissítés
|
||||||
|
|
||||||
|
# ----- Posts related labels -----
|
||||||
|
|
||||||
|
post:
|
||||||
|
written_by: Szerző
|
||||||
|
posted: Létrehozva
|
||||||
|
updated: Frissítve
|
||||||
|
words: szó
|
||||||
|
pageview_measure: látogató
|
||||||
|
read_time:
|
||||||
|
unit: perc
|
||||||
|
prompt: elolvasni
|
||||||
|
relate_posts: További olvasnivaló
|
||||||
|
share: Megosztás
|
||||||
|
button:
|
||||||
|
next: Újabb
|
||||||
|
previous: Régebbi
|
||||||
|
copy_code:
|
||||||
|
succeed: Másolva!
|
||||||
|
share_link:
|
||||||
|
title: Link másolása
|
||||||
|
succeed: Link sikeresen másolva!
|
||||||
|
# pinned prompt of posts list on homepage
|
||||||
|
pin_prompt: Kitűzve
|
||||||
|
|
||||||
|
# categories page
|
||||||
|
categories:
|
||||||
|
category_measure: kategória
|
||||||
|
post_measure: bejegyzés
|
79
_data/locales/tr-TR.yml
Normal file
79
_data/locales/tr-TR.yml
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
# The layout text of site
|
||||||
|
|
||||||
|
# ----- Commons label -----
|
||||||
|
|
||||||
|
layout:
|
||||||
|
post: Gönderi
|
||||||
|
category: Kategori
|
||||||
|
tag: Etiket
|
||||||
|
|
||||||
|
# The tabs of sidebar
|
||||||
|
tabs:
|
||||||
|
# format: <filename_without_extension>: <value>
|
||||||
|
home: Ana Sayfa
|
||||||
|
categories: Kategoriler
|
||||||
|
tags: Etiketler
|
||||||
|
archives: Arşiv
|
||||||
|
about: Hakkında
|
||||||
|
|
||||||
|
# the text displayed in the search bar & search results
|
||||||
|
search:
|
||||||
|
hint: Ara...
|
||||||
|
cancel: İptal
|
||||||
|
no_results: Hop! Öyle bir şey bulamadım.
|
||||||
|
|
||||||
|
panel:
|
||||||
|
lastmod: Yeni Güncellendi
|
||||||
|
trending_tags: Yükselen Etiketler
|
||||||
|
toc: İçindekiler
|
||||||
|
|
||||||
|
copyright:
|
||||||
|
# Shown at the bottom of the post
|
||||||
|
license:
|
||||||
|
template: Bu gönderi :LICENSE_NAME lisansı altındadır.
|
||||||
|
name: CC BY 4.0
|
||||||
|
link: https://creativecommons.org/licenses/by/4.0/deed.tr
|
||||||
|
|
||||||
|
# Displayed in the footer
|
||||||
|
brief: Bazı hakları saklıdır.
|
||||||
|
verbose: >-
|
||||||
|
Aksi belirtilmediği sürece, bu sitedeki gönderiler Creative Commons Atıf 4.0 Uluslararası (CC BY 4.0) Lisansı altındadır.
|
||||||
|
Kısaca sayfa linkini de vererek paylaşabilir veya düzenleyip paylaşabilirsin.
|
||||||
|
|
||||||
|
meta: :PLATFORM ve :THEME teması.
|
||||||
|
|
||||||
|
not_found:
|
||||||
|
statment: Üzgünüz, bu linki yanlış yerleştirdik veya var olmayan bir şeye işaret ediyor.
|
||||||
|
|
||||||
|
notification:
|
||||||
|
update_found: İçeriğin yeni bir sürümü mevcut.
|
||||||
|
update: Güncelle
|
||||||
|
|
||||||
|
# ----- Posts related labels -----
|
||||||
|
|
||||||
|
post:
|
||||||
|
written_by: Yazan
|
||||||
|
posted: Gönderilme Tarihi
|
||||||
|
updated: Güncellenme Tarihi
|
||||||
|
words: sözcük
|
||||||
|
pageview_measure: görüntülenme
|
||||||
|
read_time:
|
||||||
|
unit: dakikada
|
||||||
|
prompt: okunabilir
|
||||||
|
relate_posts: Benzer Gönderiler
|
||||||
|
share: Paylaş
|
||||||
|
button:
|
||||||
|
next: İleri
|
||||||
|
previous: Geri
|
||||||
|
copy_code:
|
||||||
|
succeed: Kopyalandı.
|
||||||
|
share_link:
|
||||||
|
title: Linki kopyala
|
||||||
|
succeed: Link kopyalandı.
|
||||||
|
# pinned prompt of posts list on homepage
|
||||||
|
pin_prompt: Sabitlendi
|
||||||
|
|
||||||
|
# categories page
|
||||||
|
categories:
|
||||||
|
category_measure: kategori
|
||||||
|
post_measure: gönderi
|
|
@ -2,7 +2,7 @@
|
||||||
The paginator for post list on HomgPage.
|
The paginator for post list on HomgPage.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<ul class="pagination align-items-center mt-4 mb-5 pl-lg-2">
|
<ul class="pagination align-items-center mt-4 pl-lg-2">
|
||||||
<!-- left arrow -->
|
<!-- left arrow -->
|
||||||
{% if paginator.previous_page %}
|
{% if paginator.previous_page %}
|
||||||
{% assign prev_url = paginator.previous_page_path | relative_url %}
|
{% assign prev_url = paginator.previous_page_path | relative_url %}
|
||||||
|
|
|
@ -214,7 +214,7 @@
|
||||||
|
|
||||||
{% assign left = snippet | split: mark_end | first %}
|
{% assign left = snippet | split: mark_end | first %}
|
||||||
{% assign right = snippet | slice: left.size, snippet.size %}
|
{% assign right = snippet | slice: left.size, snippet.size %}
|
||||||
{% assign left = left | replace: '">', '"><span class="mr-2">' | append: '</span>' %}
|
{% assign left = left | replace_first: '">', '"><span class="mr-2">' | append: '</span>' %}
|
||||||
|
|
||||||
{% assign _new_content = _new_content | append: mark_start
|
{% assign _new_content = _new_content | append: mark_start
|
||||||
| append: left | append: anchor | append: right
|
| append: left | append: anchor | append: right
|
||||||
|
|
|
@ -76,8 +76,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if index_list.size > 0 %}
|
{% if index_list.size > 0 %}
|
||||||
<div id="related-posts" class="mt-5 mb-2 mb-sm-4">
|
<div id="related-posts" class="mb-2 mb-sm-4">
|
||||||
<h3 class="pt-2 mt-1 mb-4 ml-1"
|
<h3 class="pt-2 mb-4 ml-1"
|
||||||
data-toc-skip>{{ site.data.locales[lang].post.relate_posts }}</h3>
|
data-toc-skip>{{ site.data.locales[lang].post.relate_posts }}</h3>
|
||||||
<div class="card-deck mb-4">
|
<div class="card-deck mb-4">
|
||||||
{% for entry in index_list %}
|
{% for entry in index_list %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,36 +13,29 @@ layout: page
|
||||||
{% assign df_dayjs_m = '/ MM' %}
|
{% assign df_dayjs_m = '/ MM' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="archives" class="pl-xl-2">
|
<div id="archives" class="pl-xl-3">
|
||||||
|
|
||||||
{% for post in site.posts %}
|
{% for post in site.posts %}
|
||||||
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
{% capture cur_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
||||||
{% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
|
|
||||||
{% if forloop.first %}
|
{% if cur_year != last_year %}
|
||||||
{% assign last_day = "" %}
|
{% unless forloop.first %}</ul>{% endunless %}
|
||||||
{% assign last_month = "" %}
|
<div class="year lead">{{ cur_year }}</div>
|
||||||
<span class="lead">{{this_year}}</span>
|
<ul class="list-unstyled">
|
||||||
<ul class="list-unstyled">
|
{% assign last_year = cur_year %}
|
||||||
{% endif %}
|
|
||||||
<li>
|
|
||||||
<div>
|
|
||||||
{% assign ts = post.date | date: '%s' %}
|
|
||||||
<span class="date day" data-ts="{{ ts }}" data-df="DD">
|
|
||||||
{{ post.date | date: "%d" }}
|
|
||||||
</span>
|
|
||||||
<span class="date month small text-muted" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
|
||||||
{{ post.date | date: df_strftime_m }}
|
|
||||||
</span>
|
|
||||||
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{% if forloop.last %}
|
|
||||||
</ul>
|
|
||||||
{% elsif this_year != pre_year %}
|
|
||||||
</ul>
|
|
||||||
<span class="lead">{{pre_year}}</span>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
{% assign last_day = "" %}
|
|
||||||
{% assign last_month = "" %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<li>
|
||||||
|
{% assign ts = post.date | date: '%s' %}
|
||||||
|
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: "%d" }}</span>
|
||||||
|
<span class="date month small text-muted ml-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
|
||||||
|
{{ post.date | date: df_strftime_m }}
|
||||||
|
</span>
|
||||||
|
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{% if forloop.last %}</ul>{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@ layout: default
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<!-- core -->
|
<!-- core -->
|
||||||
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
|
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4 pb-5">
|
||||||
<div class="post pl-1 pr-1 pl-md-2 pr-md-2">
|
<div class="post pl-1 pr-1 pl-md-2 pr-md-2">
|
||||||
|
|
||||||
{% capture _content %}
|
{% capture _content %}
|
||||||
|
@ -20,7 +20,8 @@ layout: default
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% if page.layout == 'page' or page.collection == 'tabs'%}
|
{% if page.collection == 'tabs' %}
|
||||||
|
{% assign tab_key = page.title | downcase %}
|
||||||
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
|
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
|
||||||
<h1 class="dynamic-title">
|
<h1 class="dynamic-title">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
|
@ -35,7 +36,7 @@ layout: default
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- #core-wrapper -->
|
</div> <!-- #core-wrapper -->
|
||||||
|
|
||||||
<!-- pannel -->
|
<!-- panel -->
|
||||||
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
|
<div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
|
||||||
|
|
||||||
<div class="access">
|
<div class="access">
|
||||||
|
@ -43,7 +44,7 @@ layout: default
|
||||||
{% include trending-tags.html %}
|
{% include trending-tags.html %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% for _include in layout.pannel_includes %}
|
{% for _include in layout.panel_includes %}
|
||||||
{% assign _include_path = _include | append: '.html' %}
|
{% assign _include_path = _include | append: '.html' %}
|
||||||
{% include {{ _include_path }} %}
|
{% include {{ _include_path }} %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
layout: page
|
layout: page
|
||||||
refactor: true
|
refactor: true
|
||||||
pannel_includes:
|
panel_includes:
|
||||||
- toc
|
- toc
|
||||||
tail_includes:
|
tail_includes:
|
||||||
- related-posts
|
- related-posts
|
||||||
|
@ -50,32 +50,32 @@ tail_includes:
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
|
|
||||||
{% if page.image.alt %}
|
{% if page.image.alt %}
|
||||||
<figcaption class="pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<!-- author -->
|
<!-- author(s) -->
|
||||||
<span>
|
<span>
|
||||||
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
|
||||||
{% assign author_link = nil %}
|
|
||||||
|
|
||||||
{% if page.author %}
|
{% if page.author %}
|
||||||
{% assign author_link = site.data.authors[page.author].url %}
|
{% assign authors = page.author %}
|
||||||
{% elsif author_name == site.social.name %}
|
{% elsif page.authors %}
|
||||||
{% assign author_link = site.social.links[0] %}
|
{% assign authors = page.authors %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ site.data.locales[lang].post.written_by }}
|
{{ site.data.locales[lang].post.written_by }}
|
||||||
|
|
||||||
<em>
|
<em>
|
||||||
{% if author_link %}
|
{% if authors %}
|
||||||
<a href="{{ author_link }}">{{ author_name }}</a>
|
{% for author in authors %}
|
||||||
{% else %}
|
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
||||||
{{ author_name }}
|
{% unless forloop.last %}</em>, <em>{% endunless %}
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
|
||||||
|
{% endif %}
|
||||||
</em>
|
</em>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ tags: [bee]
|
||||||
|
|
||||||
The author information of the post usually does not need to be filled in the _Front Matter_ , they will be obtained from variables `social.name` and the first entry of `social.links` of the configuration file by default. But you can also override it as follows:
|
The author information of the post usually does not need to be filled in the _Front Matter_ , they will be obtained from variables `social.name` and the first entry of `social.links` of the configuration file by default. But you can also override it as follows:
|
||||||
|
|
||||||
Add author information in `_data/authors.yml` (If your website doesn't have this file, don't hesitate to create one.)
|
Adding author information in `_data/authors.yml` (If your website doesn't have this file, don't hesitate to create one).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
<author_id>:
|
<author_id>:
|
||||||
|
@ -58,15 +58,21 @@ Add author information in `_data/authors.yml` (If your website doesn't have this
|
||||||
```
|
```
|
||||||
{: file="_data/authors.yml" }
|
{: file="_data/authors.yml" }
|
||||||
|
|
||||||
And then set up the custom author in the post's YAML block:
|
|
||||||
|
And then use `author` to specify a single entry or `authors` to specify multiple entries:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
author: <author_id>
|
author: <author_id> # for single entry
|
||||||
|
# or
|
||||||
|
authors: [<author1_id>, <author2_id>] # for multiple entries
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
> Another benefit of reading the author information from the file `_data/authors.yml`{: .filepath } is that the page will have the meta tag `twitter:creator`, which enriches the [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#card-and-content-attribution) and is good for SEO.
|
|
||||||
|
Having said that, the key `author` can also identify multiple entries.
|
||||||
|
|
||||||
|
> The benefit of reading the author information from the file `_data/authors.yml`{: .filepath } is that the page will have the meta tag `twitter:creator`, which enriches the [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#card-and-content-attribution) and is good for SEO.
|
||||||
{: .prompt-info }
|
{: .prompt-info }
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
@ -248,6 +254,8 @@ Except for `alt`, all other options are necessary, especially the `width` and `h
|
||||||
|
|
||||||
Starting from _Chirpy v5.0.0_, the attributes `height` and `width` can be abbreviated: `height` → `h`, `width` → `w`. In addition, the [`img_path`](#image-path) can also be passed to the preview image, that is, when it has been set, the attribute `path` only needs the image file name.
|
Starting from _Chirpy v5.0.0_, the attributes `height` and `width` can be abbreviated: `height` → `h`, `width` → `w`. In addition, the [`img_path`](#image-path) can also be passed to the preview image, that is, when it has been set, the attribute `path` only needs the image file name.
|
||||||
|
|
||||||
|
Starting from _Chirpy v5.2.0_, the property for the preview image is changed to `image.path`. If upgrading the theme from a prior version, you will have to update posts' metadata to use new image property.
|
||||||
|
|
||||||
## Pinned Posts
|
## Pinned Posts
|
||||||
|
|
||||||
You can pin one or more posts to the top of the home page, and the fixed posts are sorted in reverse order according to their release date. Enable by:
|
You can pin one or more posts to the top of the home page, and the fixed posts are sorted in reverse order according to their release date. Enable by:
|
||||||
|
|
|
@ -68,7 +68,7 @@ Update the variables of `_config.yml`{: .filepath} as needed. Some of them are t
|
||||||
- `timezone`
|
- `timezone`
|
||||||
- `lang`
|
- `lang`
|
||||||
|
|
||||||
### Customing Stylesheet
|
### Customizing Stylesheet
|
||||||
|
|
||||||
If you need to customize the stylesheet, copy the theme's `assets/css/style.scss`{: .filepath} to the same path on your Jekyll site, and then add the custom style at the end of the style file.
|
If you need to customize the stylesheet, copy the theme's `assets/css/style.scss`{: .filepath} to the same path on your Jekyll site, and then add the custom style at the end of the style file.
|
||||||
|
|
||||||
|
@ -105,31 +105,15 @@ Before the deployment begins, check out the file `_config.yml`{: .filepath} and
|
||||||
|
|
||||||
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 by Using Github Actions
|
### Deploy by Using GitHub Actions
|
||||||
|
|
||||||
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GitHub Pages service.
|
Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`{: .filepath}. Otherwise, create a new one and fill in the contents of the [sample file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name. And then rename your repository to `<GH_USERNAME>.github.io` on GitHub.
|
||||||
|
|
||||||
Quickly check the files needed for GitHub Actions build:
|
Now publish your Jekyll site:
|
||||||
|
|
||||||
- Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`{: .filepath}. Otherwise, create a new one and fill in the contents of the [sample file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
1. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar. Then, in the **Source** section (under _Build and deployment_), select [**GitHub Actions**][pages-workflow-src] from the dropdown menu.
|
||||||
|
|
||||||
- Ensure your Jekyll site has file `tools/deploy.sh`{: .filepath}. Otherwise, copy it from here to your Jekyll site.
|
2. Push any commit to remote to trigger the GitHub Actions workflow. In the _Actions_ tab of your repository, you should see the "Deploy Jekyll with GitHub Pages" workflow with at least one job running. Once the build is complete and successful, the site should be deployed automatically.
|
||||||
|
|
||||||
- Furthermore, if you have committed `Gemfile.lock`{: .filepath} to the repo, and your runtime system is not Linux, don't forget to update the platform list in the lock file:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ bundle lock --add-platform x86_64-linux
|
|
||||||
```
|
|
||||||
|
|
||||||
After the above steps, rename your repository to `<GH_USERNAME>.github.io` on GitHub.
|
|
||||||
|
|
||||||
Now publish your Jekyll site by:
|
|
||||||
|
|
||||||
1. Push any commit to remote to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
|
|
||||||
|
|
||||||
2. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar, and then in the section **Source** of _GitHub Pages_, select the `/(root)` directory of branch `gh-pages` as the [publishing source][pages-src]. Remember to click <kbd>Save</kbd> before leaving.
|
|
||||||
|
|
||||||
![gh-pages-sources](/posts/20190809/gh-pages-sources.png){: width="1580" height="250" }
|
|
||||||
|
|
||||||
3. Visit your website at the address indicated by GitHub.
|
3. Visit your website at the address indicated by GitHub.
|
||||||
|
|
||||||
|
@ -182,5 +166,5 @@ The merge is likely to conflict with your local modifications. Please be patient
|
||||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||||
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||||
[chirpy-4.1.0]: https://github.com/cotes2020/jekyll-theme-chirpy/releases/tag/v4.1.0
|
[chirpy-4.1.0]: https://github.com/cotes2020/jekyll-theme-chirpy/releases/tag/v4.1.0
|
||||||
[pages-src]: https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
|
[pages-workflow-src]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
|
||||||
[latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags
|
[latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags
|
||||||
|
|
|
@ -6,6 +6,8 @@ categories: [Blogging, Tutorial]
|
||||||
tags: [google analytics, pageviews]
|
tags: [google analytics, pageviews]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
> The content of this post applies only to [_Universal Analytics property_](https://support.google.com/analytics/answer/10220206) (UA), not [_Google Analytics 4_](https://support.google.com/analytics/answer/10089681) (GA 4). In addition, since [UA is about to be deprecated on Jul 1, 2023](https://support.google.com/analytics/answer/11583528), the Page Views feature of [_Chirpy_][chirpy-homepage] will also be deprecated at that time.
|
||||||
|
{: .prompt-danger }
|
||||||
|
|
||||||
This post is to enable Page Views on the [**Chirpy**][chirpy-homepage] theme based blog that you just built. This requires technical knowledge and it's recommended to keep the `google_analytics.pv.*` empty unless you have a good reason. If your website has low traffic, the page views count would discourage you to write more blogs. With that said, let's start with the setup.
|
This post is to enable Page Views on the [**Chirpy**][chirpy-homepage] theme based blog that you just built. This requires technical knowledge and it's recommended to keep the `google_analytics.pv.*` empty unless you have a good reason. If your website has low traffic, the page views count would discourage you to write more blogs. With that said, let's start with the setup.
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ code {
|
||||||
&.highlighter-rouge {
|
&.highlighter-rouge {
|
||||||
font-size: $code-font-size;
|
font-size: $code-font-size;
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
|
word-break: break-word;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: var(--inline-code-bg);
|
background-color: var(--inline-code-bg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*!
|
/*!
|
||||||
* The styles for Jekyll theme Chirpy
|
* The styles for Jekyll theme Chirpy
|
||||||
*
|
*
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,35 +2,51 @@
|
||||||
Style for Archives
|
Style for Archives
|
||||||
*/
|
*/
|
||||||
|
|
||||||
%date-timeline {
|
|
||||||
content: "";
|
|
||||||
width: 4px;
|
|
||||||
left: 75px;
|
|
||||||
display: inline-block;
|
|
||||||
float: left;
|
|
||||||
position: relative;
|
|
||||||
background-color: var(--timeline-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
#archives {
|
#archives {
|
||||||
letter-spacing: 0.03rem;
|
letter-spacing: 0.03rem;
|
||||||
|
|
||||||
span.lead {
|
$timeline-width: 4px;
|
||||||
|
|
||||||
|
%timeline {
|
||||||
|
content: "";
|
||||||
|
width: $timeline-width;
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
background-color: var(--timeline-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.year {
|
||||||
|
height: 3.5rem;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 8px;
|
left: 2px;
|
||||||
|
margin-left: -$timeline-width;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
@extend %timeline;
|
||||||
|
|
||||||
|
height: 72px;
|
||||||
|
left: 79px;
|
||||||
|
bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child::before {
|
||||||
|
@extend %timeline;
|
||||||
|
|
||||||
|
height: 32px;
|
||||||
|
top: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
&::after { /* Year dot */
|
&::after { /* Year dot */
|
||||||
content: "";
|
content: "";
|
||||||
display: block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
-webkit-border-radius: 50%;
|
-webkit-border-radius: 50%;
|
||||||
-moz-border-radius: 50%;
|
-moz-border-radius: 50%;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
top: -26px;
|
left: 21.5px;
|
||||||
left: 63px;
|
|
||||||
border: 3px solid;
|
border: 3px solid;
|
||||||
background-color: var(--timeline-year-dot-color);
|
background-color: var(--timeline-year-dot-color);
|
||||||
border-color: var(--timeline-node-bg);
|
border-color: var(--timeline-node-bg);
|
||||||
|
@ -38,101 +54,82 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:first-child) {
|
}
|
||||||
position: relative;
|
|
||||||
left: 4px;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
left: 67px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // #archives span.lead
|
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
li {
|
li {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
|
white-space: nowrap;
|
||||||
div {
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
a {
|
|
||||||
/* post title in Archvies */
|
|
||||||
margin-left: 2.5rem;
|
|
||||||
position: relative;
|
|
||||||
top: 0.1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(odd) {
|
&:nth-child(odd) {
|
||||||
background-color: var(--main-wrapper-bg, #fff);
|
background-color: var(--main-wrapper-bg, #fff);
|
||||||
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
|
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::before {
|
||||||
@extend %date-timeline;
|
@extend %timeline;
|
||||||
|
|
||||||
height: 2.8rem;
|
top: 0;
|
||||||
top: -1.3rem;
|
left: 77px;
|
||||||
}
|
height: 3.1rem;
|
||||||
|
|
||||||
&:first-child::before {
|
|
||||||
@extend %date-timeline;
|
|
||||||
|
|
||||||
height: 3.06rem;
|
|
||||||
top: -1.61rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:last-child) > li:last-child::after {
|
&:last-child li:last-child::before {
|
||||||
height: 3.4rem;
|
height: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child > li:last-child::after {
|
} /* #archives ul */
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
} // #archives ul
|
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
right: 0.5rem;
|
||||||
|
|
||||||
&.month {
|
&.month {
|
||||||
width: 1.4rem;
|
width: 1.4rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
~ a::before {
|
|
||||||
/* A dot for Month and Day */
|
|
||||||
content: "";
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
-webkit-border-radius: 50%;
|
|
||||||
-moz-border-radius: 50%;
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 8px;
|
|
||||||
height: 8px;
|
|
||||||
float: left;
|
|
||||||
top: 1.35rem;
|
|
||||||
left: 69px;
|
|
||||||
background-color: var(--timeline-node-bg);
|
|
||||||
box-shadow: 0 0 3px 0 #c2c6cc;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.day {
|
&.day {
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
text-align: center;
|
|
||||||
margin-right: -2px;
|
|
||||||
width: 1.2rem;
|
|
||||||
position: relative;
|
|
||||||
left: -0.15rem;
|
|
||||||
}
|
}
|
||||||
} // #archives .date
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
/* post title in Archvies */
|
||||||
|
margin-left: 2.5rem;
|
||||||
|
position: relative;
|
||||||
|
top: 0.1rem;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
/* the dot before post title */
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
-webkit-border-radius: 50%;
|
||||||
|
-moz-border-radius: 50%;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
float: left;
|
||||||
|
top: 1.35rem;
|
||||||
|
left: 71px;
|
||||||
|
background-color: var(--timeline-node-bg);
|
||||||
|
box-shadow: 0 0 3px 0 #c2c6cc;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // #archives
|
} // #archives
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pannel hidden */
|
/* Panel hidden */
|
||||||
@media all and (max-width: 1200px) {
|
@media all and (max-width: 1200px) {
|
||||||
#post-list {
|
#post-list {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
|
|
|
@ -293,6 +293,10 @@ nav[data-toggle=toc] {
|
||||||
@include btn-sharing-color(rgb(39, 159, 217));
|
@include btn-sharing-color(rgb(39, 159, 217));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.fa-linkedin {
|
||||||
|
@include btn-sharing-color(rgb(0, 119, 181));
|
||||||
|
}
|
||||||
|
|
||||||
&.fa-weibo {
|
&.fa-weibo {
|
||||||
@include btn-sharing-color(rgb(229, 20, 43));
|
@include btn-sharing-color(rgb(229, 20, 43));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
title: About
|
# the default layout is 'page'
|
||||||
icon: fas fa-info-circle
|
icon: fas fa-info-circle
|
||||||
order: 4
|
order: 4
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
layout: archives
|
layout: archives
|
||||||
title: Archives
|
|
||||||
icon: fas fa-archive
|
icon: fas fa-archive
|
||||||
order: 3
|
order: 3
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
layout: categories
|
layout: categories
|
||||||
title: Categories
|
|
||||||
icon: fas fa-stream
|
icon: fas fa-stream
|
||||||
order: 1
|
order: 1
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
layout: tags
|
layout: tags
|
||||||
title: Tags
|
|
||||||
icon: fas fa-tag
|
icon: fas fa-tag
|
||||||
order: 2
|
order: 2
|
||||||
---
|
---
|
||||||
|
|
2
assets/js/dist/categories.min.js
vendored
2
assets/js/dist/categories.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
2
assets/js/dist/commons.min.js
vendored
2
assets/js/dist/commons.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
2
assets/js/dist/home.min.js
vendored
2
assets/js/dist/home.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
2
assets/js/dist/misc.min.js
vendored
2
assets/js/dist/misc.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
2
assets/js/dist/page.min.js
vendored
2
assets/js/dist/page.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
2
assets/js/dist/post.min.js
vendored
2
assets/js/dist/post.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
2
assets/js/dist/pvreport.min.js
vendored
2
assets/js/dist/pvreport.min.js
vendored
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* Chirpy v5.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
* Chirpy v5.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||||
* © 2019 Cotes Chung
|
* © 2019 Cotes Chung
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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 = "5.2.1"
|
spec.version = "5.3.0"
|
||||||
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": "5.2.1",
|
"version": "5.3.0",
|
||||||
"description": "A minimal, responsive, and powerful Jekyll theme for presenting professional writing.",
|
"description": "A minimal, responsive, and powerful Jekyll theme for presenting professional writing.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
160
tools/deploy.sh
160
tools/deploy.sh
|
@ -1,160 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Build, test and then deploy the site content to 'origin/<pages_branch>'
|
|
||||||
#
|
|
||||||
# Requirement: html-proofer, jekyll
|
|
||||||
#
|
|
||||||
# Usage: See help information
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
PAGES_BRANCH="gh-pages"
|
|
||||||
|
|
||||||
SITE_DIR="_site"
|
|
||||||
|
|
||||||
_opt_dry_run=false
|
|
||||||
|
|
||||||
_config="_config.yml"
|
|
||||||
|
|
||||||
_no_pages_branch=false
|
|
||||||
|
|
||||||
_backup_dir="$(mktemp -d)"
|
|
||||||
|
|
||||||
_baseurl=""
|
|
||||||
|
|
||||||
help() {
|
|
||||||
echo "Build, test and then deploy the site content to 'origin/<pages_branch>'"
|
|
||||||
echo
|
|
||||||
echo "Usage:"
|
|
||||||
echo
|
|
||||||
echo " bash ./tools/deploy.sh [options]"
|
|
||||||
echo
|
|
||||||
echo "Options:"
|
|
||||||
echo ' -c, --config "<config_a[,config_b[...]]>" Specify config file(s)'
|
|
||||||
echo " --dry-run Build site and test, but not deploy"
|
|
||||||
echo " -h, --help Print this information."
|
|
||||||
}
|
|
||||||
|
|
||||||
init() {
|
|
||||||
if [[ -z ${GITHUB_ACTION+x} && $_opt_dry_run == 'false' ]]; then
|
|
||||||
echo "ERROR: It is not allowed to deploy outside of the GitHub Action envrionment."
|
|
||||||
echo "Type option '-h' to see the help information."
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
_baseurl="$(grep '^baseurl:' _config.yml | sed "s/.*: *//;s/['\"]//g;s/#.*//")"
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
# clean up
|
|
||||||
if [[ -d $SITE_DIR ]]; then
|
|
||||||
rm -rf "$SITE_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build
|
|
||||||
JEKYLL_ENV=production bundle exec jekyll b -d "$SITE_DIR$_baseurl" --config "$_config"
|
|
||||||
}
|
|
||||||
|
|
||||||
test() {
|
|
||||||
bundle exec htmlproofer \
|
|
||||||
--disable-external \
|
|
||||||
--check-html \
|
|
||||||
--allow_hash_href \
|
|
||||||
"$SITE_DIR"
|
|
||||||
}
|
|
||||||
|
|
||||||
resume_site_dir() {
|
|
||||||
if [[ -n $_baseurl ]]; then
|
|
||||||
# Move the site file to the regular directory '_site'
|
|
||||||
mv "$SITE_DIR$_baseurl" "${SITE_DIR}-rename"
|
|
||||||
rm -rf "$SITE_DIR"
|
|
||||||
mv "${SITE_DIR}-rename" "$SITE_DIR"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_gh() {
|
|
||||||
if [[ -z $(git branch -av | grep "$PAGES_BRANCH") ]]; then
|
|
||||||
_no_pages_branch=true
|
|
||||||
git checkout -b "$PAGES_BRANCH"
|
|
||||||
else
|
|
||||||
git checkout -f "$PAGES_BRANCH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
backup() {
|
|
||||||
mv "$SITE_DIR"/* "$_backup_dir"
|
|
||||||
mv .git "$_backup_dir"
|
|
||||||
|
|
||||||
# When adding custom domain from Github website,
|
|
||||||
# the CANME only exist on `gh-pages` branch
|
|
||||||
if [[ -f CNAME ]]; then
|
|
||||||
mv CNAME "$_backup_dir"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
flush() {
|
|
||||||
rm -rf ./*
|
|
||||||
rm -rf .[^.] .??*
|
|
||||||
|
|
||||||
shopt -s dotglob nullglob
|
|
||||||
mv "$_backup_dir"/* .
|
|
||||||
[[ -f ".nojekyll" ]] || echo "" >".nojekyll"
|
|
||||||
}
|
|
||||||
|
|
||||||
deploy() {
|
|
||||||
git config --global user.name "GitHub Actions"
|
|
||||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
git update-ref -d HEAD
|
|
||||||
git add -A
|
|
||||||
git commit -m "[Automation] Site update No.${GITHUB_RUN_NUMBER}"
|
|
||||||
|
|
||||||
if $_no_pages_branch; then
|
|
||||||
git push -u origin "$PAGES_BRANCH"
|
|
||||||
else
|
|
||||||
git push -f
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
init
|
|
||||||
build
|
|
||||||
test
|
|
||||||
resume_site_dir
|
|
||||||
|
|
||||||
if $_opt_dry_run; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
setup_gh
|
|
||||||
backup
|
|
||||||
flush
|
|
||||||
deploy
|
|
||||||
}
|
|
||||||
|
|
||||||
while (($#)); do
|
|
||||||
opt="$1"
|
|
||||||
case $opt in
|
|
||||||
-c | --config)
|
|
||||||
_config="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--dry-run)
|
|
||||||
# build & test, but not deploy
|
|
||||||
_opt_dry_run=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-h | --help)
|
|
||||||
help
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# unknown option
|
|
||||||
help
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
main
|
|
|
@ -140,37 +140,6 @@ resume_config() {
|
||||||
mv _config.yml.bak _config.yml
|
mv _config.yml.bak _config.yml
|
||||||
}
|
}
|
||||||
|
|
||||||
# auto-generate a new version number to the file 'package.json'
|
|
||||||
standard_version() {
|
|
||||||
if $opt_pre; then
|
|
||||||
standard-version --prerelease rc
|
|
||||||
else
|
|
||||||
standard-version
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prevent changelogs generated on master branch from having duplicate content
|
|
||||||
# (the another bug of `standard-version`)
|
|
||||||
standard_version_plus() {
|
|
||||||
temp_branch="prod-mirror"
|
|
||||||
temp_dir="$(mktemp -d)"
|
|
||||||
|
|
||||||
git checkout -b "$temp_branch" "$PROD_BRANCH"
|
|
||||||
git merge --no-ff --no-edit "$STAGING_BRANCH"
|
|
||||||
|
|
||||||
standard_version
|
|
||||||
|
|
||||||
cp package.json CHANGELOG.md "$temp_dir"
|
|
||||||
|
|
||||||
git checkout "$STAGING_BRANCH"
|
|
||||||
git reset --hard HEAD # undo the changes from $temp_branch
|
|
||||||
mv "$temp_dir"/* . # rewrite the changelog
|
|
||||||
|
|
||||||
# clean up the temp stuff
|
|
||||||
rm -rf "$temp_dir"
|
|
||||||
git branch -D "$temp_branch"
|
|
||||||
}
|
|
||||||
|
|
||||||
# build a gem package
|
# build a gem package
|
||||||
build_gem() {
|
build_gem() {
|
||||||
echo -e "Build the gem package for v$_version\n"
|
echo -e "Build the gem package for v$_version\n"
|
||||||
|
@ -184,13 +153,13 @@ build_gem() {
|
||||||
release() {
|
release() {
|
||||||
_version="$1" # X.Y.Z
|
_version="$1" # X.Y.Z
|
||||||
|
|
||||||
git checkout "$PROD_BRANCH"
|
# Create a new tag on working branch
|
||||||
git merge --no-ff --no-edit "$working_branch"
|
|
||||||
|
|
||||||
# Create a new tag on production branch
|
|
||||||
echo -e "Create tag v$_version\n"
|
echo -e "Create tag v$_version\n"
|
||||||
git tag "v$_version"
|
git tag "v$_version"
|
||||||
|
|
||||||
|
git checkout "$PROD_BRANCH"
|
||||||
|
git merge --no-ff --no-edit "$working_branch"
|
||||||
|
|
||||||
# merge from patch branch to the staging branch
|
# merge from patch branch to the staging branch
|
||||||
# NOTE: This may break due to merge conflicts, so it may need to be resolved manually.
|
# NOTE: This may break due to merge conflicts, so it may need to be resolved manually.
|
||||||
if [[ $working_branch == hotfix/* ]]; then
|
if [[ $working_branch == hotfix/* ]]; then
|
||||||
|
@ -203,15 +172,13 @@ release() {
|
||||||
main() {
|
main() {
|
||||||
check
|
check
|
||||||
|
|
||||||
if [[ "$working_branch" == "$STAGING_BRANCH" ]]; then
|
# auto-generate a new version number to the file 'package.json'
|
||||||
standard_version_plus
|
if $opt_pre; then
|
||||||
|
standard-version --prerelease rc
|
||||||
else
|
else
|
||||||
standard_version
|
standard-version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Change heading of Patch version to level 2 (a bug from `standard-version`)
|
|
||||||
sed -i "s/^### \[/## \[/g" CHANGELOG.md
|
|
||||||
|
|
||||||
_version="$(grep '"version":' package.json | sed 's/.*: "//;s/".*//')"
|
_version="$(grep '"version":' package.json | sed 's/.*: "//;s/".*//')"
|
||||||
|
|
||||||
echo -e "Bump version number to $_version\n"
|
echo -e "Bump version number to $_version\n"
|
||||||
|
|
67
tools/test.sh
Executable file
67
tools/test.sh
Executable file
|
@ -0,0 +1,67 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Build and test the site content
|
||||||
|
#
|
||||||
|
# Requirement: html-proofer, jekyll
|
||||||
|
#
|
||||||
|
# Usage: See help information
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
SITE_DIR="_site"
|
||||||
|
|
||||||
|
_config="_config.yml"
|
||||||
|
|
||||||
|
help() {
|
||||||
|
echo "Build and test the site content"
|
||||||
|
echo
|
||||||
|
echo "Usage:"
|
||||||
|
echo
|
||||||
|
echo " bash ./tools/test.sh [options]"
|
||||||
|
echo
|
||||||
|
echo "Options:"
|
||||||
|
echo ' -c, --config "<config_a[,config_b[...]]>" Specify config file(s)'
|
||||||
|
echo " -h, --help Print this information."
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
# clean up
|
||||||
|
if [[ -d $SITE_DIR ]]; then
|
||||||
|
rm -rf "$SITE_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
_baseurl="$(grep '^baseurl:' "$_config" | sed "s/.*: *//;s/['\"]//g;s/#.*//")"
|
||||||
|
|
||||||
|
# build
|
||||||
|
JEKYLL_ENV=production bundle exec jekyll build \
|
||||||
|
--destination "$SITE_DIR$_baseurl" \
|
||||||
|
--config "$_config"
|
||||||
|
|
||||||
|
# test
|
||||||
|
bundle exec htmlproofer "$SITE_DIR" \
|
||||||
|
--disable-external \
|
||||||
|
--check-html \
|
||||||
|
--allow_hash_href
|
||||||
|
}
|
||||||
|
|
||||||
|
while (($#)); do
|
||||||
|
opt="$1"
|
||||||
|
case $opt in
|
||||||
|
-c | --config)
|
||||||
|
_config="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-h | --help)
|
||||||
|
help
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# unknown option
|
||||||
|
help
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
main
|
Loading…
Reference in a new issue