generated from cotes2020/chirpy-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,956 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,69 +9,34 @@ theme: jekyll-theme-chirpy | |
lang: en | ||
|
||
# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker | ||
timezone: | ||
timezone: Europe/London | ||
|
||
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md | ||
# ↓ -------------------------- | ||
|
||
title: Chirpy # the main title | ||
title: Ryan's blog # the main title | ||
|
||
tagline: A text-focused Jekyll theme # it will display as the subtitle | ||
tagline: A blog about my programming projects # it will display as the subtitle | ||
|
||
description: >- # used by seo meta and the atom feed | ||
A minimal, responsive and feature-rich Jekyll theme for technical writing. | ||
blog using the jekyll theme | ||
# Fill in the protocol & hostname for your site. | ||
# E.g. 'https://username.github.io', note that it does not end with a '/'. | ||
url: "" | ||
url: "https://rynturtle.github.io" | ||
|
||
github: | ||
username: github_username # change to your GitHub username | ||
|
||
twitter: | ||
username: twitter_username # change to your Twitter username | ||
username: rynturtle # change to your GitHub username | ||
|
||
social: | ||
# Change to your full name. | ||
# It will be displayed as the default author of the posts and the copyright owner in the Footer | ||
name: your_full_name | ||
email: [email protected] # change to your email address | ||
name: Ryan Mclaughlin | ||
links: | ||
# The first element serves as the copyright owner's link | ||
- https://twitter.com/username # change to your Twitter homepage | ||
- https://github.com/username # change to your GitHub homepage | ||
# Uncomment below to add more social links | ||
# - https://www.facebook.com/username | ||
# - https://www.linkedin.com/in/username | ||
|
||
# Site Verification Settings | ||
webmaster_verifications: | ||
google: # fill in your Google verification code | ||
bing: # fill in your Bing verification code | ||
alexa: # fill in your Alexa verification code | ||
yandex: # fill in your Yandex verification code | ||
baidu: # fill in your Baidu verification code | ||
facebook: # fill in your Facebook verification code | ||
|
||
# ↑ -------------------------- | ||
# The end of `jekyll-seo-tag` settings | ||
|
||
# Web Analytics Settings | ||
analytics: | ||
google: | ||
id: # fill in your Google Analytics ID | ||
goatcounter: | ||
id: # fill in your GoatCounter ID | ||
umami: | ||
id: # fill in your Umami ID | ||
domain: # fill in your Umami domain | ||
matomo: | ||
id: # fill in your Matomo ID | ||
domain: # fill in your Matomo domain | ||
cloudflare: | ||
id: # fill in your Cloudflare Web Analytics token | ||
fathom: | ||
id: # fill in your Fathom Site ID | ||
|
||
|
||
|
||
# Page views settings | ||
pageviews: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- Cloudflare Web Analytics --> | ||
<script | ||
defer | ||
src="https://static.cloudflareinsights.com/beacon.min.js" | ||
data-cf-beacon='{"token": "{{ site.analytics.cloudflare.id }}"}' | ||
></script> | ||
<!-- End Cloudflare Web Analytics --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- Fathom --> | ||
<script | ||
src="https://cdn.usefathom.com/script.js" | ||
data-site="{{ site.analytics.fathom.id }}" | ||
defer> | ||
</script> | ||
<!-- End Fathom Code --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- GoatCounter --> | ||
<script | ||
async | ||
src="https://gc.zgo.at/count.js" | ||
data-goatcounter="https://{{ site.analytics.goatcounter.id }}.goatcounter.com/count" | ||
></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.id }}"></script> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', function (event) { | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { | ||
dataLayer.push(arguments); | ||
} | ||
|
||
gtag('js', new Date()); | ||
gtag('config', '{{ site.analytics.google.id }}'); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- Matomo --> | ||
<script type="text/javascript"> | ||
var _paq = window._paq = window._paq || []; | ||
_paq.push(['trackPageView']); | ||
_paq.push(['enableLinkTracking']); | ||
(function() { | ||
var u="//{{ site.analytics.matomo.domain }}/"; | ||
_paq.push(['setTrackerUrl', u+'matomo.php']); | ||
_paq.push(['setSiteId', {{ site.analytics.matomo.id }}]); | ||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | ||
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); | ||
})(); | ||
</script> | ||
<!-- End Matomo Code --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- Umami --> | ||
<script | ||
defer | ||
src="{{ site.analytics.umami.domain }}/script.js" | ||
data-website-id="{{ site.analytics.umami.id }}" | ||
></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- The comments switcher --> | ||
{% if page.comments and site.comments.provider %} | ||
{% capture path %}comments/{{ site.comments.provider }}.html{% endcapture %} | ||
{% include {{ path }} %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- The Disqus lazy loading. --> | ||
|
||
<div id="disqus_thread"> | ||
<p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
var disqus_config = function () { | ||
this.page.url = '{{ page.url | absolute_url }}'; | ||
this.page.identifier = '{{ page.url }}'; | ||
}; | ||
|
||
{%- comment -%} Lazy loading {%- endcomment -%} | ||
var disqus_observer = new IntersectionObserver( | ||
function (entries) { | ||
if (entries[0].isIntersecting) { | ||
(function () { | ||
var d = document, | ||
s = d.createElement('script'); | ||
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
|
||
disqus_observer.disconnect(); | ||
} | ||
}, | ||
{ threshold: [0] } | ||
); | ||
|
||
disqus_observer.observe(document.getElementById('disqus_thread')); | ||
|
||
{%- comment -%} Auto switch theme {%- endcomment -%} | ||
function reloadDisqus() { | ||
if (event.source === window && event.data && event.data.direction === ModeToggle.ID) { | ||
{%- comment -%} Disqus hasn't been loaded {%- endcomment -%} | ||
if (typeof DISQUS === 'undefined') { | ||
return; | ||
} | ||
|
||
if (document.readyState == 'complete') { | ||
DISQUS.reset({ reload: true, config: disqus_config }); | ||
} | ||
} | ||
} | ||
|
||
if (document.getElementById('mode-toggle')) { | ||
window.addEventListener('message', reloadDisqus); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!-- https://giscus.app/ --> | ||
<script type="text/javascript"> | ||
(function () { | ||
const origin = 'https://giscus.app'; | ||
const lightTheme = 'light'; | ||
const darkTheme = 'dark_dimmed'; | ||
|
||
let initTheme = lightTheme; | ||
const html = document.documentElement; | ||
|
||
if ( | ||
(html.hasAttribute('data-mode') && | ||
html.getAttribute('data-mode') === 'dark') || | ||
(!html.hasAttribute('data-mode') && | ||
window.matchMedia('(prefers-color-scheme: dark)').matches) | ||
) { | ||
initTheme = darkTheme; | ||
} | ||
|
||
let lang = '{{ site.comments.giscus.lang | default: lang }}'; | ||
{%- comment -%} https://github.com/giscus/giscus/tree/main/locales {%- endcomment -%} | ||
if (lang.length > 2 && !lang.startsWith('zh')) { | ||
lang = lang.slice(0, 2); | ||
} | ||
|
||
let giscusAttributes = { | ||
src: 'https://giscus.app/client.js', | ||
'data-repo': '{{ site.comments.giscus.repo}}', | ||
'data-repo-id': '{{ site.comments.giscus.repo_id }}', | ||
'data-category': '{{ site.comments.giscus.category }}', | ||
'data-category-id': '{{ site.comments.giscus.category_id }}', | ||
'data-mapping': '{{ site.comments.giscus.mapping | default: 'pathname' }}', | ||
'data-strict' : '{{ site.comments.giscus.strict | default: '0' }}', | ||
'data-reactions-enabled': '{{ site.comments.giscus.reactions_enabled | default: '1' }}', | ||
'data-emit-metadata': '0', | ||
'data-theme': initTheme, | ||
'data-input-position': '{{ site.comments.giscus.input_position | default: 'bottom' }}', | ||
'data-lang': lang, | ||
'data-loading': 'lazy', | ||
crossorigin: 'anonymous', | ||
async: '' | ||
}; | ||
|
||
let giscusScript = document.createElement('script'); | ||
Object.entries(giscusAttributes).forEach(([key, value]) => | ||
giscusScript.setAttribute(key, value) | ||
); | ||
document.getElementById('tail-wrapper').appendChild(giscusScript); | ||
|
||
addEventListener('message', (event) => { | ||
if ( | ||
event.source === window && | ||
event.data && | ||
event.data.direction === ModeToggle.ID | ||
) { | ||
{%- comment -%} global theme mode changed {%- endcomment -%} | ||
const mode = event.data.message; | ||
const theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme; | ||
|
||
const message = { | ||
setConfig: { | ||
theme: theme | ||
} | ||
}; | ||
|
||
const giscus = document.getElementsByClassName('giscus-frame')[0].contentWindow; | ||
giscus.postMessage({ giscus: message }, origin); | ||
} | ||
}); | ||
})(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- https://utteranc.es/ --> | ||
<script | ||
src="https://utteranc.es/client.js" | ||
repo="{{ site.comments.utterances.repo }}" | ||
issue-term="{{ site.comments.utterances.issue_term }}" | ||
crossorigin="anonymous" | ||
async | ||
></script> | ||
|
||
<script type="text/javascript"> | ||
(function () { | ||
const origin = 'https://utteranc.es'; | ||
const lightTheme = 'github-light'; | ||
const darkTheme = 'github-dark'; | ||
let initTheme = lightTheme; | ||
const html = document.documentElement; | ||
|
||
if ( | ||
(html.hasAttribute('data-mode') && html.getAttribute('data-mode') === 'dark') || | ||
(!html.hasAttribute('data-mode') && window.matchMedia('(prefers-color-scheme: dark)').matches) | ||
) { | ||
initTheme = darkTheme; | ||
} | ||
|
||
addEventListener('message', (event) => { | ||
let theme; | ||
|
||
{%- comment -%} credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> {%- endcomment -%} | ||
if (event.origin === origin) { | ||
{%- comment -%} page initial {%- endcomment -%} | ||
theme = initTheme; | ||
} else if (event.source === window && event.data && event.data.direction === ModeToggle.ID) { | ||
{%- comment -%} global theme mode changed {%- endcomment -%} | ||
const mode = event.data.message; | ||
theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme; | ||
} else { | ||
return; | ||
} | ||
|
||
const message = { | ||
type: 'set-theme', | ||
theme: theme | ||
}; | ||
|
||
const utterances = document.getElementsByClassName('utterances-frame')[0].contentWindow; | ||
utterances.postMessage(message, origin); | ||
}); | ||
})(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- | ||
Date format snippet | ||
See: ${JS_ROOT}/utils/locale-dateime.js | ||
--> | ||
|
||
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %} | ||
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %} | ||
|
||
<time | ||
{% if include.class %} | ||
class="{{ include.class }}" | ||
{% endif %} | ||
data-ts="{{ include.date | date: '%s' }}" | ||
data-df="{{ df_dayjs }}" | ||
{% if include.tooltip %} | ||
data-bs-toggle="tooltip" data-bs-placement="bottom" | ||
{% endif %} | ||
> | ||
{{ include.date | date: df_strftime }} | ||
</time> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% assign src = include.src | strip %} | ||
{% assign title = include.title | strip %} | ||
{% assign types = include.types | default: '' | strip | split: '|' %} | ||
|
||
{% unless src contains '://' %} | ||
{%- capture src -%} | ||
{% include media-url.html src=src subpath=page.media_subpath %} | ||
{%- endcapture -%} | ||
{% endunless %} | ||
|
||
<p> | ||
<audio class="embed-audio" controls> | ||
{% assign extension = src | split: '.' | last %} | ||
{% assign types = extension | concat: types %} | ||
|
||
{% assign ext_size = extension | size %} | ||
{% assign src_size = src | size %} | ||
{% assign slice_size = src_size | minus: ext_size %} | ||
|
||
{% assign filepath = src | slice: 0, slice_size %} | ||
|
||
{% for type in types %} | ||
{% assign src = filepath | append: type %} | ||
{% assign media_item = site.data.media | find: 'extension', type %} | ||
{% assign mime_type = media_item.mime_type | default: type %} | ||
<source src="{{ src }}" type="audio/{{ mime_type }}"> | ||
{% endfor %} | ||
|
||
Your browser does not support the audio tag. Here is a | ||
<a href="{{ src | strip }}">link to the audio file</a> instead. | ||
</audio> | ||
{% if title %} | ||
<em>{{ title }}</em> | ||
{% endif %} | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<iframe | ||
class="embed-video" | ||
loading="lazy" | ||
src="https://player.bilibili.com/player.html?bvid={{ include.id }}" | ||
scrolling="no" | ||
frameborder="0" | ||
framespacing="0" | ||
allowfullscreen="true" | ||
></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<iframe | ||
class="embed-video twitch" | ||
loading="lazy" | ||
src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}" | ||
frameborder="0" | ||
allowfullscreen="true" | ||
scrolling="no" | ||
></iframe> |
Oops, something went wrong.