/site

it's my website! wow!

Primary LanguageGo

Website

Build Status

This is my personal website. It's hosted here.

It's a static site built with React, Redux, React-Router, and a bunch of node scripts to build + deploy things.

There's a Rakefile to automate building markdown files from the Go source (you need to already have mark_set_go installed). It takes the formatted Markdown, renders it to HTML, and then saves it all to JSON (for easy use in JS).

I started the site to document my progress in learning Go by doing the Matasano crypto problemset, and ended up moving over my blog and a couple of other things.

Building and deploying

Development

To develop the site do:

docker-compose up

in the project directory. This starts the webpack hot-reload dev server in a docker container. There are also some dev-related scripts in package.json:

npm run test               # run the tests
npm run lint               # run the linter
npm run singleTest ${path} # run a single test file
npm run watchTest ${path}  # run a single test file in watch mode

Building

To build Markdown files from the Golang source code and build JSON from all the Markdown do:

rake

This will write markdown files in matasano and will write JSON in src/data/. For various pages the rendered (and highlighted) Markdown is pulled out of those JSON files.

Deploying

To deploy the website do:

npm run publish

This builds the JavaScript bundles for the site (bundle.js) and the static routing script (create_static_routes.js). Then it runs the static routing script, copies in the images, deploys to another repo using gh-pages, and then cleans out the build directory.