This repository holds the source files, build and deployment scripts for my blog, kieranpotts.com.
To set up a local development environment for this project, the following software must installed locally:
-
Node ^v20.9.0
-
NPM ^v10.1.0
NVM for Unix or
NVM for Windows makes it easier
to switch between different versions of Node for different projects.
NVM for Windows does
not support
the .nvmrc
file, so Windows users must specify the version number on the
command line.
nvm use
nvm use 20.9.0
This project has only development dependencies, which are defined in the
repository-level package.json
file.
To install the development dependencies, run:
npm install
The following run-scripts are available. Use npm run [command]
, eg.
npm run dev:start
.
-
dev:start
runs a clean development build, starts the development server, and sets up watchers, so subsequent changes to some source files are automatically rebuilt and reloaded into the web server. The development server runs fromlocalhost:8080
. There’s also an interface to BrowserSync, the dev server, fromlocalhost:8081
. TypeCtrl
+C
to stop the server. -
prod:build
produces a clean, production-ready build in thedist
directory. The artifacts produced by this command are intended to be shipped to production. -
prod:serve
statically serves the contents of the builtdist
directory using a server that closely approximates the production environment, for example by enabling Netlify redirects and custom headers. Live reload is not enabled for this server, since this environment is intended to closely approximate the production environment. Use this to manually verify the output ofprod:build
before releasing the changes to production systems. The server runs onlocalhost:8080
. TypeCtrl
+C
to stop the server.
This repository has only a single branch, dev
. Updates to the this branch
in the upstream reference repository are automatically deployed to production
on Netlify.
*.adoc
files in the src
repository that are prefixed with at
least one underscore character will NOT be deployed to production. This is
useful for drafts and other content that is not ready for publication.
Copyright © 2020-present Kieran Potts, CC BY-SA 4.0