You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binaries for the extended version of the Hugo static site generator, installable via `pip`
24
25
25
-
This package provides wheels for [Hugo](https://gohugo.io/)to be used with `pip` on macOS, Linux, and Windows; for Python versions 3.8–3.12.
26
+
This package provides wheels for [Hugo](https://gohugo.io/)so that it can be used with `pip` on macOS, Linux, and Windows; for Python versions 3.8–3.12.
26
27
27
28
## What is Hugo?
28
29
29
30
[Hugo](https://gohugo.io/) is a static site generator written in [Go](https://golang.org/). It is designed to be fast and flexible, and it is used by many people and organizations for their websites, documentation, and personal blogs.
30
31
31
-
## What version of `python-hugo` do I install?
32
-
33
-
This package, `python-hugo` is versioned separately and will adhere to an [amalgamation](https://jacobtomlinson.dev/posts/2023/sometimes-i-regret-using-calver/) of [CalVer](https://calver.org/) (calendar versioning) and [SemVer](https://semver.org/) (semantic versioning) software standards, which is subject to change if deemed absolutely necessary. A release for `python-hugo` will be versioned as `YY.M.PATCH` where `YY` is the year, `M` is the month, and `PATCH` is the patch number of the release. For example, `31.8.2` shall be the release for `python-hugo` on August 2031, patch number 2. This is done to avoid confusion with the versioning of Hugo itself, which uses `SemVer` – but is likely versioned according to [0ver](https://0ver.org/) software standards based on their [versioning history](https://github.com/gohugoio/hugo/releases). A bump in the `python-hugo` version does not necessarily mean a bump in the Hugo version, and vice versa, but it is likely that a bump in the PATCH number of `python-hugo` will correspond to a new release of Hugo, as mentioned in the table below.
34
-
35
-
The version of `python-hugo` you install will correspond to a particular version of Hugo as listed in the following table in ascending order of `python-hugo` version.
36
-
37
-
<!-- NOTE: add versions to this table as we go along with releases. -->
38
-
39
-
|`python-hugo` version | Hugo (extended) version |
> This distribution of `Hugo` is currently not affiliated with the official `Hugo` project. Please refer to the [Hugo documentation](https://gohugo.io/documentation/) for more information on Hugo.
43
34
44
-
<!-- NOTE: add versions to this table as we go along with releases. -->
35
+
## What version of `hugo` do I install?
45
36
46
-
If you would like to use any available version of Hugo, you don't need to worry about this and you can just install the latest version of `python-hugo` on PyPI.
37
+
This package, `hugo` is versioned alongside the Hugo releases and is aligned with the versioning of Hugo itself, which uses `SemVer` – but is likely versioned according to [0ver](https://0ver.org/) software standards based on their [versioning history](https://github.com/gohugoio/hugo/releases).
47
38
48
-
If you would like to use a specific version of Hugo, you can install the corresponding version of `python-hugo`as listed in the table above.
39
+
Binaries for `hugo` through these wheels are available for Hugo versions **0.121.2** and above. If you need an older version of `hugo`that is not available through this package, please consider using the [official Hugo binaries](https://github.com/gohugoio/hugo/releases).
49
40
50
-
Please refer to the section on [Supported platforms](#supported-platforms) for a list of `python-hugo`'s supported platforms and architectures. If it does, jump to the [Quickstart](#quickstart) section to get started.
41
+
Please refer to the section on [Supported platforms](#supported-platforms) for a list of wheels available for supported platforms and architectures. If it does, jump to the [Quickstart](#quickstart) section to get started.
51
42
52
43
## Documentation
53
44
@@ -57,20 +48,20 @@ Create a virtual environment and install the package (or install it globally on
57
48
58
49
```bash
59
50
python -m virtualenv venv # (or your preferred method of creating virtual environments)
60
-
pip install python-hugo
51
+
pip install hugo
61
52
```
62
53
63
54
This places a `hugo` executable in a `binaries` directory in your virtual environment and adds an entry point to it.
64
55
65
56
Alternatively, you can install the package globally on your system:
66
57
67
58
```bash
68
-
python3.X -m pip install python-hugo # Unix
69
-
py -m pip install python-hugo # Windows
59
+
python3.X -m pip install hugo # Unix
60
+
py -m pip install hugo # Windows
70
61
```
71
62
72
63
> [!TIP]
73
-
> It is a great idea to use [`pipx`](https://github.com/pypa/pipx) to install Hugo in an isolated location without having to create a virtual environment, which will allow you to use Hugo as a command-line tool without having to install it globally on your system. Please refer to the [`pipx` documentation](https://pipx.pypa.io/stable/) for more information.
64
+
> It is a great idea to use [`pipx`](https://github.com/pypa/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](https://pipx.pypa.io/stable/) for more information.
74
65
75
66
Then, you can use the `hugo` commands as you would normally:
76
67
@@ -79,24 +70,26 @@ hugo version
79
70
hugo env --logLevel info
80
71
```
81
72
73
+
and
74
+
82
75
```bash
83
76
hugo new site mysite
84
77
hugo --printI18nWarnings server
85
78
# and so on
86
79
...
87
80
```
88
81
89
-
Virtual environments allow multiple versions of Hugo to be installed and used side-by-side. To use a specific version of Hugo, you can specify the version when installing the package (please refer to [What version of `python-hugo` do I install?](#what-version-of-python-hugo-do-i-install) for more information):
82
+
Virtual environments can allow multiple versions of Hugo to be installed and used side-by-side. To use a specific version of Hugo, you can specify the version when installing the package (please refer to the section [_What version of `hugo` do I install?_](#what-version-of-hugo-do-i-install) for more information):
90
83
91
84
```bash
92
-
pip install "python-hugo==24.1.1"
85
+
pip install "hugo==0.121.2"
93
86
```
94
87
95
88
For more information on using Hugo and its command-line interface, please refer to the [Hugo documentation](https://gohugo.io/documentation/) and [Hugo CLI documentation](https://gohugo.io/commands/).
96
89
97
90
### Supported platforms
98
91
99
-
A subset of the platforms supported by Hugo itself are supported by `python-hugo`. The plan is to support as many platforms as possible with Python wheels and platform tags. Please refer to the following table for a list of supported platforms and architectures:
92
+
A subset of the platforms supported by Hugo itself are supported by these wheels for `hugo` via `hugo-python-distributions`. The plan is to support as many platforms as possible with Python wheels and platform tags. Please refer to the following table for a list of supported platforms and architectures:
@@ -179,8 +172,8 @@ This package is designed to be used in the following scenarios:
179
172
- You want to use Hugo in a Python-based project, such as a static site generator that uses Hugo as a backend?
180
173
- You want to test a new version of Hugo without having to install it globally on your system or affecting your existing Hugo installation
181
174
- Python wheels allow for incredibly fast installation, in comparison to using other methods of installing Hugo such as system package managers
182
-
-Easier updates to the latest version of Hugo through the use of the `pip install --upgrade python-hugo` command, and automatic updates if you use a package manager such as [Poetry](https://python-poetry.org/) or [PDM](https://pdm.fming.dev/) to manage your Python dependencies or a tool such as [pipx](https://pipxproject.github.io/pipx/) to manage your command-line tools
183
-
- ...and so on
175
+
-Easy updates to the latest version of Hugo through the use of the `pip install --upgrade hugo` command, and automatic updates possible too if you use a package manager such as [Poetry](https://python-poetry.org/) or [PDM](https://pdm.fming.dev/) to manage your Python dependencies or a tool such as [pipx](https://pipxproject.github.io/pipx/) to manage your command-line tools
176
+
- ...and more!
184
177
185
178
#### (Known) limitations
186
179
@@ -190,3 +183,8 @@ This package is designed to be used in the following scenarios:
190
183
### Licensing
191
184
192
185
This project is licensed under the terms of the [Apache 2.0 license](LICENSE). Hugo is available under Apache 2.0 (see [the Hugo license](licenses/LICENSE-hugo.txt)) as well.
186
+
187
+
### Footnotes
188
+
189
+
- This project is currently not affiliated with the official Hugo project. Please refer to the [Hugo documentation](https://gohugo.io/documentation/) for more information on Hugo.
190
+
- The author of this project: @agriyakhetarpal, would like to express a token of gratitude to the owner of the `Hugo` package on PyPI (@nariman) for their kind gesture of granting access to take over the package name with the underlying provisions of PEP 541. This way, it allows users to install the package using the same name as the official Hugo project, which undoubtedly provides for a better user experience and convenience to users of this package when compared to the previous package name, `python-hugo`.
0 commit comments