The repository for the Offcourse website. For the live website please visit www.offcourse.io.
For a more detailed step-by-step instructions on getting started, see the Gatsby tutorial.
Make sure you have installed Git, Node and Yarn
Step by step:
- Open terminal and change the directory to the place you want to install the website (
cd /Users/yourname/
) - Clone this repo on your local machine by running
git clone https://github.com/OffCourse/offcourse-website.git
- Install the dependencies by running
yarn
- Run a local version of the website by running
yarn run develop
- Open your browser and check http://localhost:8000
For an overview of the project structure please refer to the Gatsby documentation - Building with Components
Posts live in the src/posts/YYYY-MM-DD-{permalink}
folder. It includes a index.md
file, which is a markdown file and the assets used in the blogposts. The markdown file includes frontmatter and needs the following properties (path
, date
, title
, featuredImage
). Checkout an existing blog post to see how it works.
Pages live in src/pages
. A page consists of reusable components found in src/components
. Creating a new page is easy. Just copy an existing page and rename it to the permalink you want to give the page. You can change document head (for SEO purposes) in the Helmet
component. You can add any reusable component found in src/components
.
The only thing really special is the way we handle the compiling of Semantic. Before running gatsby develop
we run node semantic-fix.js
to fix theme.config
import and font paths.
We use Netlify for hosting. Any update to the master
branche will trigger a new build and deploys a new version of the website.
- Remove the Semantic dependency (this is a huge performance killer)
- Add CMS to manage content easier (e.g. Contentful)