A personal website.
This website is built with:
- GatsbyJS - Static website generation using React
- Travis CI - Continuous integration and deployment to GitHub Pages
The website provides three primary forms of content:
- Blog posts
- Project cards
- 'About' information
Blogging is done via creation of Markdown files located within the data/posts
folder.
During builds, Gatsby creates pages for each post file.
Post file format is as follows:
YYYY-MM-DD-title.md
:
---
path: "/foo-bar
date: "YYYY-MM-DD"
title: "Foo Bar"
---
Excerpt content goes here (raw text only).
<!-- end -->
Body content goes here (Markdown).
Excerpts will be parsed from the end of the frontmatter section until <!-- end -->
.
Posts inside posts/__drafts
will only be displayed in non-production environments
(i.e. NODE_ENV !== production
).
Projects are added via JSON in data/projects/projects.json
and made available to the application
via GraphQL queries.
Project file format is as follows:
projects.json
:
{
"projects": [
// ... existing projects ...
{
// Project name
"name": "foo",
// Projects are displayed in ascending order
"order": 1,
// Short description of the project
"shortDescription": "Spotify visualizer for your living room TV, inspired by Zune.",
// List of technologies used
"techStack": [
"React", "Redux", "Node.js/Express", "Jest", "Heroku", "MongoDB"
],
// Homepage for the project
"homepageUrl": "https://spune.tinney.dev",
// Link to source code
"gitHubUrl": "https://github.com/cdtinney/spune"
}
],
}
Personal information must be written within data/about/about.md
. This will
be rendered onto the 'About' page.
If you want to make this website your own:
- Fork the repository
- Update
siteMetadata
and the Google Analytics tracking ID ingatsby-config.js
- Update the page
<title>
inhtml.js
- Delete/update content in
data
and/or write your own, using the content section as a guide
Development is done on the develop
branch.
- All commits to
develop
are automatically deployed. - Development must be done on branches off
develop
, NOTmaster
. - This means that pull requests should set
develop
as the base.
Deployment (i.e. build output) is found on master
.
- This is because GitHub Pages User Pages must be deployed on
master
. - Travis CI is solely responsible for deploying builds to
master
.
- Node.js - Latest LTS release
First, clone the repository.
To install dependencies:
$ npm install
To run a development server with live-reload (and linting):
$ npm run develop
To build the website for production:
$ npm run build
Build output is located within the public
folder.
The website can be served via GitHub pages after being built by Travis CI.
The configuration file is found at .travis.yml
; the GITHUB_TOKEN
environment
variable must be set.
The flow is as follows:
- Code is pushed to a branch
- The branch is built via the config
- If the branch is
develop
, build output is pushed tomaster
- GitHub Pages serves
master
Google Analytics support is built-in. Simply update the tracking ID
found in gatsby-config.js
under the options for the gatsby-plugin-google-analytics
plugin.
MIT