Skip to content

Updating to Chirpy v6.2.3 #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# submodules: true
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted
ruby-version: 3
bundler-cache: true

- name: Build site
Expand All @@ -52,7 +52,9 @@ jobs:

- name: Test site
run: |
bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href
bundle exec htmlproofer _site \
\-\-disable-external=true \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"

- name: Upload site artifact
uses: actions/upload-pages-artifact@v1
Expand Down
7 changes: 1 addition & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
gemspec

group :test do
gem "html-proofer", "~> 3.18"
gem "html-proofer", "~> 4.4"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
Expand All @@ -21,8 +21,3 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

# Lock jekyll-sass-converter to 2.x on Linux-musl
if RUBY_PLATFORM =~ /linux-musl/
gem "jekyll-sass-converter", "~> 2.0"
end
70 changes: 41 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# joshjohanning.github.io
# josh-ops.com

## Overview

A DevOps Blog - Blogging about Azure DevOps and GitHub practices, tips, and my continuous improvement DevOps journey.
A DevOps Blog - Blogging about GitHub and Azure DevOps practices, tips, scripts, and my continuous improvement DevOps journey.

[**josh-ops.com →**](https://josh-ops.com)

Expand All @@ -11,61 +11,73 @@ A DevOps Blog - Blogging about Azure DevOps and GitHub practices, tips, and my c
## Theme Source

Chirpy:
* [GitHub](https://github.com/cotes2020/jekyll-theme-chirpy)
* [Example and tips/best practices](https://chirpy.cotes.info/)
* Upgrading - copy in the new source while taking care to keep existing configuration/customizations in place?

* [GitHub repo](https://github.com/cotes2020/jekyll-theme-chirpy)
* [Example and tips/best practices](https://chirpy.cotes.page/)
* [Upgrading](#upgrading-the-theme) (using `git cherry-pick` to pull changes from upstream)

## Comment System

Utterances:
* [GitHub](https://github.com/utterance/utterances)
* [Example/configuration](https://utteranc.es/)
- [Utterances](https://utteranc.es/) (configured [directly in Chirpy](https://github.com/joshjohanning/joshjohanning.github.io/blob/a54c9633e6cab32fd30dc69afc9ffd74857cbd8a/_config.yml#L84-L92)) which uses GitHub issues for post comments

## Deviations from Chirpy

The configuration lives in `/_layouts/post.html`
### Adding Speaking tab

I added a section for dynamically selecting whether to use the light or dark utterances comment theme. I loosely documented this in an [issue in the utterances repository](https://github.com/utterance/utterances/issues/549#issuecomment-917091550).
- Added a [speaking tab](https://josh-ops.com/speaking/) to capture my speaking engagements
- [Used an icon](https://github.com/joshjohanning/joshjohanning.github.io/blob/ab7bb6e3842189adf1dccc909e1e77b86b625d0a/_tabs/speaking.md?plain=1#L3) from [fontawesome](https://fontawesome.com/v4/icons/) for the link in the sidebar

See commit: [c432906](https://github.com/joshjohanning/joshjohanning.github.io/commit/c432906dcb3f5f66c1b9dee9dd2bde41c50f8332)
### Light Mode Sidebar Background Color

## Deviations from Chirpy
- For my implementation of Chirpy v4.3.0 to v6.1.0, I [reverted](https://github.com/joshjohanning/joshjohanning.github.io/pull/8) the light mode sidebar background color to the pre-v4.3.0 color (blue/purple)
- When I updated from [Chirpy v6.1.0 to v6.3.0](https://github.com/joshjohanning/joshjohanning.github.io/pull/30), I decided to use the latest upstream values for the light mode sidebar background color (light gray)

### Reverting to pre-4.3.0 sidebar background color for light mode
#### Changelog

- See: [#8](https://github.com/joshjohanning/joshjohanning.github.io/pull/8)
- See: [#8](https://github.com/joshjohanning/joshjohanning.github.io/pull/8) where I reverted to the pre-v4.3.0 color (blue/purple)
- In [#27](https://github.com/joshjohanning/joshjohanning.github.io/pull/27), I updated the `sidebar-active-color` property to the latest upstream value
- In [#30](https://github.com/joshjohanning/joshjohanning.github.io/pull/30), I reverted to the latest upstream values for light mode, which included a change to the `sidebar-bg` and `sidebar-muted-color` properties to bring in the light gray sidebar background color

### Adding Speaking tab
### Preview Images

Used an icon from [fontawesome](https://fontawesome.com/v4/icons/)
- Chirpy [v5.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4b6ccbcbccce27b9fcb035812efefe4eb69301cf) introduced a strict `40 / 21` (`1:91:1`) aspect ratio requirement for post's preview images such that they would be cropped if you used a different aspect ratio
- In prior versions, I removed this code so that the post's preview images would still render with their original size
- In June 2023, I updated most of the preview images with the new aspect ratio and [brought back](https://github.com/joshjohanning/joshjohanning.github.io/commit/1920dc7d98cbe11a6882ae0ec067fabccd64426b) preview images to the home page, but I still left out the `40 / 21;` line from the `post.scss` file to account for the images that weren't updated
- In November 2023, I updated to Chirpy v6.2.3 and the preview image logic was moved to `commons.scss`; removed the `40 / 21;` line for the non-updated images

### Reverting 'feat: set preview image ratio to 1.91 : 1'
#### Changelog

- Upstream commit: [4b6ccbc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4b6ccbcbccce27b9fcb035812efefe4eb69301cf)
- Upstream commit introducing change: [4b6ccbc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4b6ccbcbccce27b9fcb035812efefe4eb69301cf) (Chirpy [v5.4.0](https://github.com/cotes2020/jekyll-theme-chirpy/releases/tag/v5.4.0))
- My changes so that preview image still shimmers before loading, but no image cropping: [b282712^..bb1dc1f](https://github.com/joshjohanning/joshjohanning.github.io/compare/b282712087028da95e292e3159d20cdf63d59feb^..bb1dc1f1bdbba4ee7d62858d834e0ca19f7745db)
- Really only need to get rid of `aspect-ratio: 40 / 21;` line
- June 2023: Updated most of the post images in commit [af83c70](https://github.com/joshjohanning/joshjohanning.github.io/commit/af83c7019c5783f70d5e725991097a7217a6658a) to reflect the 1.91:1 aspect ratio since that's what the ratio the home page uses for the post preview images, but I still left out the `40 / 21;` line in the `post.scss` file for the images I didn't update
- June 20, 2023: [Updated](https://github.com/joshjohanning/joshjohanning.github.io/commit/af83c7019c5783f70d5e725991097a7217a6658a) most of the post images to reflect the `1.91:1` aspect ratio since that's the ratio the [home page expects](https://github.com/joshjohanning/joshjohanning.github.io/commit/1920dc7d98cbe11a6882ae0ec067fabccd64426b) for the post preview images
- I still left out the `40 / 21;` line in the `post.scss` file for the images I didn't update to show the original image size on the post page
- November 1, 2023: In Chirpy [v6.2.3](https://github.com/joshjohanning/joshjohanning.github.io/pull/30), the preview image logic was moved to `commons.scss`; removed the `40 / 21;` line for the non-updated images

## Upgrading the Theme

Since we aren't using the theme gem (so we can do customizations), we have to do it the old-fashioned way:

1. Ensure chirpy is set as a remote: `git remote add chirpy https://github.com/cotes2020/jekyll-theme-chirpy.git`
2. Ensure you have the latest upstream commit: `git fetch chirpy`
3. Compare the upstream [releases](https://github.com/cotes2020/jekyll-theme-chirpy/releases) and [commits](https://github.com/cotes2020/jekyll-theme-chirpy/commits/master) to find the first and last commit in the range you want to update.
- Recommendation is to use release tag milestones instead of loose commits that aren't contained in a release yet
- For example, updating from 4.3.0 to 4.3.4 was referencing [a887f1d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/a887f1d57d9ac8e08c789c6201147bf68c459573) (one right after [945e8d1](https://github.com/cotes2020/jekyll-theme-chirpy/commit/945e8d195393f73f38c4782cb31b808f09acc6f5)) and [602e984](https://github.com/cotes2020/jekyll-theme-chirpy/commit/602e98448d419e9c5710cb0c8a002a6538562150) (the merge commit for 4.3.4)
- You can use this [link](https://github.com/cotes2020/jekyll-theme-chirpy/compare/a887f1d^..602e984) to compare the changes between two commits in GitHub
3. Compare the upstream [releases](https://github.com/cotes2020/jekyll-theme-chirpy/releases) and [commits](https://github.com/cotes2020/jekyll-theme-chirpy/commits/master) to find the first and last release/commit in the range you want to update
- Recommendation is to use release tag milestones instead of loose commits that aren't part of a release yet
- You can use this [link](https://github.com/cotes2020/jekyll-theme-chirpy/compare/a887f1d^..602e984) to compare the changes between two commits in GitHub (same for [releases](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.6.0..v5.6.1))
4. Start the `git cherry-pick`:
- To cherry-pick a range of commits (more common): `git cherry-pick "v5.6.0..v5.6.1" -m 1`
- To cherry-pick a single commit (probably not as common): `git cherry-pick a887f1d -m 1`
- To cherry-pick between a range of release tags (more common): `git cherry-pick "v5.6.0..v5.6.1" -m 1`
- To cherry-pick a single commit (not as common): `git cherry-pick a887f1d -m 1`
- If getting GPG errors, modify the local git config: `git config commit.gpgsign false`, but modify it back to `true` after you are done cherry-picking
5. Review merge conflicts - use a combination of `git cherry-pick --skip` (for when readme/starter posts are updated) and `cherry-pick --continue` (to continue after you resolve real merge conflicts)
6. Starting in 5.6.0, run: `npm run build && git add assets/js/dist -f && git commit -m "update js assets"`
3. Rebase the number of commits you just brought in (you should see icon in VS Code): `git rebase -i HEAD~16`
6. Starting in v5.6.0, run: `npm run build && git add assets/js/dist -f && git commit -m "update js assets"` ([docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Upgrade-Guide#upgrade-the-fork))
7. Rebase the number of commits you just brought in (you should see icon in VS Code): `git rebase -i HEAD~16`
- Leave the top commit as `pick` but change the rest to `squash`
- Update the commit message as appropriate
4. Update author and commit time: `git commit --amend --author "Josh Johanning <[email protected]>" --date=now`
5. [Test changes locally before pushing](#building--testing-locally)
8. Pay close attention to the terminal output as to which new files are being created and if they should be deleted (new files show up as `create mode 100644 file.ext`)
- For example, we wouldn't want to commit a GitHub workflow or issue template that wasn't needed here
- If there are new files that we don't want to track, delete the files, commit, and run another rebase `git rebase -i HEAD~2`
- This command can help with tracking new files in the most recent commit: `git diff-tree --compact-summary --diff-filter=A -r $(git rev-parse HEAD)`
9. Update author and commit time: `git commit --amend --author "Josh Johanning <[email protected]>" --date=now`
10. [Test changes locally before pushing](#building--testing-locally)

## Building / Testing Locally

Expand Down
19 changes: 9 additions & 10 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
# Import the theme
theme: jekyll-theme-chirpy

# Change the following value to '/PROJECT_NAME' ONLY IF your site type is GitHub Pages Project sites
# and doesn't have a custom domain.
baseurl: ""

# The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm
# If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
# otherwise, the layout language will use the default value of 'en'.
lang: en

# Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker
timezone: America/Chicago

# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
Expand All @@ -25,8 +21,9 @@ tagline: A DevOps Blog # it will display as the sub-title
description: >- # used by seo meta and the atom feed
Blogging about Azure DevOps and GitHub practices, tips, and my continuous improvement DevOps journey.

# fill in the protocol & hostname for your site, e.g., 'https://username.github.io'
url: 'https://josh-ops.com'
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
url: "https://josh-ops.com"

github:
username: joshjohanning # change to your github username
Expand All @@ -53,7 +50,7 @@ google_site_verification: eTIC71VhPBtwll8rNv7qlXud1yJh6E88No39MdcM_MI # change t
# The end of `jekyll-seo-tag` settings

google_analytics:
id: 'G-GE92ZJY22K' # fill in your Google Analytics ID
id: "G-GE92ZJY22K" # fill in your Google Analytics ID

# Prefer color scheme setting.
#
Expand Down Expand Up @@ -114,6 +111,9 @@ pwa:

paginate: 10

# The base URL of your site
baseurl: ""

# ------------ The following options are not recommended to be modified ------------------

kramdown:
Expand Down Expand Up @@ -177,12 +177,11 @@ compress_html:
exclude:
- "*.gem"
- "*.gemspec"
- docs
- tools
- README.md
- CHANGELOG.md
- LICENSE
- rollup.config.js
- node_modules
- package*.json

jekyll-archives:
Expand Down
2 changes: 1 addition & 1 deletion _data/contact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon: "fab fa-github"

- type: twitter
icon: "fab fa-twitter"
icon: "fa-brands fa-x-twitter"

- type: email
icon: "fas fa-envelope"
Expand Down
9 changes: 8 additions & 1 deletion _data/locales/de-DE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ post:
pageview_measure: Aufrufe
read_time:
unit: Minuten
prompt: lesen
prompt: Lesezeit
relate_posts: Weiterlesen
share: Teilen
button:
Expand All @@ -70,6 +70,13 @@ post:
title: Link kopieren
succeed: Link erfolgreich kopiert!

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%d.%m.%Y"
dayjs: "DD.MM.YYYY"

# categories page
categories:
category_measure:
Expand Down
2 changes: 1 addition & 1 deletion _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ copyright:
Except where otherwise noted, the blog posts on this site are licensed
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.

meta: Using the :PLATFORM theme :THEME
meta: Using the :THEME theme for :PLATFORM

not_found:
statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
Expand Down
46 changes: 28 additions & 18 deletions _data/locales/ru-RU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# ----- Commons label -----

layout:
post: Публикация
post: Пост
category: Категория
tag: Тег

# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Домашняя страница
home: Главная
categories: Категории
tags: Теги
archives: Архив
Expand All @@ -19,8 +19,8 @@ tabs:
# the text displayed in the search bar & search results
search:
hint: поиск
cancel: Отменить
no_results: Ох! Ничего не найдено.
cancel: Отмена
no_results: Упс! Ничего не найдено.

panel:
lastmod: Недавно обновлено
Expand All @@ -30,48 +30,58 @@ panel:
copyright:
# Shown at the bottom of the post
license:
template: Публикация защищена лицензией :LICENSE_NAME.
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 International (CC BY 4.0),
если в тексте публикации не указано иное.
Если не указано иное, авторские посты на этом сайте защищены лицензией Creative Commons Attribution 4.0 International (CC BY 4.0).

meta: Powered by :PLATFORM with :THEME theme
meta: Использует тему :THEME для :PLATFORM

not_found:
statment: Извините, эта ссылка указывает на ресурс который не существует.
statment: Извините, мы перепутали URL-адрес или он указывает на что-то несуществующее.

notification:
update_found: Доступна новая версия контента.
update: Обновлять
update: Обновить

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

post:
written_by: Автор
posted: Время публикации
posted: Опубликовано
updated: Обновлено
words: слов
pageview_measure: просмотров
read_time:
unit: минут
unit: мин.
prompt: чтения
relate_posts: Вам также может быть интересно
relate_posts: Похожие посты
share: Поделиться
button:
next: Предыдущая публикация
previous: Следующая публикация
next: Следующий пост
previous: Предыдущий пост
copy_code:
succeed: Скопировано успешно!
succeed: Скопировано!
share_link:
title: Скопировать ссылку
succeed: Ссылка успешно скопирована!

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%d.%m.%Y"
dayjs: "DD.MM.YYYY"

# categories page
categories:
category_measure: категории
post_measure: публикации
category_measure:
singular: категория
plural: категории
post_measure:
singular: пост
plural: посты
8 changes: 4 additions & 4 deletions _data/locales/tr-TR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ search:
no_results: Hop! Öyle bir şey bulamadım.

panel:
lastmod: Yeni Güncellendi
lastmod: Son Güncellenenler
trending_tags: Yükselen Etiketler
toc: İçindekiler

Expand All @@ -38,7 +38,7 @@ copyright:
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.
Kısaca sayfa linkini vererek değiştirebilir / paylaşabilirsiniz.

meta: :PLATFORM ve :THEME teması

Expand All @@ -53,8 +53,8 @@ notification:

post:
written_by: Yazan
posted: Gönderilme Tarihi
updated: Güncellenme Tarihi
posted: Gönderim
updated: Güncelleme
words: sözcük
pageview_measure: görüntülenme
read_time:
Expand Down
Loading