All Projects → khos2ow → hugo-wrapper

khos2ow / hugo-wrapper

Licence: Apache-2.0 License
The universal way to include Hugo binary to your project.

Programming Languages

shell
77523 projects
HTML
75241 projects
CSS
56736 projects
Makefile
30231 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to hugo-wrapper

binary
package binary is a lightweight and high-performance serialization library to encode/decode between go data and []byte.
Stars: ✭ 20 (-25.93%)
Mutual labels:  binary
tikz favorites
collection of favorite TikZ graphics
Stars: ✭ 62 (+129.63%)
Mutual labels:  hugo
hugo-apero-docs
Apéro is a Hugo theme for personal websites. This is the documentation site, made with the theme 🍋
Stars: ✭ 56 (+107.41%)
Mutual labels:  hugo
hugo-cloak-email
A Hugo theme component to cloak email adresses
Stars: ✭ 71 (+162.96%)
Mutual labels:  hugo
Ptero4J
A java wrapper for the pterodactyl panel API
Stars: ✭ 26 (-3.7%)
Mutual labels:  wrapper
WaxSealCore
Simple, expressive yet comprehensive keychain wrapper in Objective-C.
Stars: ✭ 33 (+22.22%)
Mutual labels:  wrapper
WireGuard-Wrapper
Simple wrapper that makes WireGuard easier to use with VPN providers.
Stars: ✭ 29 (+7.41%)
Mutual labels:  wrapper
lightify-binary-protocol
Documentation of the OSRAM Lightify Binary Protocol for communication between Lightify Gateway and applications
Stars: ✭ 26 (-3.7%)
Mutual labels:  binary
spmf-py
Python SPMF Wrapper 🐍 🎁
Stars: ✭ 35 (+29.63%)
Mutual labels:  wrapper
oxford dictionary
📙 A Ruby wrapper for the Oxford Dictionary API
Stars: ✭ 23 (-14.81%)
Mutual labels:  wrapper
simpleit-hugo-theme
Responsive Hugo theme for hierarchical content websites
Stars: ✭ 16 (-40.74%)
Mutual labels:  hugo
Taviloglu.Wrike.ApiClient
.NET Client for Wrike API
Stars: ✭ 24 (-11.11%)
Mutual labels:  wrapper
clyngor
Handy python wrapper around Potassco's Clingo ASP solver.
Stars: ✭ 20 (-25.93%)
Mutual labels:  wrapper
readability-extractor
Javascript/Node wrapper around Mozilla's Readability library so that ArchiveBox can call it as a oneshot CLI command to extract each page's article text.
Stars: ✭ 18 (-33.33%)
Mutual labels:  wrapper
ezinject
Modular binary injection framework, successor of libhooker
Stars: ✭ 47 (+74.07%)
Mutual labels:  binary
MangaDex.py
An easy to use wrapper for the MangaDexAPIv5 written in Python using Requests.
Stars: ✭ 13 (-51.85%)
Mutual labels:  wrapper
GoAnimate-Wrapper
GoAPI server wrapper designed to interact with Vyond's Legacy Video Maker (written in Node.JS)
Stars: ✭ 22 (-18.52%)
Mutual labels:  wrapper
JirAgileR
User-friendly 🔹JIRA API wrapper. Track projects & issues from within R
Stars: ✭ 22 (-18.52%)
Mutual labels:  wrapper
python-launch-library
A simple wrapper for the Launch Library web API
Stars: ✭ 20 (-25.93%)
Mutual labels:  wrapper
rgdax
Wrapper for Coinbase pro (erstwhile GDAX) Cryptocurrency exchange
Stars: ✭ 34 (+25.93%)
Mutual labels:  wrapper

Hugo Wrapper

hugow is a POSIX-style shell script which acts as a wrapper to download and run Hugo binary - which is, in fact, platform dependent - for your platform. It can be executed in variety of Operating Systems and Command Shells.

Table of contents

Hugo Wrapper dependencies

