A blog about tour reports, equipment and experiences about trekking and hiking.
Make sure you have the following applications installed:
githugo- a good editor to write/edit HTML, CSS and Markdown documents (like
Atomorvim)
To build and deploy this, there's a script (deploy.sh).
It's tailored exactly to the server of the-green-spot, so you might want to change it.
Call this script with --beta to deploy into the beta sub-folder.
Nevertheless, you need some things in addition to the ones above in order to use the script:
- an interpreter (something like
gnome-terminal) sshsshpass
- Clone this repo:
git clone https://github.com/hauke96/the-green-spot.git - Install the hamburg-theme
- Create theme directory:
mkdir themes/hamburg - Download the theme:
git clone https://github.com/hauke96/hugo-theme-hamburg.git
- Create theme directory:
This site is based on hugo so you can use its normal commands.
Posts are in ./content/posts/. Therefore adding a new post looks like this:
$ hugo new posts/your-title.en.md
/home/name/whatever/the-green-spot/content/posts/your-title.en.md createdThe post is pretty empty but the header has been generated:
$ cat content/posts/your-title.en.md
---
draft: true
title: ""
summary: ""
date: 2019-01-28T21:44:06+01:00
tags: []
author: ""
---Just use the run.sh script to start hugo with the local environment or run.sh -f to also open the local blog-URL in Firefox.
Of course you can also use hugo manually.
Just execute hugo server -D -v or build it (see blow) and use your own HTTP-server.
Just execute hugo (without parameters) and look into the public-folder.
Specify an environment with --environment <env> to use a different config from the ./config/ folder.
This is out of date since there are dedicated configuration files in
./config/.
There is a beta site. Because the URL is different, it must be build like this:
- Change the URL in the
config.toml - Build using
./build.sh - Upload
The scheme is [major].[minor].[patch].
Increase the major, when:
- A new article is done
- A new page is done
Increase the minor, when:
- Changes to an article
- Changes to a page
- Changes to the style
- Changes to the layout
Increase the patch, when:
- Just a fix is added
There's the master and dev branch. The master contains (at least since the 23.08.2018) only released/releasable commits. The dev branch contains the indev-state and may not be usable.
Create features, articles or pages on a branch <type>/name where type is e.g. post and where you develop/write the feature name.
For larger features or posts (which takes longer then a day or two):
- Create a feature/article/post called
foo: Create a branch<type>/foo(where<type>is one offeature,postorpage) - Write and commit
- Merge into
devwhen done - Adjust additional stuff if needed
- Merge into
masterbranch - Create a new tag
- Major: Do not increase unless huge change (e.g. redesign of blog)
- Minor: Increase for new article, post, etc.
- Patch: Increase for smaller adjustments, fixed typos, rewriting of passages, etc.
- Deploy on blog
I used the following configurations:
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 65% -resize x650 -gaussian-blur 1x1 bg.jpg bg-out.jpgconvert -interlace Plane -resize x32 favicon.jpg favicon.icoFor normal horizontal photos:
convert -resize 1600x -quality 75 DSC00835.JPG DSC00835_1600.JPGFor vertical photos:
convert -resize x1600 -auto-orient -quality 75 DSC00835.JPG DSC00835_1600.JPGConvert all pictures at once:
for f in ./*; do convert -resize 1600x -quality 75 $f "${f%.*}_1600.jpg"; donePrint all JPG names with qualities above 75%:
for f in ./*; do q=$(identify -format '%Q' $f) && if [[ $q > 75 ]]; then echo "$f ==> $q"; fi; doneConvert all JPG files with a quality of over 75%:
for f in ./*; do q=$(identify -format '%Q' $f) && if [[ $q > 75 ]]; then mogrify -quality 75 $f; fi; doneAdjust hue/saturation/value (here 20% more saturation):
for f in ./*; do convert -modulate 100,120,100 $f "../rheinsteig-2020_saturation/${f}"; done