Hugo Date Operations (osgav epoch)

Author image osgav | |
 created: 19/01/2019 updated: 19/01/2019 I wanted to make an ‘osgav epoch’ counter thing, and so I did, like so… (see Blog Archive on my tags page) <h6>blog archive</h6> <br /> $pages := (where (where .Site.Pages "Type" "post") "IsPage" true) range first 99 $pages $t := (time "2016-06-05") <!-- date of first post --> $delta := $t.Sub (time .Date) $osgav_epoch_negative := int (div $delta.Hours 24) $osgav_epoch := int (sub 0 $osgav_epoch_negative) <a href=" .
read on... »

Hugo TravisCI Pipeline Broken?



If your .travis.yml install section looks like this and the build is failing to install Hugo…

 - go get

…then try updating it to download a specific version of the hugo binary:

- export VER=0.18.1
- wget${VER}/hugo_${VER}_Linux-64bit.tar.gz
- tar xvzf hugo_${VER}_Linux-64bit.tar.gz
- mkdir -p $GOPATH/bin
- cp hugo_${VER}_linux_amd64/hugo_${VER}_linux_amd64 $GOPATH/bin/hugo

Why? Read on…

read on... »