Skip to content

Template starter for generating GitHub Pages using Mithril

License

Notifications You must be signed in to change notification settings

rglara/mithril-ghpages-template

Repository files navigation

Mithril GitHub Pages Template

This repo is a skeleton template for establishing a GitHub Pages site of a Mithril-based single page application (SPA).

Design

  • 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

How to Develop

  1. Download the contents of this repo
  2. Open Visual Studio Code
  3. Open folder of downloaded contents
    • VSCode should ask to re-open in container, which initializes the Docker container for NodeJs development
  4. Within terminal inside VSCode, run yarn install to download and install prerequisites
  5. Within terminal inside VSCode, run yarn start to generate Mithril content
  6. Open ./dist/index.html in your browser
  7. Edit ./src/index.ts (and add other content)
    • Webpack should notice changes upon saving and regenerate contents
    • Refresh browser to view changes

How to Publish

  1. 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])
  2. Clone your repo locally (master branch, by default)
  3. Run yarn release
    • Webpack will bundle and minimize content, which will then be put in the docs folder
  4. 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
  5. Commit and push your updates to GitHub
  6. On GitHub, configure your repo's settings to select the Source of your GitHub Pages to be the "master branch /docs folder"
  7. Open https://[username].github.io/[repoName] in your browser to view your newly published content

License

MIT

About

Template starter for generating GitHub Pages using Mithril

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published