Skip to content

A homemade GatsbyJS theme for my personal blog and website.

License

Notifications You must be signed in to change notification settings

chrisvogt/gatsby-theme-chrisvogt

Repository files navigation

My Personal Website (www.chrisvogt.me)

Netlify Status Current CircleCI build status. Code coverage report badge. Released under the MIT license. Follow @c1v0

This repository contains my personal website and blog, www.chrisvogt.me. The front-end code lives within the theme directory and the blog articles live within the website directory.

Local development

This repository uses Yarn workspaces to separate the theme code from the content.

To install, use Yarn. From the root, do:

yarn

To work on the theme, open the /theme directory in an editor and run the following command to preview the website using localhost.

yarn workspace www.chrisvogt.me develop

I use HTTPS and SSL in my local development environment. A command is available for that, but you'll need to add SSL certificates to /www.chrisvogt.me/certs. I use mkcert to generate self-signed certificates.

After adding www.dev-chrisvogt.me-key.pem and www.dev-chrisvogt.me.pem to your certs directory, use the following command to develop on https://www.dev-chrisvogt.me:8000.

yarn workspace www.chrisvogt.me develop:https

# Or the shorcut
yarn develop

The unit tests are in the gatsby-theme-chrisvogt workspace. To run unit tests in watch mode or update snapshot tests, use the test:watch command.

yarn workspace gatsby-theme-chrisvogt test:watch

# Or the shortcut
yarn test:watch

To run the unit tests once, just use test.

yarn workspace gatsby-theme-chrisvogt test

# Or the shortcut
yarn test

To build the production website, run the following.

yarn workspace www.chrisvogt.me build

The website build will be output to /www.chrisvogt.me/public.

How to test the production build

The production build can be run on your local machine over HTTPS if you generate self-signed certificates, which I did using mkcert. You can use a tool like http-server to serve the build.

http-server -o -S -C ../certs/www.chrisvogt.me.pem -K ../certs/www.chrisvogt.me-key.pem -a www.chrisvogt.me -p 443

Copyright & License

Copyright © 2019-2024 Chris Vogt and released under the MIT license.