Skip to content
Branch: source
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
buildtools
includes
templates
.eslintrc.json
.gitignore
.npmrc
.prettierrc
CNAME
LICENSE
README.md
favicon.ico
package-lock.json
package.json

README.md

Personal Website

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?

Formerly

A website made with vanilla HTML, CSS, and JavaScript (i.e. no external dependencies). Available at btjanaka.net/vanilla. See Vanilla-js for more background.

Now

A website where I can start at the basics and gradually throw in more complex stuff as I learn more technologies.

Instructions

To start the website, run:

npm start

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.

Building

The website can be built just once with:

npm run build

This does a few things:

  • Uses Browserify to bundle all the Javascript files into a single "bundle.js" file
  • 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.
You can’t perform that action at this time.