You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a hint to generically set NUXT_APP_BASE_URL within a GitHub Action by: NUXT_APP_BASE_URL="/${GITHUB_REPOSITORY##*/}/" - so it works for any repo oob.
Give an example how to make favicon working in any case - for a custom domain as well as for hosting on <owner|organization>.github.io within nuxt.config.ts:
// https://nuxt.com/docs/api/configuration/nuxt-configexportdefaultdefineNuxtConfig({app: {head: {title: "My Page Title",link: [// https://nuxt.com/deploy/github-pages and https://vite.dev/guide/env-and-mode.html for details.// !!! Make use of compile time environment var NUXT_APP_BASE_URL to work for GitHub Pages deployments as well.// Assumption: favicon files in ~/public as ~/public/favicon.ico, ~/public/favicon-32x32.png etc.:{rel: "icon",type: "image/x-icon",href: (import.meta.env.NUXT_APP_BASE_URL ? import.meta.env.NUXT_APP_BASE_URL : "/")+"favicon.ico?x=2"},{rel: "icon",type: "image/png",sizes: "32x32",href: (import.meta.env.NUXT_APP_BASE_URL ? import.meta.env.NUXT_APP_BASE_URL : "/")+"favicon-32x32.png"},// ... add probable other icon variants accordingly],},},// ... continue with existing config});
The text was updated successfully, but these errors were encountered:
Proposal for Improvement
Current doc of Deploy Nuxt to GitHub Pages / github-pages.md should be enhanced by the following helpful details:
Add a hint to generically set
NUXT_APP_BASE_URL
within a GitHub Action by:NUXT_APP_BASE_URL="/${GITHUB_REPOSITORY##*/}/"
- so it works for any repo oob.Give an example how to make favicon working in any case - for a custom domain as well as for hosting on
<owner|organization>.github.io
withinnuxt.config.ts
:The text was updated successfully, but these errors were encountered: