Skip to content

Updating to Chirpy 6.1.0 #27

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 1 commit into from
Aug 18, 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
2 changes: 1 addition & 1 deletion .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v2
30 changes: 30 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Close stale issues and PRs"

on:
schedule:
- cron: "0 0 * * *" # every day at 00:00 UTC

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
days-before-stale: 30
days-before-close: 1
stale-issue-label: stale
exempt-issue-labels: pending
stale-issue-message: >
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
Thank you for your contributions.
stale-pr-label: stale
exempt-pr-labels: pending
stale-pr-message: >
This PR has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
Thank you for your contributions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

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

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

Expand Down Expand Up @@ -31,18 +31,19 @@ See commit: [c432906](https://github.com/joshjohanning/joshjohanning.github.io/c

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

See: [#8](https://github.com/joshjohanning/joshjohanning.github.io/pull/8)
- See: [#8](https://github.com/joshjohanning/joshjohanning.github.io/pull/8)
- In [#27](https://github.com/joshjohanning/joshjohanning.github.io/pull/27), I updated the `sidebar-active-color` property to the latest upstream value

### Adding Speaking tab

Used an icon from [fontawesome](https://fontawesome.com/v4/icons/)

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

- Upstream commit: [4b6ccbc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/4b6ccbcbccce27b9fcb035812efefe4eb69301cf)
- 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 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 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

## Upgrading the Theme

Expand All @@ -55,17 +56,16 @@ Since we aren't using the theme gem (so we can do customizations), we have to do
- 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
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`
- The `^` is important otherwise you will not be including the first commit - but the commit might get picked up in the maintainer's merge commit for the release anyways - and the quotes are necessary around the commits in `zsh` b/c of the `^`
- 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`
- If getting GPG errors, modify the git config: `git config commit.gpgsign false`
- 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"`
7. Rebase the number of commits you just brought in (you should see icon in VS Code): `git rebase -i HEAD~16`
3. 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
8. Update author and commit time: `git commit --amend --author "Josh Johanning <joshjohanning@github.com>" --date=now`
9. [Test changes locally before pushing](#building--testing-locally)
4. Update author and commit time: `git commit --amend --author "Josh Johanning <joshjohanning@github.com>" --date=now`
5. [Test changes locally before pushing](#building--testing-locally)

## Building / Testing Locally

Expand Down
4 changes: 0 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ google_site_verification: eTIC71VhPBtwll8rNv7qlXud1yJh6E88No39MdcM_MI # change t

google_analytics:
id: 'G-GE92ZJY22K' # fill in your Google Analytics ID
# Google Analytics pageviews report settings
pv:
proxy_endpoint: # fill in the Google Analytics superProxy endpoint of Google App Engine
cache_path: # the local PV cache data, friendly to visitors from GFW region

# Prefer color scheme setting.
#
Expand Down
91 changes: 91 additions & 0 deletions _data/locales/th.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# 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: >-
เว้นแต่ว่าจะระบุเป็นอย่างอื่น โพสต์บนเว็บไซต์นี้อยู่ภายใต้
สัญญาอนุญาตครีเอทีฟคอมมอนส์แบบ 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: คัดลอกลิงก์เรียบร้อยแล้ว!

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
category_measure:
singular: หมวดหมู่
plural: หมวดหมู่
post_measure:
singular: โพสต์
plural: โพสต์
3 changes: 0 additions & 3 deletions _data/origin/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ dayjs:
relativeTime: /assets/lib/dayjs/plugin/relativeTime.min.js
localizedFormat: /assets/lib/dayjs/plugin/localizedFormat.min.js

countup:
js: /assets/lib/countup.js/countUp.min.js

magnific-popup:
css: /assets/lib/magnific-popup/magnific-popup.css
js: /assets/lib/magnific-popup/jquery.magnific-popup.min.js
Expand Down
5 changes: 1 addition & 4 deletions _data/origin/cors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cdns:

# fonts

webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;900&display=swap
webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap

# Libraries

Expand Down Expand Up @@ -42,9 +42,6 @@ dayjs:
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/plugin/relativeTime.min.js
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/plugin/localizedFormat.min.js

countup:
js: https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js

magnific-popup:
css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
Expand Down
23 changes: 1 addition & 22 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
>

{% if page.layout == 'home' or page.layout == 'post' %}
{% if site.google_analytics.pv.proxy_endpoint %}
<meta name="pv-proxy-endpoint" content="{{ site.google_analytics.pv.proxy_endpoint }}">
{% endif %}

{% if site.google_analytics.pv.cache_path %}
<meta name="pv-cache-path" content="{{ site.google_analytics.pv.cache_path | relative_url }}">
{% endif %}
{% endif %}

{% capture seo_tags %}
{% seo title=false %}
{% endcapture %}
Expand Down Expand Up @@ -55,7 +45,7 @@
{{ site.title }}
</title>

{% include favicons.html %}
{% include_cached favicons.html %}

{% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %}
<link href="{{ site.data.origin[type].webfonts | relative_url }}" rel="stylesheet">
Expand All @@ -76,17 +66,6 @@

<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin="anonymous">
<link rel="dns-prefetch" href="https://www.googletagmanager.com">

{% if site.google_analytics.pv.proxy_endpoint %}
{% assign proxy_url = site.google_analytics.pv.proxy_endpoint
| replace: 'https://', ''
| split: '/'
| first
| prepend: 'https://'
%}
<link rel="preconnect" href="{{ proxy_url }}" crossorigin="use-credentials">
<link rel="dns-prefetch" href="{{ proxy_url }}">
{% endif %}
{% endif %}

<!-- Bootstrap -->
Expand Down
7 changes: 0 additions & 7 deletions _includes/js-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@

<!-- layout specified -->

{% if page.layout == 'post' %}
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
<!-- pv-report needs countup.js -->
{% assign urls = urls | append: ',' | append: site.data.origin[type].countup.js %}
{% endif %}
{% endif %}

{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
{% assign urls = urls | append: ',' | append: site.data.origin[type].lazysizes.js %}

Expand Down
2 changes: 1 addition & 1 deletion _includes/search-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
<div class="col-11 post-content">
<div id="search-hints">
{% include trending-tags.html %}
{% include_cached trending-tags.html %}
</div>
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
</div>
Expand Down
18 changes: 15 additions & 3 deletions _javascript/modules/components/img-lazyload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@
* Set up image lazy-load
*/

function stopShimmer($node) {
$node.parent().removeClass('shimmer');
}

export function imgLazy() {
if ($('#core-wrapper img[data-src]') <= 0) {
const $images = $('#core-wrapper img[data-src]');

if ($images.length <= 0) {
return;
}

/* Stop shimmer when image loaded */
document.addEventListener('lazyloaded', function (e) {
const $img = $(e.target);
$img.parent().removeClass('shimmer');
stopShimmer($(e.target));
});

/* Stop shimmer from cached images */
$images.each(function () {
if ($(this).hasClass('ls-is-cached')) {
stopShimmer($(this));
}
});
}
Loading