Skip to content

Commit

Permalink
🌠 Support favicon in static builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Oct 3, 2024
1 parent 50c6258 commit 7770a03
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/new-pens-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@myst-theme/article': patch
'@myst-theme/book': patch
---

Support favicon in static builds
5 changes: 4 additions & 1 deletion themes/article/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export const links: LinksFunction = () => {
return [
{
rel: 'icon',
href: '/favicon.ico',
href:
process.env.MODE === 'static'
? `${process.env.BASE_URL || ''}/favicon.ico`
: '/favicon.ico',
},
{ rel: 'stylesheet', href: tailwind },
{ rel: 'stylesheet', href: thebeCoreCss },
Expand Down
5 changes: 4 additions & 1 deletion themes/book/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const links: LinksFunction = () => {
return [
{
rel: 'icon',
href: '/favicon.ico',
href:
process.env.MODE === 'static'
? `${process.env.BASE_URL || ''}/favicon.ico`
: '/favicon.ico',
},
{ rel: 'stylesheet', href: tailwind },
{ rel: 'stylesheet', href: thebeCoreCss },
Expand Down

0 comments on commit 7770a03

Please sign in to comment.