Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Jun 9, 2022
2 parents 3969b28 + baad801 commit 4c45f37
Show file tree
Hide file tree
Showing 80 changed files with 1,223 additions and 750 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"body-max-line-length": [0, "always"]
}
}
43 changes: 33 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to Contribute

We want to thank you for sparing time to improve this project! Here are some guidelines for contributing:
We'd like to thank you for sparing time to improve this project! Here are some guidelines for contributing:

To ensure that the blog design is not confused, this project does not accept suggestions for design changes, such as color scheme, fonts, typography, etc. If your request is about an enhancement, it is recommended to first submit a [_Feature Request_](https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md) issue to discuss whether your idea fits the project.

Expand All @@ -9,34 +9,57 @@ To ensure that the blog design is not confused, this project does not accept sug
Generally, contribute to the project by:

1. Fork this project on GitHub and clone it locally.
2. Create a new branch from the default branch and give it a descriptive name (e.g., `my-new-feature`, `fix-a-bug`).
3. After completing the development, submit a new _Pull Request_.
2. Create a new branch from the default branch and give it a descriptive name (format: `feature/<add-new-feat>` / `fix/<fix-a-bug>`).
3. After completing the development, submit a new _Pull Request_. Note that the commit message must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), otherwise it will fail the PR check.

## Modifying JavaScript

If your contribution involves JS modification, please read the following sections.
If your contribution involves JavaScript modification, please read the following sections.

### Inline Scripts

If you need to add comments to the inline JS (the JS code between the tags `<script>` and `</script>`), please use `/**/` instead of two slashes `//`. Because the HTML will be compressed by [jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html) during deployment, but it cannot handle the `//` properly. And this will disrupt the structure of the compressed HTML.
If you need to add comments to the inline JavaScript (the code between the HTML tags `<script>` and `</script>`), please use `/* */` instead of two slashes `//`. Because the HTML will be compressed by [jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html) during deployment, but it cannot handle the `//` properly, which will disrupt the structure of the compressed HTML.

### External Scripts

If you need to add or modify JavaScripts in the directory `_javascript`, you need to install [Gulp.js](https://gulpjs.com/docs/en/getting-started/quick-start).
If you need to add/change/delete the JavaScript in the directory `_javascript/`, setting up [`Node.js`](https://nodejs.org/) and [`npx`](https://www.npmjs.com/package/npx) is a requirement. And then install the development dependencies:

During development, real-time debugging can be performed through the following commands:
```console
$ npm i
```

During JavaScript development, real-time debugging can be performed through the following commands:

Firstly, start a Jekyll server:

```console
$ bash tools/run.sh
```

Open another terminal tab and run:
And then open a new terminal tab and run:

```console
# Type 'Ctrl + C' to stop
$ npx gulp dev
```

After debugging, run the command `npx gulp` (without any argument) will automatically output the compressed files to the directory `assets/js/dist/`.

## Verify the commit messages

If you want to make sure your commits pass the CI check, you can refer to the following steps.

Install `commitlint` & `husky`:

```console
$ gulp dev # Type 'Ctrl + C' to stop
$ npm i -g @commitlint/{cli,config-conventional} husky
```

After debugging, run the command `gulp` (without any argument) will automatically output the compressed files to the directory `assests/js/dist/`.
And then enable `husky`:

```console
$ husky install
```

---

Expand Down
17 changes: 9 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ Steps to reproduce the behavior:

<!-- If applicable, add screenshots to help explain your problem. -->

### Software

<!-- Please complete the following information -->
- Ruby version: <!-- by running: `ruby -v` -->
- Gem version: <!-- by running: `gem -v`-->
- Bundler version: <!-- by running: `bundle -v`-->
- Jekyll version: <!-- by running: `bundle list | grep " jekyll "` -->
- Theme version: <!-- by running: `gem list | grep jekyll-theme-chirpy` -->
### Environment

| Command | Version |
|-----------------------------------|---------|
| `ruby -v` | |
| `gem -v` | |
| `bundle -v` | |
| `bundle exec jekyll -v` | |
| `bundle info jekyll-theme-chirpy` | |

### Desktop

Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Continuous Integration'
name: 'CI'
on:
push:
branches-ignore:
Expand All @@ -18,23 +18,20 @@ on:
- '**'

jobs:
ci:
runs-on: ${{ matrix.os }}
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

ruby: [2.5, 2.6, 2.7, 3]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # for posts's lastmod

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Test Site
run: bash tools/deploy.sh --dry-run
11 changes: 11 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint Commit Messages
on: pull_request

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
2 changes: 1 addition & 1 deletion .github/workflows/pages-deploy.yml.hook
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Automatic build'
on:
push:
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
!.editorconfig
!.nojekyll
!.travis.yml
!.husky
!.commitlintrc.json
!.versionrc.json

# bundler cache
_site
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint -x $(npm root -g)/@commitlint/config-conventional --edit
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:

stages:
- name: Upgrade
if: branch =~ /^v(\d)+(\.(\d)+){2}$/ OR tag IS present
if: branch = production
- name: Starter
if: branch =~ /^v(\d)+(\.(\d)+){2}$/ OR tag IS present
if: branch = production
- name: Docs
if: branch = docs

Expand Down
20 changes: 20 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"skip": {
"commit": true,
"tag": true
},
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Improvements"
}
]
}
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Changelog

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.2.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.1.0...v5.2.0) (2022-06-09)


