A Quick Note
The source code for this website is stored in this
source branch because
GitHub Pages only builds user pages from the master branch, so I am using the
master branch for storing the built site.
What is this?
A website where I can start at the basics and gradually throw in more complex stuff as I learn more technologies.
To start the website, run:
This will start an HTTP server which serves files from the build directory. It will also open a window in your browser at the home page of the website. Finally, it watches the JS and HTML files as you change them, as they need to be built for changes to show on the website. Whenever you make changes to the website, make sure to reload in order to show the changes. You may want to do a force-reload (e.g. by Ctrl-F5), as the browser usually caches files.
note that the variables for Liquid templates are not currently watched, so if you modify a file in the includes folder or change a variable in buildtools/substitutions.js, you will have to restart the server for changes to take effect
To deploy the website to GitHub, use
npm run deploy
This will build the website and publish it to the gh-pages branch on GitHub.
The website can be built just once with:
npm run build
This does a few things:
- Uses Liquid (via the buildtools/liquidconvert.js script) to fill in the HTML templates in the templates folder
- Places all resulting files in the build folder, along with other necessary assets.