Website for grashobber – https://grashobber.de
This website is based on Hugo as a static site generator and Vite as the build tool. Originally it was based on Gulp + Webpack and was a heavily modified fork of victor-hugo.
You need to have Node 16 and npm installed in order to build this site.
Next step, clone this repository and run:
npm install
This will take some time and will install all packages necessary.
While developing your website, use:
npm run dev
A new browser should pop up to preview the site.
To build a static version of the website inside the /dist
folder, run:
npm run build
Pushes to the staging
branch are automatically deployed to staging--grashobber.netlify.app. Pushed to master
will update the live site.
To separate the development and production - aka build - stages, all gulp tasks run with a node environment variable named either development
or production
.
You can access the environment variable inside the theme files with getenv "NODE_ENV"
. See the following example for a conditional statement:
{{ if eq (getenv "NODE_ENV") "development" }}You're in development!{{ end }}
All tasks starting with build set the environment variable to production
- the other will set it to development
.
Prepares SVGs for use within SVG sprite:
svgo ./logo-farbig.svg -o ../../grashobber/src/images/svg/logo-farbig.svg --config '{ "plugins": [ { "inlineStyles": { "onlyMatchedOnce": false } }] }'