Documentation for hugo-python-distributions

This webpage is meant to serve the documentation for the hugo-python-distributions project, which aims to provide a distribution channel for the extended version of the Hugo static site generator through pip-installable binaries (wheels) hosted on the Python Package Index (PyPI).

Table of contents

Quickstart

Create a virtual environment and install the package (or install it globally on your system):

This example is using virtualenv to create a virtual environment, however, you can use any virtual environment manager of your choice. Some popular ones are the built-in venv module, virtualenvwrapper, pipenv, conda, poetry, pyenv, uv, and so on.

This places a hugo installation with an executable in your virtual environment and adds an entry point to it in your virtual environment’s bin directory.

Then, you can use the hugo CLI commands as you would normally:

hugo version
hugo env --logLevel info
hugo new site my-new-site
hugo mod <...>
hugo --printI18nWarnings --buildDrafts server

and more!

Alternatively, you can install the package globally on your system:

It is a great idea to use pipx to install or use Hugo in an isolated location without having to create a virtual environment, which will allow you to run Hugo as a command-line tool without having to install it globally on your system.

Please refer to the pipx documentation for more information.

For more information on using Hugo and its command-line interface, please refer to the Hugo documentation and the Hugo CLI documentation.