hugow has very minimal number of dependencies:

  • downloader: wget or curl
  • checksum: sha256sum or shasum or cksum
  • tarball: tar

Download Hugo Wrapper

In order to use the hugow binary, you only need to download it and place it in the root of your Hugo project.

curl -L -o hugow https://github.com/khos2ow/hugo-wrapper/releases/download/v1.6.0/hugow && chmod +x hugow

or

wget -O hugow https://github.com/khos2ow/hugo-wrapper/releases/download/v1.6.0/hugow && chmod +x hugow

Upgrade Hugo Wrapper

In order to upgrade hugow binary, you can use --upgrade flag. The newest version of wrapper binary will be downloaded from GitHub repository on your machine and will replace the old one.

./hugow --upgrade

Hugo Wrapper usage

and use it the same way you'd use Hugo binary itself:

./hugow          # to build the site
./hugow server   # to start the server
./hugow --help   # to show help of both Hugo and Hugo Wrapper

On the first execution, hugow downloads the latest Hugo binary from official releases and caches it locally as <PROJECT_ROOT>/.hugo/hugo and also keeps track of the downloaded version in <PROJECT_ROOT>/.hugo/version. As a result from the second execution forward it will only execute the - already downloaded - binary.

Hugo Wrapper flags

hugow supports the following flags and passes through any additional flag directly to Hugo binary itself.

Flags:
      --get-extended               get hugo extended binary
      --get-latest                 get latest version of hugo binary
      --get-version string         get specified version of hugo binary
      --upgrade                    upgrade hugo wrapper binary itself
  -h, --help                       help for hugo-wrapper

Hugo Wrapper CI/CD

Most Continuous delivery platforms need a silent build command that will produce valid exit codes. Here are some examples of using hugow in the wild.

Netlify

Netlify will need permission to use hugow and run the build

chmod a+x ./hugow && ./hugow --gc --minify --quiet

Download Hugo binary

With hugow you can download LATEST or specific version of Hugo binary or Hugo Extended binary, and you can upgrade or downgrade at any given time.

Download specific Hugo binary

./hugow --get-latest                    # to get latest Hugo version
./hugow --get-version <VERSION_NUMBER>  # to get specific Hugo version

Download specific Hugo Extended binary

./hugow --get-extended --get-latest                    # to get latest Hugo extended version
./hugow --get-extended --get-version <VERSION_NUMBER>  # to get specific Hugo extended version
./hugow --get-version <VERSION_NUMBER>/extended        # to get specific Hugo extended version (alias)

Content of .gitignore

.hugo folder in PROJECT_ROOT which contains downloaded Hugo binary and the version should be added to .gitignore. Note that this is usually good enough, and it makes your user to easily access Hugo binary without needing to actually go and download specific version based on their OS and CPU architecture.

example .gitignore content:

.hugo

But if you need a fine grained control of which version of Hugo is intended to be used for your project, or if you need an absolute fixed version of Hugo to be used everywhere (on user machine, CI job container, etc) you need to check in the .hugo/version into your project repository as well to ensure consistence Hugo version everywhere.

example .gitignore content:

.hugo/*
!.hugo/version

Tested on

Operating Systems Architecture bash sh csh tcsh zsh ksh PowerShell
DragonFloyBSD amd64 - - - - - - -
FreeBSD i386 - - - - - - -
FreeBSD amd64 - -
FreeBSD ARM - - - - - - -
Linux x86 - - - - - - -
Linux x86_64 -
Linux ARM - - - - - - -
Linux ARM64 - - - - - - -
macOS x86 - - - - - - -
macOS x86_64 - - - - - -
macOS ARM - - - - - - -
macOS ARM64 - - - - ✔︎ - -
NetBSD i386 - - - - - - -
NetBSD amd64 - - - - - -
NetBSD ARM - - - - - - -
OpenBSD i386 - - - - - - -
OpenBSD amd64 - - - - - - -

License

Licensed under Apache License version 2.0. Please see the LICENSE file included in the root directory of the source tree for extended license details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].