Differences between revisions 1 and 2
Revision 1 as of 2022-04-24 09:54:50
Size: 755
Editor: PieterSmit
Comment:
Revision 2 as of 2022-04-25 10:49:46
Size: 997
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:


== Example usage create site vigor ==
 * hugo new site vigor
   1. hugo new site vigor
   2. clone into themes dir "hyde"
   3. update config.toml with theme="hyde"
 * run local webserver to auto rebuild {{{
$ hugo server -D
}}}

web/Hugo

  • Hugo generates static website, written in GO super fast.
  • Can combine with headless CMS e.g. Contentfull to pull images and text for site generation.

Run Hugo ass docker container

  • ~/.bash_aliases axllent

    hugo() {
        if [ "$1" == "update" ]; then
            docker pull klakegg/hugo:ext-alpine
            return
        fi
        LISTEN=""
        for i in "$@" ; do
            if [[ $i == "server" ]] ; then
                LISTEN="-p 1313:1313"
                break
            fi
        done
        docker run --rm -it --name hugo -u "$(id -u)":"$(id -g)" \
        $LISTEN \
        -v "$(pwd)":/src \
        -v /etc/localtime:/etc/localtime:ro \
        klakegg/hugo:ext-alpine  "$@"
    }

Example usage create site vigor

  • hugo new site vigor
    1. hugo new site vigor
    2. clone into themes dir "hyde"
    3. update config.toml with theme="hyde"
  • run local webserver to auto rebuild

    $ hugo server -D

web/Hugo (last edited 2022-04-25 10:49:46 by PieterSmit)