hugo/content/en/contribute/development.md
Bjørn Erik Pedersen a6e635ca7d Squashed 'docs/' changes from 9b06f951e..fcc3ed651
fcc3ed651 Remove some expired new-in
a9c5981f5 Fix cascade example
82bb250fa Add some lines about permalinks tokens in front matter
328fe564e Remove some outdated new-in
fb140b153 Hide showcase menu entry
42d9d1c79 Update image formats from which EXIF data can be extracted
09ad56b6e netlify: Hugo 0.130.0
1d503f846 Merge branch 'tempv0.130.0'
e2458074d math: Add trigonometric functions and some angle helper functions
392afc8f9 Disable the showcase section for now
0300750f2 Improve example of image render hook
60a9306af Improve description of the .Site.RegularPages method
8d759175d Fix typos
55daa4554 Update XxHash.md
397c81cb7 Add namespace for hash functions
70fe8d2f0 netlify: Bump Hugo 0.129.0
5a9771aff Merge branch 'tempv0.129.0'
f9146575b Fix typo
e6e1fea49 Fix typo in Hugo docs | functions | partial
732d10ec4 source: Expose GitInfo Body
34c97e639 netlify: Hugo 0.128.2
3270587e9 Fix typo
727c5396e netlify: Hugo 0.128.1
80b6ae99c Update GitHub Pages workflow file example
027134102 Update GitHub Pages workflow file example
2600a8a2e Miscellaneous edits
3fdd5819b Update Build.md
7764005c3 Improve example of render hook directory structure
5e3941d82 Fix typos
748bf065f Restructure templates section
fafbf6566 Update Defer.md
012162e0d Document changes to template functions in v0.128.0
0990ce35b quick-reference: Update emojis
6677a30ef Update Goldmark configuration documentation
4449d530d Document new pagination config
0af8be439 Update Defer.md
56348196d netlify: Hugo 0.128.0
d67b6d82e Update content/en/functions/templates/Defer.md
23d996b3d Update content/en/functions/templates/Defer.md
7f7fb2f27 Document templates.Defer
5ada1e9d5 Fix docs merge (remove shortcode)
d27ee6156 Merge branch 'tempv0.128.0'
5d7317c84 Fix typo
7c18ee546 Update theme
83bfea63b Update theme
b274b3238 Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
ff34a035a deploy: Add stripIndexHtml target option
d9e964bdb markup/goldmark: Add the Hugo Goldmark Extras "delete" extension
ac5bd16d2 deps: Upgrade github.com/alecthomas/chroma v2.13.0 => v2.14.0
25377171b config: Remove extraneous BuildConfig setting
0d2044f6d docs: Regen docshelper
a2548dac9 markup/goldmark: Support extras extension
9d0c86ee8 commands: Add gen chromastyles --lineNumbersTableStyle flag

git-subtree-dir: docs
git-subtree-split: fcc3ed651a1b6431303c2f88f20fa38531c52b3d
2024-08-09 15:17:43 +02:00

4.6 KiB

title description categories keywords menu weight toc
Development Contribute to the development of Hugo.
contribute
development
docs
parent weight
contribute 20
20 true

Introduction

You can contribute to the Hugo project by:

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:

  1. Install Git
  2. Install Go version 1.20 or later
  3. Install a C compiler, either GCC or Clang
  4. 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.

Building from source

You can build, install, and test Hugo at any point in its development history. The examples below build and install the extended version of Hugo.

To build and install the latest release:

CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest

To build and install a specific release:

CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.128.0

To build and install at the latest commit on the master branch:

CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@master

To build and install at a specific commit:

CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@0851c17