Skip to content

Commit

Permalink
fix: svg favicon wd-175 (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
what1s1ove authored Nov 29, 2023
1 parent f9779f0 commit 119f349
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
6 changes: 1 addition & 5 deletions eleventy.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,8 @@ let init = (config) => {

config.addExtension(`svg`, {
/** @type {import('@11ty/eleventy/src/Engines/TemplateEngine')['compile']} */
compile: (content, url) => {
compile: (content) => {
return () => {
if (url === `./source/images/icons/icon.svg`) {
return content
}

return svgo.optimize(content).data
}
},
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"stylelint": "15.11.0",
"stylelint-config-standard": "34.0.0",
"stylelint-order": "6.0.3",
"svgo": "3.0.3",
"svgo": "3.0.4",
"typescript": "5.2.2"
},
"browserslist": [
Expand Down
13 changes: 7 additions & 6 deletions source/images/icons/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion source/layouts/page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<link rel="preload" href="/fonts/roboto-400.woff2" crossorigin="anonymous" as="font" type="font/woff2" />
<link rel="preload" href="/fonts/roboto-700.woff2" crossorigin="anonymous" as="font" type="font/woff2" />

<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/images/icons/icon.svg" type="image/svg+xml" />
<link rel="manifest" href="/manifest.json" />

Expand Down

0 comments on commit 119f349

Please sign in to comment.