This repo is a skeleton template for establishing a GitHub Pages site of a Mithril-based single page application (SPA).
- Utilizes Visual Studio Code and remote containers, so you don't need to install the dev environment locally
- Utilizes Mithril as the Javascript SPA framework
- Utilizes Typescript and linting to ensure quality code
- Standard package utilities (Webpack and Yarn) with helpful commands
- Download the contents of this repo
- Open Visual Studio Code
- Ensure proper prerequisites for remote containers are in place
- Open folder of downloaded contents
- VSCode should ask to re-open in container, which initializes the Docker container for NodeJs development
- Within terminal inside VSCode, run
yarn install
to download and install prerequisites - Within terminal inside VSCode, run
yarn start
to generate Mithril content - Open
./dist/index.html
in your browser - Edit
./src/index.ts
(and add other content)- Webpack should notice changes upon saving and regenerate contents
- Refresh browser to view changes
- Create your own repo on GitHub
- It should have the name you want in the URL of your github.io page (aka
https://[username].github.io/[repoName]
)
- It should have the name you want in the URL of your github.io page (aka
- Clone your repo locally (
master
branch, by default) - Run
yarn release
- Webpack will bundle and minimize content, which will then be put in the
docs
folder
- Webpack will bundle and minimize content, which will then be put in the
- Copy the contents of your
docs
folder (and perhaps even all the source, for ease of later updating) into the repo folder you just cloned - Commit and push your updates to GitHub
- On GitHub, configure your repo's settings to select the Source of your GitHub Pages to be the "master branch /docs folder"
- See GitHub Help for details
- Open
https://[username].github.io/[repoName]
in your browser to view your newly published content