diff --git a/gulpfile.js b/gulpfile.js index 19693ab..46ac231 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -145,7 +145,8 @@ export const articles = () => export const images = () => src("src/*.avif", { encoding: false }).pipe(dest("dist/_assets/")); -export const svg = () => src("src/*.svg").pipe(dest("dist/_assets/")); +// SVG use has no way of allowing cross-origin, so we need to keep them with the HTML files. +export const svg = () => src("src/*.svg").pipe(dest("dist/")); export const css = () => src("src/index.css").pipe(postcss()).pipe(dest("dist/_assets/")); diff --git a/src/index.pug b/src/index.pug index 3779100..e9bfe47 100644 --- a/src/index.pug +++ b/src/index.pug @@ -17,8 +17,8 @@ ul.index-list h2 Find me elsewhere ul.index-list li: a(href="https://gitea.adaedra.eu/adaedra" target="_blank") - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-label="Gitea Logo"): use(href=`${asset("logos.svg")}#gitea`)/ + svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-label="Gitea Logo"): use(href="/logos.svg#gitea")/ | Gitea li: a(href="https://nerdculture.de/@adaedra" target="_blank" rel="noopener") - svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74 79" aria-label="Mastodon Logo"): use(href=`${asset("logos.svg")}#mastodon`)/ + svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74 79" aria-label="Mastodon Logo"): use(href="/logos.svg#mastodon")/ | Mastodon