### Features

* add es-ES support to locales ([#533](https://github.com/cotes2020/jekyll-theme-chirpy/issues/533)) ([efe75ad](https://github.com/cotes2020/jekyll-theme-chirpy/commit/efe75adf2784956afb7a0b67f6634b146d9cb03b))
* add fr-FR support to locales ([#582](https://github.com/cotes2020/jekyll-theme-chirpy/issues/582)) ([94e8144](https://github.com/cotes2020/jekyll-theme-chirpy/commit/94e81447afa457b1a6b7e8f487c47502803556d7))
* add Vietnamese locale ([#517](https://github.com/cotes2020/jekyll-theme-chirpy/issues/517)) ([171463d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/171463d76da9b7bc25dd327b8f0a868ea79e388b))
* add pt-BR support to locales ([c2c503f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/c2c503f63336884282b6bda4ec0703d6ae76771b))
* add option to turn off PWA ([#527](https://github.com/cotes2020/jekyll-theme-chirpy/issues/527)) ([106c981](https://github.com/cotes2020/jekyll-theme-chirpy/commit/106c981bac71e7434204a77e1f0c9c61d6eb1509))
* **PWA:** add Service Worker update notification ([d127183](https://github.com/cotes2020/jekyll-theme-chirpy/commit/d127183b9774f6321e409acdb66bf8a85d8814be))
* support showing description of preview image ([2bd6efa](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2bd6efa95a174ac44e30a3af1e57e6f40d6e0e3a))


### Bug Fixes

* alt is not a valid attribute for 'a' tag ([58928db](https://github.com/cotes2020/jekyll-theme-chirpy/commit/58928dbc9068db4e4cda4371eeae1865920dce6a))
* assets URL is missing `baseurl` in self-hosted mode ([#591](https://github.com/cotes2020/jekyll-theme-chirpy/issues/591)) ([54124d5](https://github.com/cotes2020/jekyll-theme-chirpy/commit/54124d5134995fce52e4c2fc0a5d4d1743d6264d))
* correct the `twitter:creator` of Twitter summary card ([96a16c8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/96a16c868ede51e7dfa412de63ffa1e5a49add7f))
* correctly URL encode share links ([4c1c8d8](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4c1c8d8b0eacecbbaa2d522bbdd6430f350ff760)), closes [#496](https://github.com/cotes2020/jekyll-theme-chirpy/issues/496)
* follow paginate_path config for pagination ([6900d9f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6900d9f2bc9380cbda4babf611c6eeff345291af))
* force checkout of `gh-pages` branch ([#544](https://github.com/cotes2020/jekyll-theme-chirpy/issues/544)) ([5402523](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5402523ae52a3740bcc15df0b226b2612644945d))
* horizontal scroll for long equations ([#545](https://github.com/cotes2020/jekyll-theme-chirpy/issues/545)) ([30787fc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/30787fc4cf151e955bb7afc26dfd859f1a06fce6))
* p is not allowed in span ([4f590e2](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4f590e2bba0639751771211bc0d357828ae70404))
* remove whitespace from avatar URL ([#537](https://github.com/cotes2020/jekyll-theme-chirpy/issues/537)) ([0542b51](https://github.com/cotes2020/jekyll-theme-chirpy/commit/0542b5149c8287dca60e37f46ee36f31b43455e4))
* resume the preview image SEO tag ([#529](https://github.com/cotes2020/jekyll-theme-chirpy/issues/529)) ([b8d1bcd](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b8d1bcd3dea0abd1afef7ef154a4501fbb18938d))
* script code should be in head or body, not in between ([2103191](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2103191b2faf714a8e4418c7c347a1f942b51af8))
* spurious header closing tags ([59e9557](https://github.com/cotes2020/jekyll-theme-chirpy/commit/59e955745f02f9b57c65af70b0979cd4a98bf53f))
* table bypass refactoring when it contains IAL ([#519](https://github.com/cotes2020/jekyll-theme-chirpy/issues/519)) ([5d85ccb](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5d85ccb9943aac88dbbefebe1c2234cdcbae5c53))
* **theme mode:** `SCSS` syntax error ([#588](https://github.com/cotes2020/jekyll-theme-chirpy/issues/588)) ([76a1b6a](https://github.com/cotes2020/jekyll-theme-chirpy/commit/76a1b6a068c369138422dcd18ba08ec8cc3749a6))
* use `jsonify` to generate valid json ([#521](https://github.com/cotes2020/jekyll-theme-chirpy/issues/521)) ([dd9d5a7](https://github.com/cotes2020/jekyll-theme-chirpy/commit/dd9d5a7207b746342d07176d8969dc4f2c380bf2))
* when the `site.img_cdn` is set to the local path, the preview-image path loses the `baseurl` ([9cefe58](https://github.com/cotes2020/jekyll-theme-chirpy/commit/9cefe58993d9ea3a3a28424e7ffd8e0911567c5c))


### Improvements

* avoid post pageviews from shifting while loading ([135a16f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/135a16f13ee783d9308669ff9a824847a73c951c))
* avoid the layout shift for post datetime ([6d35f5f](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6d35f5f8da044cfad071628bb53776de03efaae4))
* **categories:** support singular and plural forms of locale ([#595](https://github.com/cotes2020/jekyll-theme-chirpy/issues/595)) ([35cadf9](https://github.com/cotes2020/jekyll-theme-chirpy/commit/35cadf969dd0161ee62503e242c545f006f7072b))
* improve the responsive design for ultrawide screens ([#540](https://github.com/cotes2020/jekyll-theme-chirpy/issues/540)) ([5d6e8c5](https://github.com/cotes2020/jekyll-theme-chirpy/commit/5d6e8c5ef6aa71b4d2600c5305f6e8ba540557f7))
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ assets:
# only works if `assets.self_host.enabled` is 'true'
env: # [development|production]

pwa:
enabled: true # the option for PWA feature

paginate: 10

# ------------ The following options are not recommended to be modified ------------------
Expand Down
17 changes: 17 additions & 0 deletions _data/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Template › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/advanced-usage.md#setting-author-url
# -------------------------------------
# {author_id}:
# name: {full name}
# twitter: {twitter_of_author}
# url: {homepage_of_author}
# -------------------------------------

cotes:
name: Cotes Chung
twitter: cotes2020
url: https://github.com/cotes2020/

sille_bille:
name: Dinesh Prasanth Moluguwan Krishnamoorthy
twitter: dinesh_MKD
url: https://github.com/SilleBille/
17 changes: 11 additions & 6 deletions _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tabs:
search:
hint: search
cancel: Cancel
no_results: Oops! No result founds.
no_results: Oops! No results found.

panel:
lastmod: Recently Updated
Expand All @@ -44,9 +44,10 @@ meta: Powered by :PLATFORM with :THEME theme.

not_found:
statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
hint_template: :HEAD_BAK to try finding it again, or search for it on the :ARCHIVES_PAGE.
head_back: Head back Home
archives_page: Archives page

notification:
update_found: A new version of content is available.
update: Update

# ----- Posts related labels -----

Expand Down Expand Up @@ -74,5 +75,9 @@ post:

# categories page
categories:
category_measure: categories
post_measure: posts
category_measure:
singular: category
plural: categories
post_measure:
singular: post
plural: posts
79 changes: 79 additions & 0 deletions _data/locales/es-ES.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# The layout text of site

# ----- Commons label -----

layout:
post: Entrada
category: Categoría
tag: Etiqueta

# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Inicio
categories: Categorías
tags: Etiquetas
archives: Archivo
about: Acerca de

# the text displayed in the search bar & search results
search:
hint: Buscar
cancel: Cancelar
no_results: ¡Oops! No se encuentran resultados.

panel:
lastmod: Actualizado recientemente
trending_tags: Etiquetas populares
toc: Contenido

copyright:
# Shown at the bottom of the post
license:
template: Esta entrada está licenciada bajo :LICENSE_NAME por el autor.
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/

# Displayed in the footer
brief: Algunos derechos reservados.
verbose: >-
Salvo que se indique explícitamente, las entradas de este blog están licenciadas
bajo la Creative Commons Attribution 4.0 International (CC BY 4.0) License por el autor.
meta: Hecho con :PLATFORM usando el tema :THEME.

not_found:
statment: Lo sentimos, hemos perdido esa URL o apunta a algo que no existe.

notification:
update_found: Hay una nueva versión de contenido disponible.
update: Actualizar

# ----- Posts related labels -----

post:
written_by: Por
posted: Publicado
updated: Actualizado
words: palabras
pageview_measure: visitas
read_time:
unit: min
prompt: ' de lectura'
relate_posts: Lecturas adicionales
share: Compartir
button:
next: Nuevo
previous: Anterior
copy_code:
succeed: ¡Copiado!
share_link:
title: Copiar enlace
succeed: ¡Enlace copiado!
# pinned prompt of posts list on homepage
pin_prompt: Fijado

# categories page
categories:
category_measure: categorias
post_measure: entradas
Loading

0 comments on commit 4c45f37

Please sign in to comment.