Merge branch 'master' into production
This commit is contained in:
commit
387f0ec64a
8 changed files with 49 additions and 40 deletions
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
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.6.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.6.0...v5.6.1) (2023-03-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **deps:** `tocbot` has no initialization detection ([#957](https://github.com/cotes2020/jekyll-theme-chirpy/issues/957)) ([8225174](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8225174cb5e02fda7b3cc548ec821c876b0a5139))
|
||||||
|
* mode-toggle leads to Disqus loading failure ([#945](https://github.com/cotes2020/jekyll-theme-chirpy/issues/945)) ([6fec411](https://github.com/cotes2020/jekyll-theme-chirpy/commit/6fec411c18ca5689c467c7b216ddeda02df23623))
|
||||||
|
* pageviews not updated immediately ([8b4f99c](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8b4f99c87f9a9227f47e84fb39d7b0f551d6f4dd))
|
||||||
|
|
||||||
## [5.6.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.5.2...v5.6.0) (2023-03-17)
|
## [5.6.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v5.5.2...v5.6.0) (2023-03-17)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,21 @@
|
||||||
<!--
|
<!-- The Disqus lazy loading. -->
|
||||||
The Disqus lazy loading.
|
|
||||||
-->
|
|
||||||
<div id="disqus_thread" class="pt-2 pb-2">
|
<div id="disqus_thread" class="pt-2 pb-2">
|
||||||
<p class="text-center text-muted small">
|
<p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
|
||||||
Comments powered by <a href="https://disqus.com/">Disqus</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var disqus_config = function () {
|
var disqus_config = function () {
|
||||||
this.page.url = '{{ page.url | absolute_url }}';
|
this.page.url = '{{ page.url | absolute_url }}';
|
||||||
this.page.identifier = '{{ page.url }}';
|
this.page.identifier = '{{ page.url }}';
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Lazy loading */
|
/* Lazy loading */
|
||||||
var disqus_observer = new IntersectionObserver(function (entries) {
|
var disqus_observer = new IntersectionObserver(
|
||||||
if(entries[0].isIntersecting) {
|
function (entries) {
|
||||||
|
if (entries[0].isIntersecting) {
|
||||||
(function () {
|
(function () {
|
||||||
var d = document, s = d.createElement('script');
|
var d = document,
|
||||||
|
s = d.createElement('script');
|
||||||
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
||||||
s.setAttribute('data-timestamp', +new Date());
|
s.setAttribute('data-timestamp', +new Date());
|
||||||
(d.head || d.body).appendChild(s);
|
(d.head || d.body).appendChild(s);
|
||||||
|
@ -26,16 +23,17 @@
|
||||||
|
|
||||||
disqus_observer.disconnect();
|
disqus_observer.disconnect();
|
||||||
}
|
}
|
||||||
}, { threshold: [0] });
|
},
|
||||||
|
{ threshold: [0] }
|
||||||
|
);
|
||||||
|
|
||||||
disqus_observer.observe(document.querySelector('#disqus_thread'));
|
disqus_observer.observe(document.querySelector('#disqus_thread'));
|
||||||
|
|
||||||
/* Auto switch theme */
|
/* Auto switch theme */
|
||||||
function reloadDisqus() {
|
function reloadDisqus() {
|
||||||
if (event.source === window && event.data &&
|
if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
|
||||||
event.data.direction === ModeToggle.ID) {
|
|
||||||
/* Disqus hasn't been loaded */
|
/* Disqus hasn't been loaded */
|
||||||
if (typeof DISQUS === "undefined") {
|
if (typeof DISQUS === 'undefined') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +43,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const modeToggle = document.querySelector(".mode-toggle");
|
if (document.querySelector('.mode-toggle')) {
|
||||||
|
window.addEventListener('message', reloadDisqus);
|
||||||
if (typeof modeToggle !== "undefined") {
|
|
||||||
window.addEventListener("message", reloadDisqus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -193,8 +193,8 @@ function fetchProxyPageviews() {
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: PvOpts.getProxyMeta(),
|
url: PvOpts.getProxyMeta(),
|
||||||
dataType: 'jsonp',
|
dataType: 'jsonp',
|
||||||
jsonpCallback: 'displayPageviews',
|
|
||||||
success: (data) => {
|
success: (data) => {
|
||||||
|
displayPageviews(data);
|
||||||
PvStorage.saveProxyCache(JSON.stringify(data));
|
PvStorage.saveProxyCache(JSON.stringify(data));
|
||||||
},
|
},
|
||||||
error: (jqXHR, textStatus, errorThrown) => {
|
error: (jqXHR, textStatus, errorThrown) => {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
export function toc() {
|
export function toc() {
|
||||||
|
if (document.querySelector('#core-wrapper h2,#core-wrapper h3')) {
|
||||||
// see: https://github.com/tscanlin/tocbot#usage
|
// see: https://github.com/tscanlin/tocbot#usage
|
||||||
tocbot.init({
|
tocbot.init({
|
||||||
tocSelector: '#toc',
|
tocSelector: '#toc',
|
||||||
|
@ -8,4 +9,5 @@ export function toc() {
|
||||||
orderedList: false,
|
orderedList: false,
|
||||||
scrollSmooth: false
|
scrollSmooth: false
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*!
|
/*!
|
||||||
* The styles for Jekyll theme Chirpy
|
* The styles for Jekyll theme Chirpy
|
||||||
*
|
*
|
||||||
* Chirpy v5.6.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
* Chirpy v5.6.1 (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.6.0"
|
spec.version = "5.6.1"
|
||||||
spec.authors = ["Cotes Chung"]
|
spec.authors = ["Cotes Chung"]
|
||||||
spec.email = ["cotes.chung@gmail.com"]
|
spec.email = ["cotes.chung@gmail.com"]
|
||||||
|
|
||||||
|
|
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "jekyll-theme-chirpy",
|
"name": "jekyll-theme-chirpy",
|
||||||
"version": "5.6.0",
|
"version": "5.6.1",
|
||||||
"description": "A minimal, responsive and feature-rich Jekyll theme for technical writing.",
|
"description": "A minimal, responsive and feature-rich Jekyll theme for technical writing.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -21,15 +21,15 @@
|
||||||
"fixlint": "npm run test -- --fix"
|
"fixlint": "npm run test -- --fix"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.21.0",
|
"@babel/core": "^7.21.3",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||||
"@babel/preset-env": "^7.20.2",
|
"@babel/preset-env": "^7.20.2",
|
||||||
"@rollup/plugin-babel": "^6.0.3",
|
"@rollup/plugin-babel": "^6.0.3",
|
||||||
"@rollup/plugin-terser": "^0.4.0",
|
"@rollup/plugin-terser": "^0.4.0",
|
||||||
"rimraf": "^4.4.0",
|
"rimraf": "^4.4.1",
|
||||||
"rollup": "^3.19.1",
|
"rollup": "^3.20.2",
|
||||||
"rollup-plugin-license": "^3.0.1",
|
"rollup-plugin-license": "^3.0.1",
|
||||||
"stylelint": "^15.2.0",
|
"stylelint": "^15.3.0",
|
||||||
"stylelint-config-standard-scss": "^7.0.1"
|
"stylelint-config-standard-scss": "^7.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,9 @@ function build(filename) {
|
||||||
name: 'Chirpy',
|
name: 'Chirpy',
|
||||||
sourcemap: !isProd
|
sourcemap: !isProd
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
include: `${JS_SRC}/**`
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
babel({
|
babel({
|
||||||
babelHelpers: 'bundled',
|
babelHelpers: 'bundled',
|
||||||
|
|
Loading…
Reference in a new issue