Skip to content
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
28 changes: 27 additions & 1 deletion _assets/img/logogram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 1 addition & 8 deletions _includes/head.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
from anyone who needs it.
{%- endcomment -%}
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link
type='image/svg+xml'
rel='shortcut icon preload'
as='image'
href='/assets/img/logogram.svg'
integrity='sha512-oCOiQlcNbSk49EgFYP+3Hr94accDzoufgSJ4EHPnqMF5FthjzWh0ZWN2zWHSBwH+gsUn4B0IFdmex9Jq9usqmg=='
crossorigin='anonymous'
>
<link rel='icon' type='image/svg+xml' href='/assets/img/logogram.svg'>
<meta
name='description'
content='{{ description | default: siteDescription }}'
Expand Down
20 changes: 18 additions & 2 deletions eleventy.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,26 @@ export default async function (eleventyConfig) {
// shortest name free in each is the same name, so two marks that arrived
// with different ids would leave with one between them and `url(#…)` in
// the second would reach into the first.
// `inlineStyles` folds a stylesheet into the attributes it applies to and
// drops what is left, which for a mark answering to `prefers-color-scheme`
// means keeping one theme and losing the other.
const svgo = {
multipass: true,
plugins: [
{
name: 'preset-default',
params: { overrides: { inlineStyles: false } },
},
],
};

const inline = {
multipass: true,
plugins: [
{ name: 'preset-default', params: { overrides: { cleanupIds: false } } },
{
name: 'preset-default',
params: { overrides: { cleanupIds: false, inlineStyles: false } },
},
],
};

Expand All @@ -197,7 +213,7 @@ export default async function (eleventyConfig) {
* @param {object} [config] What to pass the optimizer.
* @returns {string} The optimized markup.
*/
const shrinkSvg = (svg, config = { multipass: true }) => {
const shrinkSvg = (svg, config = svgo) => {
const optimized = optimizeSvg(svg, config).data;

if (hasViewBox(svg) && !hasViewBox(optimized)) {
Expand Down
Loading