Another iteration of my personal website. This one is blog-focused and utilizes Jekyll for content management.
To bundle and run this website locally, run
bundle exec jekyll serve at the
root of this project.
To include drafts, incremental compilation, and livereload, use
bundle exec jekyll serve --incremental --drafts --livereload. (Livereload doesn't seem to
work on Windows.)
Note: Usually there is no need to trigger these manually; the deployment project automatically triggers a test run via a downstream pipeline after a successful deployment.
In most cases, it is not necessary to publish or deploy manually. This is
automated by the GitLab pipeline; simply bump the version in
push new changes to
master to trigger this project's pipeline. See the
Deployment section below for more information.
If for some reason it is necessary to manually publish the finalized build
artifacts to NPM, bump the version in
package.json and run:
JEKYLL_ENV="production" bundle exec jekyll build
npm publish _site/
Make sure not to run
npm publish from the root of the project, as this command
will succeed, but will publish the wrong directory to NPM.
Rebuilding Algolia search index
Rebuilding of the Algolia search index is also automated by the GitLab pipeline and shouldn't need to be run manually.
To rebuild the Algolia search index manually, (used on the search
bundle exec jekyll algolia.
Note that this requires an Algolia API key to be provided either through a local
_algolia_api_key file or through an
ALGOLIA_API_KEY environment variable.
In order for the GitLab pipeline to succeed, two environment variables must be present:
|ALGOLIA_API_KEY||Algolia API key used for updating the Algolia search index|
|NPM_TOKEN||NPM token for publishing the
This project's pipeline is responsible for compiling the site into static
HTML/CSS and publishing the result to npm (as
The site will only be published/deployed if the version in this project's
package.json is bumped. Pushing commits to
without bumping the version in
package.json will not cause
the site to be redeployed.
The following directories and their contents are Copyright Nathan Friend. You may not reuse anything therein without my permission:
All other directories and files are MIT Licensed. Feel free to use the HTML and SCSS as you please. If you do use them, a link back to https://gitlab.com/nfriend/website-3.0 would be appreciated, but is not required.