Skip to content

Commit

Permalink
BUG FIX! The tasks of gulp-libsquoosh and addPassthroughCopy/11ty cou…
Browse files Browse the repository at this point in the history
…ld not be separated.
  • Loading branch information
Morry Masahiko committed Jun 15, 2022
1 parent 1658d8b commit b05a038
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
4 changes: 0 additions & 4 deletions Eleventy.js
Expand Up @@ -193,10 +193,6 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({ './source/static/assets/scripts/jquery.min.js': './assets/scripts/jquery.min.js' });
eleventyConfig.addPassthroughCopy({ './source/static/assets/scripts/jquery.scrollex.min.js': './assets/scripts/jquery.scrollex.min.js' });
//
eleventyConfig.addPassthroughCopy({ './source/assets/images/**/*.{jpg,jpeg,png,webp}': './images' });
eleventyConfig.addPassthroughCopy({ './source/images/**/*.{jpg,jpeg,png,webp}': './images' });
eleventyConfig.addPassthroughCopy({ './source/contents/**/*.{jpg,jpeg,png,webp}': './images' });
//
eleventyConfig.addPassthroughCopy({ './source/static/meta/**': './' });

//
Expand Down
23 changes: 2 additions & 21 deletions gulpfile.js
Expand Up @@ -100,31 +100,12 @@ function javascript(done) {
function image(done) {
console.log('[00:00:00] Images');

//
// 画像は各種ディレクトリに散らばっているが、全て`./images`に格納
// 本番時のみ圧縮を行う
//
// .pipe(mode.production(squoosh()))
// の場合、npmスクリプトから`npm-run-all --parallel/--sequential`で
// `--production`を付与しているスクリプトを起動しても`squoosh`しないので
// 敢えて下記の様にしている
// 理由不明
//

if (mode.production()) {
src(path.image)
.pipe(rename(function (path) {
path.dirname = '/images';
}))
.pipe(squoosh())
.pipe(dest(outputPath));
} else {
src(path.image)
src(path.image)
.pipe(rename(function (path) {
path.dirname = '/images';
}))
.pipe(mode.production(squoosh()))
.pipe(dest(outputPath));
}
done();
}

Expand Down
2 changes: 1 addition & 1 deletion source/_includes/partials/footer.njk
Expand Up @@ -33,7 +33,7 @@
<h3>Special thanks...</h3>
<p>
{% for item in thanks %}<a href="{{ item.url }}" title="{{ item.description | escape }}">{{ item.name | escape }}</a>{% if loop.last %}.{% else %}, {% endif %}{% endfor %}<br />
And last built on {{ buildInfo.time.formatted }} <a href="{{ site.footer.github }}/commit/{{ buildInfo.hash }}">{{ buildInfo.hash }}</a>.
And <a href="{{ site.footer.github }}/commit/{{ buildInfo.hash }}">last built on {{ buildInfo.time.formatted }}, {{ buildInfo.hash }}</a>.
</p>
</div>

Expand Down
8 changes: 7 additions & 1 deletion source/assets/styles/_markdown.scss
Expand Up @@ -67,6 +67,10 @@
padding-bottom: 0;
line-height: 1.2;
color: _palette(fg-light);

small {
font-size: 0.8em;
}
}

h2.major {
Expand All @@ -75,10 +79,12 @@

h3 {
font-size: 1.4em;
font-weight: bold;
}

h4 {
font-size: 1.2em;
font-weight: normal;
}

h5 {
Expand Down Expand Up @@ -254,7 +260,7 @@
border-bottom: none;

&:hover {
border-bottom: dotted 2px _palette(fg-light);
border-bottom: dotted 1px _palette(fg-light);
}
}
}
Expand Down

0 comments on commit b05a038

Please sign in to comment.