a9584e3d1 ci: bump GitHub workflow actions to latest versions f37ee374d Fix methods related to time.After a49214057 Correct heading render hook example 4b696f936 Update README.md b5a6e4039 Clean up the contributing section a5d79ed19 Fixed typo: instea → instead 6150a60e3 Remove the "local file templates" page 9395743dc Update/vendor theme 33d8c10cc Remove output format "name" parameter 7200ad97d Add security section to resources.GetRemote page 3f1e056b2 Remove erroneous front matter field 07c9a7e42 Add alpha index to glossary 6619c8aa0 Fix Page.Params example 145a92359 Simplify string concat example in math.Add 42488bb09 Add string concat example to math.Add eb20521a2 Fix flash of unstyled content with mathematical markup 74603bebe Fix typo in 'typesetting' git-subtree-dir: docs git-subtree-split: a9584e3d146c4a194d937a4dc8a37cde5ba1c618
4 KiB
title | description | categories | keywords | menu | weight | toc | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Development | Contribute to the development of Hugo. |
|
|
|
20 | true |
Introduction
You can contribute to the Hugo project by:
- Answering questions on the forum
- Improving the documentation
- Monitoring the issue queue
- Creating or improving themes
- Squashing bugs
Please submit documentation issues and pull requests to the documentation repository.
If you have an idea for an enhancement or new feature, create a new topic on the forum in the "Feature" category. This will help you to:
- Determine if the capability already exists
- Measure interest
- Refine the concept
If there is sufficient interest, create a proposal. Do not submit a pull request until the project lead accepts the proposal.
For a complete guide to contributing to Hugo, see the Contribution Guide.
Prerequisites
To build the extended edition of Hugo from source you must:
- Install Git
- Install Go version 1.20 or later
- Install a C compiler, either GCC or Clang
- Update your
PATH
environment variable as described in the Go documentation
{{% note %}} See these detailed instructions to install GCC on Windows. {{% /note %}}
GitHub workflow
{{% note %}} This section assumes that you have a working knowledge of Go, Git and GitHub, and are comfortable working on the command line. {{% /note %}}
Use this workflow to create and submit pull requests.
- Step 1
- Fork the project repository.
- Step 2
- Clone your fork.
- Step 3
- Create a new branch with a descriptive name that includes the corresponding issue number.
For a new feature:
git checkout -b feat/implement-some-feature-99999
For a bug fix:
git checkout -b fix/fix-some-bug-99999
- Step 4
- Make changes.
- Step 5
- Compile and install:
CGO_ENABLED=1 go install -tags extended
- Step 6
- Test your changes:
go test ./...
- Step 7
- Commit your changes with a descriptive commit message:
- Provide a summary on the first line, typically 50 characters or less, followed by a blank line.
- Optionally, provide a detailed description where each line is 80 characters or less, followed by a blank line.
- Add one or more "Fixes" or "Closes" keywords, each on its own line, referencing the issues addressed by this change.
For example:
git commit -m "tpl/strings: Create wrap function
The strings.Wrap function wraps a string into one or more lines,
splitting the string after the given number of characters, but not
splitting in the middle of a word.
Fixes #99998
Closes #99999"
See the commit message guidelines for details.
- Step 8
- Push the new branch to your fork of the documentation repository.
- Step 9
- Visit the project repository and create a pull request (PR).
- Step 10
- A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR.