Website HTWK Smart Driving
This is the Gatsby JS based website of the HTWK Smart Driving team.
You might want to use yarn instead of npm.
npm install npm run dev
Run the following command to test a production build:
npm run prod
Some features like the RSS feed (
/rss.xml) are created in production builds only.
How to write a new post
Adding a post is easy!
Start the development server as descriped in the previous section (
npm run dev).
Add a new directory for the new post under
src/posts/and give it a meaningful name. Note that this name is only useful for other developers and has nothing to do with the resulting URL structure.
index.mdMarkdown file in the directory like the following example:
--- title: My post title date: "2018-06-20" --- My **awesome** post content. ![My picture](./picture_in_same_directory.jpg)
The website should show the newly created post and reflect content changes immediately. This means you can write your post in the markdown file and the page updates itself automatically.
Commit your changes and merge the branch into
masterwhen you're happy with your post. Careful: the post will go live immediately (see Deployment).
npm run build
Every time a branch is merged into
master (or commits are pushed to
master) a GitLab pipeline is started, which builds the Gatsby project and deploys the build articafts to the website document root
So the page goes live immediately!