Git Product home page Git Product logo

dog2.dev's Introduction

Nuxt on GitHub Pages

nuxt-template.github.io

A GitHub Pages template to serve a Nuxt (Vue.js) application.

Demo: https://nuxt.lloyd.cx/

Getting Started

Usage

Get started in minutes with these instructions:

  1. Create a repository from this template (include all branches).
  2. Rename your repository to <username>.github.io.
  3. Make sure that GitHub Pages uses the build branch.

The branch can be selected at Settings -> Options -> GitHub Pages -> Source.

This may take a minute or two to update.

Architecture

This is real simple:

  • The master branch contains a Nuxt project.
  • The build branch will contain the compiled Nuxt application.
  • When you push to master, a GitHub Action compiles the updated project into build.

Development

Any commits pushed or merged into master will trigger the build action.

These changes will be reflected on your GitHub Pages site after around 60 seconds.

Domain Names

Apex Domain

First, set your domain name within the GitHub repositry.

  • In the CNAME file, replace example.com with your domain.

Second, configure your DNS host records with your domain provider.

  • Create an A record for host "@" pointing to 185.199.108.153.
  • Create an A record for host "@" pointing to 185.199.109.153.
  • Create an A record for host "@" pointing to 185.199.110.153.
  • Create an A record for host "@" pointing to 185.199.111.153.

Subdomains

You can configure a subdomain, such as www.[example.com], in your DNS host records.

  • Create a CNAME record for host "www" pointing to <username>.github.io.

Infinite Hosting

Want to know what makes this awesome? You can have a repository for each and every subdomain.

  1. Create a repository from this template with any name (include all branches).
  2. Enable GitHub Pages for it (Settings -> Options -> GitHub Pages -> Source).
  3. In the CNAME file, replace example.com with your apex and subdomain (i.e. blog.[example.com]).
  4. With your domain provider, create a CNAME record for host "[blog]" pointing to <username>.github.io.

Why does this work?

The repo's GitHub Pages already hosts itself at .github.io/, since GitHub sets up the environment and deployment for you when you enable Pages.

The CNAME just puts it on its own subdomain, instead of in its own subdirectory.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

dog2.dev's People

Contributors

lloydtao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.