masanos note

Using custom domain, Hosting to GitHub Pages with Nuxt3

2022-11-20
iconicon

package.json

{
  "private": true,
  "scripts": {
    "generate": "nuxt generate"
  },
  "devDependencies": {
    "nuxt": "3.0.0-rc.8",
  }
}

public/.nojekyll

The content of File is empty. Create File only.
Without this file, _ directories will not be read.

public/.CNAME

your custom domain.
In my case ↓

masanos.com

Generate

$ npm run generate

Then, html is created in .output/public

Change Directory

.output/public/* to docs
command image is like this. ↓

cp -r -p .output/public/* docs

and push your GitHub Repository.

Custom domain Settings

GitHub Guide
To create A records, point your apex domain to the IP addresses for GitHub Pages.

185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153

GitHubPages Setting

Source: Deploy from a branch
Branch: Your branch. In my case master &docs

push Save button.
can access http://masanos.com

Next, click the Enforce HTTPS check button to set it to https.
HTTPS provides a layer of encryption that prevents others from snooping on or tampering with traffic to your site.
When HTTPS is enforced, your site will only be served over HTTPS. Learn more.

At this time, the following message will appear, but you don't have to worry about it because the custom domain to be registered has not yet been reflected in the DNS server.

www.masanos.com is improperly configured
Domain's DNS record could not be retrieved. For more information, see documentation (InvalidDNSError).
Related Notessupabase with Vue3 Vue3 with bootstrap-icons[vue3]Install bootstrap5[vue3] install[Nuxt3]The first thing I do when launching a nuxt3 project. (^3.5.2)[Nuxt3][Bootstrap]Use Bootstrap icons with Nuxt3.[Node.js] Storing API results in js🔧[GA4][GTM]Configure GA4 in GTM🔧[Nuxt3]Using Google Tag manager with NUXT3🔧[GA4][BigQuery]Linking GA4 and BigQuery🔧When you want to scrape a SPA site, PhantomJsCloud is solution.🐛Error brew -v | update-reset🔧Use Google Spreadsheet as API with Nuxt3.🔧 Get json from a spreadsheet using GoogleSheetsAPI v4.🔧[Python]Install Python to Mac[Nuxt3]Install stable version of Nuxt 3.0.0. | npx nuxi init nuxt3-appMake Ranking with MySQLwatch & v-model | Vue3 (Nuxt3)window & document | Nuxt3GA4 with Nuxt3📝MySQL - Date Function - Tips Use Nuxt3 props🔧Use MicroCMS with Nuxt3🔧Using GoogleFont with Nuxt3📝Error - Deprecation Warning: $weight: Passing a number without unit % (100) is deprecated. - Bootstrap5 📝using sass with nuxt📝Firebase9 Google Authentication with Nuxt3.📝Set favicon in Nuxt3📝Use bootstrap5 with Nuxt3🐛Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement[Nuxt3] How to separate source directoriesmicroCMS & GitHub Actions & Nuxt3Using highlight in Nuxt3.use package.json value🔧frontmatter-markdown-loader & highlight.js🔧Install Font Awesome on Nuxt2 via npm.Github pages with GitHub ActionsCannot find module '~/*/*.vue' or its corresponding type declarations.Vetur(2307)🐛Cannot find module. Consider using '--resolveJsonModule' to import module with '.json' extension.ts(2732)TypeScript Object.🔧Bootstrap5 with Nuxt2processmd with Nuxt2🔧[MySQL]Install MySQL Workbench🔧Convert Markdown to HTML. convert frontmatter to json🔧Install homebrew, nvm, node to Mac🔧[MySQL]Record of installing and starting mysql with homebrew.🎨 Display the photo full screen and overlay the header and footer on top.🔧Set git repository to created project.[Nuxt3] Make Header & Footer
A record of the development is left in a web note.
Masanos
I want to make the world I see happy. Little by little, I am preparing to start a business. Thank you for your support.
Buy Me A Coffee
Copyright© masanos All Rights Reserved.