hugo/content/en/_common/installation/04-build-from-source.md

39 lines
1.2 KiB
Markdown
Raw Normal View History

---
_comment: Do not remove front matter.
---
## Build from source
Squashed 'docs/' changes from ccb1b97cb..159c843fd 159c843fd Fix front matter menu entry example c3a476a19 Document soft deprecation of PAGE.Scratch cdead9785 netlify: Hugo 0.138.0 9169b4da4 Update version references 3bc6bf431 Update embedded.md 5c7743b2e Update creation instructions for the emoji quick reference 109efe3eb Document the comment shortcode 83d7d3005 Update theme d3c205054 netlify: Hugo 0.137.1 545290351 Handle inline HTML content 0204be97d Update theme 18d09235e Remove JS and CSS that prevents FOUC with client side math rendering 63d9dd876 Update RenderShortcodes.md 064b95539 Update output-format-definition.md 3744f3be2 Describe and refer to the extended/deploy edition 3d3302308 netlify: Hugo 0.137.0 b53aedcea Update RenderShortcodes.md b5f289165 Replace HTML comments in markdown with the new comment shortcode c673880b6 Remove superfluous right bracket f80b0c61e Update faq.md 2ede707eb Document installation on NixOS 09b114914 Update theme 76a9f90b2 Update passthrough.md 9f3355630 Update Scratch.md bc080ecaa Update Store.md 1507ede32 Update Scratch.md 54a90f569 Update Store.md 7c9145c43 Fix broken link dd15f183b Update ToMath.md 2b021c34b Move the [build] documentation to its own page cbb6677ec Fix typo ac0969063 Update ToMath.md 7fbdfd7c8 netlify: Hugo 0.136.5 17f54223c Update ToMath.md 4c9c3bb06 Update multilingual.md 1432da7bd Make site and page language methods linkable fd5b746cb Update urls.md a746f1b3a Update urls.md abf8738e2 netlify: Hugo 0.136.4 bd8759996 Update TrimSpace.md 6103c1e84 Documents strings.TrimSpace 533dd3a7b netlify: Hugo 0.136.3 30f3f97cf Update quick-start.md b0d7b41a0 Update configuration-markup.md 760e5e4f0 Update quick-start.md 17daeb866 Update quick-start.md 1e158e723 netlify: Hugo 0.136.2 d32530839 Update theme edb9bee02 Update description of url front matter field e1c576e18 netlify: Hugo 0.136.1 1ad28e1e0 Describe how to configure uglyURLs per section cbbd4c4fe netlify: Hugo 0.136.0 bb7f35e99 Merge branch 'tempv0.136.0' 706110736 docs: Regen CLI docs bf0c7821f Update urls.md 8c544e6c0 Update quick-start.md 8d02733d0 Update Paginator.md a45327aac Update Paginate.md 1377ed4de Clarify date parsing e19fb8043 Document front matter date field aliases a39951847 Update Tailwind CSS installation instructions 3be164c35 Remove duplicate token 05fc815f7 commands: Add "hugo build" as an alias for "hugo" cb3cb504c Update table render hook example efbee0bff Clarify resources.GetRemote 404 handling 4312d49c9 Update compare.Conditional documentation 4a46d53b6 Update theme 93e542d4f netlify: Hugo 0.135.0 b4da1c104 Remvoe some old new-in shortcodes 4c316f051 Update TailwindCSS.md c2fe91509 Update introduction.md 906b7c66b Update configuration.md 5ab6b3cdd Update documentation.md 26fb4bb4c Update documentation.md e9e917f37 Update version refs 83ce07f24 netlify: Hugo 0.134.3 8cb32f802 Update front-matter.md 94d7f576a Update faq.md fafc1d8d9 netlify: Hugo 0.134.2 bfe9cdc3d Update content-adapters.md 9e49ae3e1 Document ignoreLogs configuration setting 6b47a1d57 Update configuration.md fd98a0372 Document CLI options that can be set in configuration 07c2400d8 Document alternative to Summary method d053fa163 Update to reflect changes in v0.134.1 137dc3241 Update ContentWithoutSummary.md e8f6427d9 netlify: Hugo 0.134.1 git-subtree-dir: docs git-subtree-split: 159c843fd79e94a0f49bee74c272cd0cc4a848a2
2024-11-13 11:07:57 +01:00
To build the extended or extended/deploy edition from source you must:
1. Install [Git]
Squashed 'docs/' changes from d1a251933..dc7a9ae12 dc7a9ae12 content: Update JS options 07d3d8803 npm: Use tilde ranges for versions e06362a13 Minor grammar fixes c42db0838 content: Algolia DocSearch clarification d67412b82 deps: Upgrade to TailwindCSS 4.1.0 da1fb12d3 theme: Update Lato font path for images.Text example 140fa3bb9 Update introduction.md 7b1fcca27 content: Fix links to embedded template source 908a55532 theme: Improve dark mode syntax highlighting background d830e5962 Update XxHash.md 807be5dbf Update Defer.md 4b56693f6 content: Update GitHub Pages sample workflow 57b766fba Update TailwindCSS.md 64982ab6a Update TailwindCSS.md 1b6e879c6 Update TailwindCSS.md e67cbcdd2 content: Add caching to the GitHub Pages workflow example b7ca3b07c Update index.md 14e1a3977 Update XxHash.md 980f344ae Update XxHash.md 6b815f03e theme: Remove aria-label attribute from links 1c00bbc45 theme: Update npm dependencies 533149bf9 theme: Include section pages in related content 2b6bda6bd content: Fix typos 92ce95cbb content: Miscellaneous edits f12936681 theme: Add a simple LRU cache for search 339ca3388 Fix the previous broken commit 8537e59e0 Make it into a non-link e13f17d29 Add Algolia logo/link to the search listing dialog d3e09e886 content: Fix typo 7217f64b6 content: Miscellaneous edits 51aa1ae73 content: Improve some examples 8ebaa53f9 theme: Adjust shortcodes 898870438 theme: Hide anchor until mouse-over c933ea237 content: More front matter cleanup f26ca047a content: Miscellaneous edits e272b2039 theme: Fix inline partial refs c540e6d29 content: Replace note shortcode calls with blockquote alerts aef899bc5 theme: Add title and QR code when printing bd46ef626 theme: Implement blockquote render hook ddefbefaa content: Improve contributing page f41d28ee1 content: Adjust usage of whitespace removal with action delimiters 03315336d theme: Use full title in related content sidebar 4f4076364 misc: Document the front matter fields used on this site 2f78d7632 misc: Fix gitignore file 7de6dbab3 content: Fix front matter for several function pages 5d3542ea6 config: Disable tags taxonomy 68bc28d67 content: Add linkTitle to shortcode pages 5f32c92ed theme: Restore deduplication logic for related items a943a4bb8 theme: Implement related content tooling fd628be6e content: Replace calls to the code shortcode with fenced code blocks b23c9a583 content: Fix position of new-in badges ec056f251 content: Fix typo 245351c84 theme: Adjust spacing in highlighting theme examples 2fcd21ee5 content: Remove "related" array from function and method pages 71d8426ee theme: Create code block render hook 4cdde6649 theme: Adjust number of news items to display 34ab45261 content: Miscellaneous edits b6cae5cbc content: Consolidate configuration documentation 727ef6f66 theme: Fix overflow issue for wide tables c4f759e01 Add es2024 93cce62c8 Update support list of more recent targets with js.Build / esbuild 974d0655f Update hosting-on-codeberg.md b3f0ed9ce content: Add hosting instructions for Codeberg Pages 8217c0900 content: Correct the SourceHut repository URL a8cf3d28f content: Add hosting instructions for SourceHut Pages 8c059cbe1 theme: Use content adapter for news section 03938c600 Remove some old new-in 5c50a75e8 content: Fix typo 5cf89f2f6 theme: Re-enable banner gtag outbound link tracking 3c555d5f8 One more copy button 94bce999a Add some copy buttons 9e1cc0c2b Update PortableText.md dd26ac49f Document transform.PortableText 5f632ab32 netlify: Hugo 0.145.0 59e057bb4 Update index.md d07e07d6c Remove some unused home page front matter d482657b7 Add footnote about alias to the build front matter key f0629b77c content: Fix typo d91c4cccf theme: Fix news items URLs ca931cd1f theme: Restore RSS feed for news section e6b870bc9 theme: Adjust copy-to-clipboard button 071851431 Update netlify.toml e68431034 theme: Format layouts aa3cd839a theme: Format assets 22ad3eee3 theme: Add some more space on the right for copy buttons f4a19083a netlify: Hugo 0.144.1 974cb8795 theme: Remove Internet Explorer configs (#2929) 4a23a1f41 content: Fix typos d49f15d03 theme: Get the scrollspy back working 720c7ff67 config: Evict getresource cache hourly 1f62ca97e theme: Hide the Turbo progress bar f6449ace3 Move the dark class up to the html element 074cd1a07 content: Miscellaneous edits e098a7716 content: Miscellaneous edits 8e1e104aa content: Updates for v0.144.0 18e1aa916 theme: Add anchor links via JS ac3b5505c Close new-in bfa4db6b8 netlify: Hugo 0.144.0 fd6e7feee Regen CLI docs da9d1218a Regen docs helper 5de494ded Merge branch 'tempv0.144.0' f683e6469 theme: Minor improvements to base template ef8bf89d8 resources/page: Revise the new contentbasename permalinks tokens 901adb07b resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens 0fca8ef25 all: Change shortcode usage and design to prevent invalid HTML c41d76613 Update RegularPagesRecursive.md e93574748 content: Correct return type for strings.Split 3d504abba Revert "content: Add ids to the Netlify steps" c08c8e15e content: Add ids to the Netlify steps 5a3b470a2 theme: "move" the id from content to article b878613aa theme: Add page kind as a CSS class to body 269657e8f content: Fix formatting error 664f6c92f config: Change image cache location fa6b719b1 theme: Reduce ToC to level 2-4 bc16341ca theme: Render mathematical markup with transform.ToMath 14bf9dc70 theme: Add aria-label attribute to search fields ed42af5b3 theme: Adjust search field and search activation f042e4970 dev: Add prettier-plugin-void-html f6ec83533 content: Fix inline shortcode example 0a74210e2 theme: Remove readfile shortcode 334ca06ac theme: Fix some dark mode accessibility as reported by Axe core 02626ff92 theme: aria-lbabel => aria-label 227b76ab7 Add Prettier and config 43ab22428 content: Bump minimum required Go version to 1.23.0 03e54683f modules: Add GOAUTH to module config 9f06a3b9c js/esbuild: Add drop option ddcd99369 Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a' 733731253 helpers: Add Chroma styles to docs.yaml git-subtree-dir: docs git-subtree-split: dc7a9ae127717cde17840496cb0287f481c5f0ee
2025-04-10 13:02:49 +02:00
1. Install [Go] version 1.23.0 or later
1. Install a C compiler, either [GCC] or [Clang]
1. Update your `PATH` environment variable as described in the [Go documentation]
> The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`).
Squashed 'docs/' changes from ccb1b97cb..159c843fd 159c843fd Fix front matter menu entry example c3a476a19 Document soft deprecation of PAGE.Scratch cdead9785 netlify: Hugo 0.138.0 9169b4da4 Update version references 3bc6bf431 Update embedded.md 5c7743b2e Update creation instructions for the emoji quick reference 109efe3eb Document the comment shortcode 83d7d3005 Update theme d3c205054 netlify: Hugo 0.137.1 545290351 Handle inline HTML content 0204be97d Update theme 18d09235e Remove JS and CSS that prevents FOUC with client side math rendering 63d9dd876 Update RenderShortcodes.md 064b95539 Update output-format-definition.md 3744f3be2 Describe and refer to the extended/deploy edition 3d3302308 netlify: Hugo 0.137.0 b53aedcea Update RenderShortcodes.md b5f289165 Replace HTML comments in markdown with the new comment shortcode c673880b6 Remove superfluous right bracket f80b0c61e Update faq.md 2ede707eb Document installation on NixOS 09b114914 Update theme 76a9f90b2 Update passthrough.md 9f3355630 Update Scratch.md bc080ecaa Update Store.md 1507ede32 Update Scratch.md 54a90f569 Update Store.md 7c9145c43 Fix broken link dd15f183b Update ToMath.md 2b021c34b Move the [build] documentation to its own page cbb6677ec Fix typo ac0969063 Update ToMath.md 7fbdfd7c8 netlify: Hugo 0.136.5 17f54223c Update ToMath.md 4c9c3bb06 Update multilingual.md 1432da7bd Make site and page language methods linkable fd5b746cb Update urls.md a746f1b3a Update urls.md abf8738e2 netlify: Hugo 0.136.4 bd8759996 Update TrimSpace.md 6103c1e84 Documents strings.TrimSpace 533dd3a7b netlify: Hugo 0.136.3 30f3f97cf Update quick-start.md b0d7b41a0 Update configuration-markup.md 760e5e4f0 Update quick-start.md 17daeb866 Update quick-start.md 1e158e723 netlify: Hugo 0.136.2 d32530839 Update theme edb9bee02 Update description of url front matter field e1c576e18 netlify: Hugo 0.136.1 1ad28e1e0 Describe how to configure uglyURLs per section cbbd4c4fe netlify: Hugo 0.136.0 bb7f35e99 Merge branch 'tempv0.136.0' 706110736 docs: Regen CLI docs bf0c7821f Update urls.md 8c544e6c0 Update quick-start.md 8d02733d0 Update Paginator.md a45327aac Update Paginate.md 1377ed4de Clarify date parsing e19fb8043 Document front matter date field aliases a39951847 Update Tailwind CSS installation instructions 3be164c35 Remove duplicate token 05fc815f7 commands: Add "hugo build" as an alias for "hugo" cb3cb504c Update table render hook example efbee0bff Clarify resources.GetRemote 404 handling 4312d49c9 Update compare.Conditional documentation 4a46d53b6 Update theme 93e542d4f netlify: Hugo 0.135.0 b4da1c104 Remvoe some old new-in shortcodes 4c316f051 Update TailwindCSS.md c2fe91509 Update introduction.md 906b7c66b Update configuration.md 5ab6b3cdd Update documentation.md 26fb4bb4c Update documentation.md e9e917f37 Update version refs 83ce07f24 netlify: Hugo 0.134.3 8cb32f802 Update front-matter.md 94d7f576a Update faq.md fafc1d8d9 netlify: Hugo 0.134.2 bfe9cdc3d Update content-adapters.md 9e49ae3e1 Document ignoreLogs configuration setting 6b47a1d57 Update configuration.md fd98a0372 Document CLI options that can be set in configuration 07c2400d8 Document alternative to Summary method d053fa163 Update to reflect changes in v0.134.1 137dc3241 Update ContentWithoutSummary.md e8f6427d9 netlify: Hugo 0.134.1 git-subtree-dir: docs git-subtree-split: 159c843fd79e94a0f49bee74c272cd0cc4a848a2
2024-11-13 11:07:57 +01:00
To build the standard edition:
```sh
go install github.com/gohugoio/hugo@latest
```
To build the extended edition:
```sh
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
Squashed 'docs/' changes from ccb1b97cb..159c843fd 159c843fd Fix front matter menu entry example c3a476a19 Document soft deprecation of PAGE.Scratch cdead9785 netlify: Hugo 0.138.0 9169b4da4 Update version references 3bc6bf431 Update embedded.md 5c7743b2e Update creation instructions for the emoji quick reference 109efe3eb Document the comment shortcode 83d7d3005 Update theme d3c205054 netlify: Hugo 0.137.1 545290351 Handle inline HTML content 0204be97d Update theme 18d09235e Remove JS and CSS that prevents FOUC with client side math rendering 63d9dd876 Update RenderShortcodes.md 064b95539 Update output-format-definition.md 3744f3be2 Describe and refer to the extended/deploy edition 3d3302308 netlify: Hugo 0.137.0 b53aedcea Update RenderShortcodes.md b5f289165 Replace HTML comments in markdown with the new comment shortcode c673880b6 Remove superfluous right bracket f80b0c61e Update faq.md 2ede707eb Document installation on NixOS 09b114914 Update theme 76a9f90b2 Update passthrough.md 9f3355630 Update Scratch.md bc080ecaa Update Store.md 1507ede32 Update Scratch.md 54a90f569 Update Store.md 7c9145c43 Fix broken link dd15f183b Update ToMath.md 2b021c34b Move the [build] documentation to its own page cbb6677ec Fix typo ac0969063 Update ToMath.md 7fbdfd7c8 netlify: Hugo 0.136.5 17f54223c Update ToMath.md 4c9c3bb06 Update multilingual.md 1432da7bd Make site and page language methods linkable fd5b746cb Update urls.md a746f1b3a Update urls.md abf8738e2 netlify: Hugo 0.136.4 bd8759996 Update TrimSpace.md 6103c1e84 Documents strings.TrimSpace 533dd3a7b netlify: Hugo 0.136.3 30f3f97cf Update quick-start.md b0d7b41a0 Update configuration-markup.md 760e5e4f0 Update quick-start.md 17daeb866 Update quick-start.md 1e158e723 netlify: Hugo 0.136.2 d32530839 Update theme edb9bee02 Update description of url front matter field e1c576e18 netlify: Hugo 0.136.1 1ad28e1e0 Describe how to configure uglyURLs per section cbbd4c4fe netlify: Hugo 0.136.0 bb7f35e99 Merge branch 'tempv0.136.0' 706110736 docs: Regen CLI docs bf0c7821f Update urls.md 8c544e6c0 Update quick-start.md 8d02733d0 Update Paginator.md a45327aac Update Paginate.md 1377ed4de Clarify date parsing e19fb8043 Document front matter date field aliases a39951847 Update Tailwind CSS installation instructions 3be164c35 Remove duplicate token 05fc815f7 commands: Add "hugo build" as an alias for "hugo" cb3cb504c Update table render hook example efbee0bff Clarify resources.GetRemote 404 handling 4312d49c9 Update compare.Conditional documentation 4a46d53b6 Update theme 93e542d4f netlify: Hugo 0.135.0 b4da1c104 Remvoe some old new-in shortcodes 4c316f051 Update TailwindCSS.md c2fe91509 Update introduction.md 906b7c66b Update configuration.md 5ab6b3cdd Update documentation.md 26fb4bb4c Update documentation.md e9e917f37 Update version refs 83ce07f24 netlify: Hugo 0.134.3 8cb32f802 Update front-matter.md 94d7f576a Update faq.md fafc1d8d9 netlify: Hugo 0.134.2 bfe9cdc3d Update content-adapters.md 9e49ae3e1 Document ignoreLogs configuration setting 6b47a1d57 Update configuration.md fd98a0372 Document CLI options that can be set in configuration 07c2400d8 Document alternative to Summary method d053fa163 Update to reflect changes in v0.134.1 137dc3241 Update ContentWithoutSummary.md e8f6427d9 netlify: Hugo 0.134.1 git-subtree-dir: docs git-subtree-split: 159c843fd79e94a0f49bee74c272cd0cc4a848a2
2024-11-13 11:07:57 +01:00
```
To build the extended/deploy edition:
```sh
CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest
```
[Clang]: https://clang.llvm.org/
[GCC]: https://gcc.gnu.org/
[Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
[Go documentation]: https://go.dev/doc/code#Command
[Go]: https://go.dev/doc/install