mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Squashed 'docs/' changes from 8c46b304a..9b06f951e
9b06f951e Update theme aa24b5319 Improve quick start example 08e4e626d Update index.md f4c1a8ce1 Update Disqus comments implementation notes (#2631) aac3c0279 Update data sources 6ac3d7617 Fix typo 017da70a0 Ensure consistent use of method instead of variable 820881dcf Fix typo dc6fa5ac6 Document LiveReload debugging 18b8c79f3 Improve url function examples 89e6997f1 Improve url function examples 53134e05c Remove static files page 27645a90f Improve data file/source documentation f86b95bd4 Correct manual summary divider example f0e95c8d1 Add examples to comparison operators c5c6aa798 Document Pager methods 015049af9 Fix typos ea6a9fa3f Remove new-in label 0359c4a1e Fix links 3ab8bb4e3 Update performance.md b5393c65d Update configuration.md ca9697630 Update Sections.md 927c90562 Document HTTP cache config 6da219643 netlify: Hugo 0.127.0 de236b58b Deprecate .Sites.First in favor of .Sites.Default 076067b47 netlify: Hugo 0.126.3 c37dd680e Change GetPage examples to single argument 24282c554 Clarify cardinalityThreshold a4ce1a2d2 Revert "Update summaries.md" 466bc7e0f Update summaries.md 168800d5a Fix typo 65f6ca106 content adapters: Use --printPathWarnings to detect page collisions 9c7a700ea Update CLI docs 993aa40d3 netlify: Hugo 0.126.2 0242ec396 Replace file tree image with text 7670da499 rel and relref: Add note about which language version is picked 5dbd7ee26 Add cautionary note to virus scanner exclusion instructions 3c52fab72 Fix typo 868620bcd Improve content summary page 6bca7bc77 Rework safe functions e30d17947 Rework index function b76e81697 Miscellaneous edits 35849e55a Update formats.md 8f939ed5d Update menus.md ea2fd0384 Update docs.yaml (#2592) 2f5d1712b Add security.http.mediaTypes to security page d218b9c44 Change twitter.com to x.com cb2255821 content adapters: Note to exclude file extension when specifying page path 2d5a1690f Indicate that .Page.Sites.First returns the site corresponding to the default content language 60071d923 Indicate that .Site.Sites.First returns the site corresponding to the default content language 0a115cfda Add content adapters section to features summary 011742c24 timer: Adjust output example 977101061 Describe possibility of page collisions with content adapters d57b8a8cf Document virus scanning performance impact and remedy dd5c3af04 netlify: Hugo 0.126.1 0b16c842d Update description of Markdown content format e42ff7609 Fix typo a120ccd0d Update Scratch and Store descriptions cbb2294e3 Update content-adapters.md c39aa4e25 netlify: Upgrade to Hugo 0.126.0 58b9554b7 Update version references 6140802d8 Update docs.yaml 5ee96971a Document content adapters 653069a0d Document the Goldmark extras extension b8ca2833d Update sample data efad994ee Describe .Language.LanguageCode fallback value 3336532fe Update Colors.md 40b49a1f4 Update embedded.md f31741b47 Remove references to symlinks 1d5f40c90 Update sample data fb76580f8 Update function signatures 463adcf26 Use key-value consistently throughout documentation d03ed1887 Update sample data fc59e1f6f Remove examples of LanguageCode fallback b608f3165 Clarify purpose of multilingual site `title` b677f9424 use-modules: clarify the example of initializing a new module 774d64a4d Update theme 417e869f0 Update site configuration docs 1dbe9ee20 Update sample data file fa494af4b Move sample data file 300b4a319 Add sample data file b4fc35c3e Change transform.Unmarshal remote data examples (#2557) 4b79599b9 netlify: Hugo 0.125.6 e8cb250f3 Improve external learning resources 9b0c02e46 Rework content formats 886f952e0 Clarify descriptions of permalink tokens 2f0d8c98c Fix a misused word 3b3b0693d Update Dart Sass version refs c5d0fbcb0 netlify: Hugo 0.125.5 bf7d4f4fd Add Discourse to the comment system list 86a29bd43 Clarify language key format 6126c901a Update multilingual.md 6ec03c2c7 Update WorkingDir: Add new-in d48f40ded Document multilingual 404 redirects b161cc0c5 Update version references 02732fe91 Remove layouts directory 5befe5f28 Vendor theme 21247df4e Update link render hook 7d2fd8647 Update link render hook af9e6bbe7 Update Colors.md 0442f8264 Document images.Color.Luminance and images.Color.ColorHex d58b0b2f5 Update views.md 48ef3ad18 netlify: Hugo 0.125.4 b5721dff2 Update cross-references.md 27905febb Fix typo d16acd658 netlify: Hugo 0.125.3 o 28a1b9dce Update Parse.md 842b20d2c Update YouTube shortcode argument description a133a4828 Clarify that generated syntax highlighter css overrides markup.highlight.style 6e739fcbf Fix alias in /about/security.md a9859e4e2 netlify: Hugo 0.125.2 326fcb518 Update CLI docs 1d3afb6b0 Fix netlify.toml examples in hosting-on-netlify f4628189a Document front matter params expected by embedded templates 8a12d3c48 Fix typo 4b411d3fb Fix typo a7fa25d7f Update CLI docs 7c9a1b864 Add related funcs/methods to time.Round and time.Truncate 79f22ead4 Update strings.Diff description 8085d85e3 Document time.Truncate and time.Round 76a1263e7 netlify: Hugo 0.125.1 6ea4cb709 Update introduction.md e59a8805b Fix typo eace2624a Fix PageInner reference links ba66d6b90 Fix typo 3dcf32e25 Update debug.Dump 38d6731e2 netlify: Hugo 0.125.0 34362b62f Merge branch 'tempv0.125.0' 2221162fa Update privacy defaults and description 3873cf209 Remove "same path" restriction when using resources.Copy 66237fe12 Update youtube shortcode args 961639dfa Document additional changes in v0.125.0 3aa75ee74 Document taxonomies Page method 7f26f69e8 docs: Regen docshelper 05494b7d2 Fix conflicting text for global site function 264fe788e Add missing example to TOC page de8d008e4 Update formats.md 8559c70c3 Update comments.md 987f9424e Update comments.md b77011c93 Improve function descriptions ae663793b all: Fix duplicate words in comments 585095cf8 Fix home page feed 37c6954ac Improve RSS feeds 6cd1b77af Update front-matter.md 3d95ad715 Fix RSS last build date 2c6153461 Improve RSS feed for news section (#2521) 898d7c261 Fix typo 0241936e1 Add installation instructions for Exherbo 62df9bd73 Add missing links to warnidf function c9551d433 Fix a typo in templates docs 09ff1f27c Update YearDay.md 4b278d920 Fix literal usage of manual summary divider 8dec28c50 Fix literal usage of manual summary divider 16102faa8 Add introduction video b276bb17f Fix default data type 61319af7a Fix file extension typo in page-bundles.md ea74d798a Update shortcodes.md 9d18e239f tpl/tplimpl: Optionally exclude content from sitemap 4fe2efc76 Update page-bundles.md 34f099e1e Revise page bundle descriptions 021eea7b1 Update link to Modules page of Go Wiki 6972a9a83 Fix reference link 5ebfdea40 Fix configuration file tree example 12bebaaea Fixing typos b179f3b7f Update segments example ad3e26cec Update segments example 6970a9eeb Fix typo 194139ce7 Update configuration-markup.md 8fb8af286 tpl/tplimpl: Update Google Analytics template and config 4f8fd82ad Add wp2hugo migration tool 39261556a Update directory-structure.md 1e2c0b880 netlify: Hugo 0.124.1 55d5a2787 Update partial function example e26b4634f Fix typo bdada4361 Fix typo and capitalization 4a1fcfc29 Miscellaneous edits 6d6092058 Rework the about section 77ec9d696 Fix typo 6efbf5a39 Update configuration.md dc1fe4405 Update configuration.md 3d1cd3383 Miscellaneous updates 8049e7701 Update IsMultihost method 939281f3a Update version references 5e9567046 Add segments documentation 8e267d780 Update MultiLingual and MultiHost methods/functions c6aeeb747 netlify: Hugo 0.124.0 9fcd40fb5 Merge branch 'tempv0.124.0' 2f7a4ed68 docs: Regen CLI docs 5162805d7 docs: Regen docshelper e1fa18bf8 Update versions in GitHub hosting example 70653e4b2 Add PubCrank to list of front ends 5f81464d5 Update opengraph configuration example cc8a99633 Update hosting-on-gitlab.md 3af715f77 Clarify .Page.File behavior when page is not backed by a file cab417dee Update cspell rules 29f4dde19 Rename section menu entries from "Overview" to "In this section" e04291a99 Miscellaneous edits towards the goal of consistent language f9fc2d5d6 Update page collection quick reference a4893d9ba Update multilingual.md ed81ac6b0 Fix typo 1f522e32e Fix typo c4611eab5 Rework introduction to templating 64154fb8f Fix typo ad71bdfbf Miscellaneous multilingual edits 016adc81b Sync CLI docs 346a5fb02 netlify: Hugo 0.123.8 ff0bedd97 Document hugo.IsMultihost 0e234715c docs: Fix hyphens and grammar in synopsis of command 'hugo server' c8ef1da97 Add the Hugo dedicated Quiqr CMS 59dfe253b Fix grammatical error 1c6ca8022 Standardize usage of the term open-source e6fd6e68c Update Translations.md f6728e79b Update AllTranslations.md 18812d030 Fix typo 3b2d738c9 Correct isCJKLanguage description a1188fe28 Bump version references b51bd5548 Sync and vendor theme da3ba4902 Replace the github logo png with svg f75112195 Add diego to developer tools a4b001470 netlify: Hugo 0.123.7 c37107fda Fix typo 37c1d9c92 Fix typo 48a5ac213 Correct description of MENUENTRY.Title f434e25e8 Correct RESOURCE.Title example de03cd28c netlify: Hugo 0.123.5 3c103d0f9 Revise and improve RESOURCE.Name and RESOURCE.Title examples 4aafbb2f4 netlify: Hugo 0.123.4 f2bf6c365 Clarify archetype context 98ddc91a2 List page kinds to which a taxonomy term may be applied 6094e59bb Remove refs to RESOURCE.Key 208d44a04 Update Key.md 46dd28266 Document the capitalizeListTitles site config option 2ed3b7732 netlify: Hugo 0.123.3 73d35c02f Merge branch 'tempv0.123.3' 93eb216ca js: Support JSX and JSXImportSourceOptions c0cd22cc8 netlify: Hugo 0.123.2 94256ecd0 Add "comma" to list of comments solutions 6a4f38fc3 Update RESOURCE.Name examples 8cf5046f5 netlify: Hugo 0.123.1 c11c8e0da Fix link to embedded code block render hook for GoAT diagrams 08c4af7af Fix typos 1c20eb91a Update all transform.Unmarshal examples d41da7450 Clarify functionality of sectionPagesMenu 5bb3752f7 Update list of methods that use logical path fcab32c62 Update version strings 5770d37c0 Add new-in badge to images.Dither 9f9a9315f Remove variables section 313b1d85e Define and describe the concept of a logical path 97a8d2963 Document HUGO_MEMORYLIMIT c60cd20a8 Capitalize the word Markdown throughout the documentation f9b5938dd Create links to referenced embedded templates df31318d1 Improve quick start guide a76fa0de4 Rework Netlify hosting instructions and examples a3184764d Provide examples of content rendering before accessing Scratch or Store 0206b9699 Include examples of building from source ab268c395 Create FAQ reqarding file watcher c89cf2baa More updates for v0.123.00 b8d5383f7 Replace links to variable pages with links to method pages ad4a124c0 Updates for v0.123.0 24eda1cb0 netlify: Hugo 0.123.0 f7436b6a3 Merge commit '2658a71e1b6fe24a8b754a62ce0398a09d270d86' da2d6ba11 docs: Regen docshelper 411374a58 Add images.Dither filter 36937d58d docs: Regen CLI docs 7c4b77317 docs: Regenerate docshelper a9f56bf9b Merge commit '6efb279bfacbd7304cef994be8181c6f804e7dd4' b3346da53 docs: Make null booleans falsy in the docs helper 88286d1ea docs: Regen docs helper a8ad989c6 Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'fc7de7136
docs: Prepare for new sub tree1083bf7c0
releaser: Prepare repository for 0.123.0-DEVb9a03bd59
releaser: Bump versions for release of 0.122.0e0021f496
build(deps): bump golang.org/x/tools from 0.16.0 to 0.17.0d25902c0d
build(deps): bump github.com/rogpeppe/go-internal from 1.11.0 to 1.12.050042ee1f
docs: Regen docshelper3758456b3
Merge commit '7125ad401ad043e46262afc7eca8dceb6d54bb9e'7125ad401
Squashed 'docs/' changes from 4dd2d6415..3b1a8579dd0d2c6795
markup/goldmark: Support passthrough extension2dd608378
build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.0 to 2.1.145f52be7f
build(deps): bump github.com/evanw/esbuild from 0.19.8 to 0.19.1287bf2b968
tpl/tplimpl: Fix incorrect lastBuildDatef281ef8a4
tpl: fix incorrect lastBuildDate46f618756
parser/metadecoders: Accumulate org keywords into arrays891534307
deps: Update github.com/tdewolff/minify/v2 v2.20.9 => v2.20.13a541e3b4d
Upgrade to Go 1.21.6912c6576b
parser/metadecoders: Add CSV lazyQuotes option to transform.Unmarshal911bc60a7
README: Update minimum Go version to 1.205ff632332
releaser: Prepare repository for 0.122.0-DEV6d5b44305
releaser: Bump versions for release of 0.121.21ccd3147a
build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0e40b9fbbc
tpl/math: Add math.Rand template function9cd8fbb33
Adjust site benchmarkabcc61002
Simplify baseline benchmark648d00c7d
resources/images: Create AutoOrient image filter8adba648c
all: Remove unused code6f13430d4
releaser: Prepare repository for 0.122.0-DEV00b46fed8
releaser: Bump versions for release of 0.121.1eb9f1eb65
Upgrade to Go 1.21.55186e762a
releaser: Prepare repository for 0.122.0-DEVe321c3502
releaser: Bump versions for release of 0.121.0255e0a971
docs: Regen docshelper558f3258a
build(deps): bump github.com/alecthomas/chroma/v2 from 2.11.1 to 2.12.06580cd30a
docs: Adjust last merge from docs repository7617de86c
docs: Regen docs helperd19ed4d4e
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'35dec7c96
Squashed 'docs/' changes from 4d936aee6..4dd2d64159f978d387
Pull in the latest code from Go's template packages (#11771)14d85ec13
tpl: Allow using page resources on the images page parameter for `opengraph`, `schema` and `twitter_cards` templates171836cdf
hugolib: Apply titleCaseStyle to automatic section pages9ea7103db
tpl/urls: Retain query and fragment with absURL and absLangURL3fc42da3d
markup: Add Level to Heading structd24da1712
tpl/fmt: Print suppression help with erroridf4583b4130
tpl/transform: Display Chroma highlighting errors507f4e356
build(deps): bump github.com/tdewolff/minify/v2 from 2.20.8 to 2.20.9a7e721e02
build(deps): bump github.com/spf13/cast from 1.5.1 to 1.6.02627b91d3
build(deps): bump github.com/getkin/kin-openapi from 0.121.0 to 0.122.06d4b01241
github: Fix CI build on Windowse536d461a
build(deps): bump golang.org/x/image from 0.13.0 to 0.14.0bfc325f56
deps: Update github.com/tdewolff/minify/v2 v2.20.7 => v2.20.836a60f65d
build(deps): bump github.com/spf13/afero from 1.10.0 to 1.11.0de2fcc5e1
build(deps): bump github.com/evanw/esbuild from 0.19.7 to 0.19.826a8ec207
Fix handling of dropped error in test9ca889ba4
build(deps): bump google.golang.org/api from 0.151.0 to 0.152.0e2a624dd6
common/para: Skip flaky test on CI4fb40ee87
deps: Upgrade to libwebp 1.3.2bc93a3613
build(deps): bump github.com/aws/aws-sdk-go from 1.48.4 to 1.48.63e5bc6f3b
build(deps): bump golang.org/x/tools from 0.15.0 to 0.16.07c47036f1
build(deps): bump github.com/getkin/kin-openapi from 0.120.0 to 0.121.04d07e1fe8
build(deps): bump github.com/bep/logg from 0.3.0 to 0.4.01c41232e6
deps: Upgrade to github.com/bep/simplecobra v0.4.0f11ca0fad
build(deps): bump github.com/aws/aws-sdk-go from 1.48.2 to 1.48.430a18e882
watcher: Skip flaky test for nowd7a2f3f98
build(deps): bump golang.org/x/tools from 0.14.0 to 0.15.0b4c5df42f
tpl/transform: Add transform.XMLEscape template functionef12d169c
build(deps): bump github.com/gorilla/websocket from 1.5.0 to 1.5.1a62bbfa9e
build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.08d32ca223
tpl/tplimpl: Remove superfluous type attr on script elements5887230b7
build(deps): bump golang.org/x/net from 0.17.0 to 0.18.0a4a66b821
build(deps): bump github.com/evanw/esbuild from 0.19.5 to 0.19.7813390b5a
build(deps): bump github.com/alecthomas/chroma/v2 from 2.10.0 to 2.11.1d528bbd6d
build(deps): bump github.com/tdewolff/minify/v2 from 2.20.5 to 2.20.7af7f6c8b3
build(deps): bump google.golang.org/api from 0.138.0 to 0.151.0e70849ea7
build(deps): bump github.com/aws/aws-sdk-go from 1.45.14 to 1.48.2 (#11724)dd6cd6268
resources/resource: Fix GroupByParamDate with raw TOML dates27620daa2
common/para: Skip flaky tests on Windows80d2fdbaa
navigation: Unexport menu entry methods805cc1773
markup/goldmark: Sync image render hook code with Goldmark0bde6931a
helpers: Fix TrimShortHTML used by markdownify and RenderStringac7cffa7e
releaser: Prepare repository for 0.121.0-DEVf11bca5fe
releaser: Bump versions for release of 0.120.49315a2d2c
Upgrade to go 1.21.4cee3a56a9
Add a new test helperda2a8e640
releaser: Prepare repository for 0.121.0-DEVa4892a07b
releaser: Bump versions for release of 0.120.3cb98e9061
tpl/tplimpl: Fix deprecation logic in embedded templates5fa97ee96
Remove some old and unused deprecation code4d38f4725
Add a field prefix to the deprecated log statements80f793c38
Avoid double printing INFO deprecation messagesa9079d7a6
build(deps): bump github.com/tdewolff/parse/v2 from 2.7.1 to 2.7.34914b7f18
build(deps): bump github.com/tdewolff/minify/v2 from 2.20.1 to 2.20.59e06fd339
releaser: Prepare repository for 0.121.0-DEV9c2b2414d
releaser: Bump versions for release of 0.120.2ab2143368
Fix deprecation printing on info level23fcfb7f7
tpl/tplimpl: Fix deprecation logic in RSS template47bf2fcbe
releaser: Prepare repository for 0.121.0-DEV16fb2cae8
releaser: Bump versions for release of 0.120.12bedcf3d1
deps: Update github.com/tdewolff/minify/v2 v2.20.0 => v2.20.1935999e2f
releaser: Prepare repository for 0.121.0-DEV20c3bae2c
releaser: Bump versions for release of 0.120.029b6e133a
docs: Regen docshelper7f8ab7468
Add Solaris build59bcc098c
build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0e26ba752d
build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0bcf07fa63
build(deps): bump github.com/alecthomas/chroma/v2 from 2.9.1 to 2.10.0b6a756813
Make site.BaseURL and $pager.URL a stringacf01bfb7
create/skeletons: Fix menu template27b22cd87
commands/new: Remove format flag from new content cmda2488b1c9
hugolib: Display correct markup identifier in error message8f60c0c1e
livereloadinject: Save some allocations9dc608084
livereloadinject: Use more robust injection methoda349aafb7
tpl/urls: Return strings from URL functionsb8fbd4a57
transform/livereloadinject: Add benchmarke2b2092ce
build(deps): bump golang.org/x/tools from 0.13.0 to 0.14.0f4df7b88b
build(deps): bump github.com/tdewolff/minify/v2 from 2.12.9 to 2.20.03d9bd404e
build(deps): bump github.com/mattn/go-isatty from 0.0.19 to 0.0.205f5e55aa8
build(deps): bump golang.org/x/image from 0.12.0 to 0.13.0aaaf1c8df
Squashed 'docs/' changes from 417593493..4d936aee60baa4f983
Merge commit 'aaaf1c8df5d6aa061609d20510f7fa6c42e5cc1a'd3d4ab41a
docs: Regenerate docshelper28d844642
Revert "modules: Throttle the "downloading modules …" log entries"eb5fd3127
Revert "modules: Adjust the log throttle logic a little"3ed28e4bf
resources/images: Create padding image filterdb14238ba
markup/goldmark: Update the CJK extension to allow specifying line break styles3f64b5a3d
modules: Adjust the log throttle logic a little66904097e
modules: Throttle the "downloading modules …" log entriese54139c85
tpl/collections: Make delimit return a string3710a5ec7
Squashed 'docs/' changes from cb18a5183..417593493705e3cd5f
Merge commit '3710a5ec7efe6baca6e452f43632c05d22bab3c4'8c61fd254
build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0d3145e4e5
build(deps): bump github.com/evanw/esbuild from 0.19.3 to 0.19.5743a1da3e
build(deps): bump github.com/spf13/afero from 1.9.5 to 1.10.0123901b74
build(deps): bump github.com/bep/logg from 0.2.0 to 0.3.071fd79a3f
Revise the deprecation loggingc4a530f10
Remove rest of the now unused emoji code272484f8b
markdown: Pass emoji codes to yuin/goldmark-emojide4e46603
Fix so hugo get -u updates transitivelyc23a0c4a0
watcher/filenotify: Remove redundant duplicated commentsa95670b98
docs: Remove outdated note from CONTRIBUTING.md46bdc0388
tpl/debug: Add average and median to timer output5160c7efa
tpl/debug: Add debug.Timere2dd4cd05
Merge commit 'e509cac533600cf4fa8382c9cdab78ddd82db688'e509cac53
Squashed 'docs/' changes from 7ef2dbce4..cb18a5183fd3817181
Add some convenient integration test helpers2eca1b3cc
hugolib: Deprecate .Site.DisqusShortname625162674
tpl/tplimpl: Fix dropped errora692278bc
hugolib: Deprecate .Site.GoogleAnalyticsd4016dd5c
tpl/tplimpl: Deprecate .Site.Author usage in RSS template4910312ee
tpl/tplimpl: Deprecate .Site.Social usage with internal templates1b5f78b6b
markup/tableofcontents: Return template.HTML from .Fragments.ToHTMLd5d0f420d
deps: Update github.com/tdewolff/minify/v2 v2.12.7 => v2.12.95993afa4c
commands: Update message displayed when running CLI from GUId1b445853
common/hugo: Add hugo.IsServer and hugo.IsDevelopment274852bcf
all: Format files with gofmt37a2d5eb4
magefile: Update isGoLatest to check for Go 1.214c95389c2
resources/integrity: Return string instead of template.HTMLAttr3af8bded2
Update README.md46da0b7aa
tpl/lang: Formally deprecate lang.NumFmt75f56b4ce
tpl/collections: Fix and deprecate echoParamsd234a963e
releaser: Prepare repository for 0.120.0-DEVb84644c00
releaser: Bump versions for release of 0.119.0a9d19dbdd
docs: Even more about images.Process12d713176
docs: More about images.Process6b65b2fae
common: Remove unused constants1768684d8
docs: Regen docshelper9aec42c54
Squashed 'docs/' changes from 686c7b6eb..7ef2dbce4eb0ed33df
Merge commit '9aec42c5452b3eb224888c50ba1c3f3b68a447e9'6a246d115
Add images.Process filteref0e7149d
Add $image.Processc32094ace
google_analytics_async.html: Add deprecation warninga262fd4dd
build(deps): bump golang.org/x/tools from 0.12.0 to 0.13.0f0d32455d
build(deps): bump github.com/alecthomas/chroma/v2 from 2.8.0 to 2.9.1e8bc8e6d0
build(deps): bump github.com/evanw/esbuild from 0.19.2 to 0.19.3f9b3c0f48
Add images.Opacity filter11fcda971
build(deps): bump github.com/aws/aws-sdk-go from 1.44.314 to 1.45.14f31375d4c
build(deps): bump github.com/getkin/kin-openapi from 0.118.0 to 0.120.06415b599b
build(deps): bump golang.org/x/image from 0.11.0 to 0.12.01e9b87f76
Upgrade to Go 1.21.1275c0acbf
commands: Update CLI docs with the important -u flag in hugo mod getf9163155d
create/skeletons: Improve viewport meta tag79a17d9e5
Fix tests for Go 1.21.175c0f8828
commands/gen: Remove default highlight style18ce85462
Fix recently broken benchmark69f5bad40
Adjust baseline benchmarks525bed991
commands: Print language code after web server address info2ae4786ca
releaser: Prepare repository for 0.119.0-DEVda7983ac4
releaser: Bump versions for release of 0.118.2df5d76fed
release: Revert to building with Go 1.207362ba220
releaser: Prepare repository for 0.119.0-DEV0eb480aa1
releaser: Bump versions for release of 0.118.17e9092eee
Revert to bullseye as the release build image0200eaf58
releaser: Prepare repository for 0.119.0-DEV28b640a22
releaser: Bump versions for release of 0.118.0db45dbbee
Merge commit '77b976dd92b4f66657d83d875aef0c617df492d9'77b976dd9
Squashed 'docs/' changes from a7e1e9be8..686c7b6ebe847a98db
docs: Regen docs helper45c9bbc6c
Don't use the OS environment when creating config for docs94fbab2a8
Delay the creation of cache directories until they're usedc3f273b2d
deploy: Create AWS session for CloudFront invalidation via Go CDKd7dcc76d2
markup/goldmark: Add CJK extension9bf76fd7e
build(deps): bump google.golang.org/api from 0.134.0 to 0.138.015d3e48ce
Fix RegularPagesRecursive for the home pageb2a02c3c5
build(deps): bump golang.org/x/tools from 0.11.1 to 0.12.06821d6f15
build(deps): bump gocloud.dev from 0.33.0 to 0.34.093c7ad12e
build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.9 to 2.1.0d2ae9e136
testscripts: Move hugo new tests to where they belong3a8aad6b1
Fix .RawContent for empty content pages (#11407)a7b93e656
hugolib: Handle dropped error65871d5cf
common/loggers: Fix typo in option name2e4bf89ec
misc: Change dart-sass labels in workflows and snapcraftebaa733d4
Make sure resources directory isn't created in hugo new theme24b1be45c
Go 1.21 Upgrade111f02db2
testscripts: Make mod vendor test stable8a08f91d5
dockerfile: Update Docker imagesdcf425c84
Fix it so disable a module does not disable transitive dependency required by others9a8c84d60
create/skeletons: Move theme's site config to top levela19d03b0e
build(deps): bump github.com/yuin/goldmark from 1.5.5 to 1.5.6cdf0b3b7a
modules: Make new cache directories read/writed979831db
deploy: Update InvalidateCloudFront to use Go CDK helperbcf7421ea
Avoid escaping HTML chars inside hugo_stats.jsonb6538532f
commands/new: Embed site and theme skeletons90944aa26
docshelper: Improve template lookup order descriptionsdb7bc4969
build(deps): bump github.com/evanw/esbuild from 0.18.17 to 0.19.2a2f6400d6
cache: Hide IsResourceDir from the exported config7d74cd0cc
commands: Handle floats without decimals in hugo configd139f3023
docs: Replace docs.json with docs.yamlb1b691241
config: Add a type value for the tags related config entry0de81c643
build(deps): bump golang.org/x/net from 0.13.0 to 0.14.0851bf3515
Add all config to docshelper.jsond4a6c16c1
build(deps): bump golang.org/x/image from 0.10.0 to 0.11.05d5fb22ea
Merge commit '7c62d6ef1654c0383eae474d3bd9ddf7754c1f30'7c62d6ef1
Squashed 'docs/' changes from c43daf45f..a7e1e9be8641390f8f
Try to make test more stable2e6191b2e
deps: Sync go-i18n with upstream22861cb4d
Return original error on resources.GetRemote retry timeouts16da1ade7
testing: Write test caches to /tmpa3d42a277
Add retry in resources.GetRemote for temporary HTTP errors2c20fd557
build(deps): bump gocloud.dev from 0.24.0 to 0.33.0243736e75
build(deps): bump golang.org/x/net from 0.11.0 to 0.13.0bf891c225
build(deps): bump github.com/marekm4/color-extractor from 1.2.0 to 1.2.1da0df0ada
build(deps): bump github.com/frankban/quicktest from 1.14.5 to 1.14.60885f8ec2
build(deps): bump golang.org/x/image from 0.9.0 to 0.10.061be050a9
build(deps): bump github.com/clbanning/mxj/v2 from 2.5.7 to 2.7.065af75fb0
build(deps): bump golang.org/x/tools from 0.9.3 to 0.11.12d75f74b8
build(deps): bump go.uber.org/automaxprocs from 1.5.2 to 1.5.32ac3d6160
build(deps): bump github.com/hairyhenderson/go-codeownersade7ec818
Add Page.RenderShortcodes8fa8ce3e4
Update GitHub issue template9dce45c25
build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.8 to 2.0.9239f2e2c9
releaser: Prepare repository for 0.117.0-DEV3e1ea030a
releaser: Bump versions for release of 0.116.130885a6c5
Fix module config watch regression58da8554c
deps: Fix Chroma dependency version92c159437
releaser: Prepare repository for 0.117.0-DEV5a7e0da84
releaser: Bump versions for release of 0.116.0d7db096a9
build(deps): bump github.com/evanw/esbuild from 0.18.11 to 0.18.17c1df5b1b0
config: Do not fail on unknown config keysbe8e2de59
resources: Fix spelling in method named297c8e1b
docs: Regenerate CLI docsfbb8eb39e
Fix so temporary images do not get published87d9bffe7
readme: Fix linkd9fdcbe93
commands: Update cacheDir description295d73388
Update where.mdd5247788e
docs: Update where036e260d8
docs: Update where function operatorsa50356b9a
docs: Rework the cacheDir documentation8859be1c0
Merge commit '87de22d7464e239c775fbd48ebce1665d5b1e80d'87de22d74
Squashed 'docs/' changes from 85befbb4d..c43daf45fbec9b80d9
Deprecate taxonomyTerm1c97095ac
Warn about unknown kinds in disableKindsb3cb6788b
Move all Kind constants to its own package5542f02fb
build(deps): bump github.com/rogpeppe/go-internal0bc7ed9a1
build(deps): bump golang.org/x/image from 0.8.0 to 0.9.036b512605
Remove unused autogenerated method2589b1295
commands: Replace deprecated ioutil with osef6e813ca
tpl/collections: Add BenchmarkWhereOpsf4598a098
tpl/collections: Add like operator to where functiondc2a544fa
tpl/collections: Fix description of apply function916397320
snap: Set cache location to $HOME/.cache/hugo_cacheb3f10556f
Use os.UserCacheDir as first fallback if cacheDir is not set4d7af757c
Add a common regexp cache7f058b8ba
Fix multiple languages in HUGO_DISABLELANGUAGES575d7f806
snap: Allow access to SSH keys and $HOME/.config/hugo739d10e8b
deps: Upgrade github.com/yuin/goldmark v1.5.4 => v1.5.50dbe0f1a0
releaser: Prepare repository for 0.116.0-DEVdc9524521
releaser: Bump versions for release of 0.115.4d70b6c7d0
Fix broken handling of legacy taxonomyTerm in disableKindsd947db371
commands: Move testscript into its correct placed8c94c354
publisher: Improve class collector for dynamic classes6bbec9001
Fix cache busting setup5bd22ba85
commands: Delay server builds after the watcher is set up7ae62f4aa
Create hugo_stats.json if it's mounted but does not existsf1a061e9e
Re-instate disableLiveReload as a config option (and not just a flag)2f11e673c
common/htime: Fix localization of abbreviated month names387c5f60f
Improve error messages for PostCSS etc.c406fd3a0
Fix setting config from env with complex (e.g. YAML) strings286821e36
Fix for data mounts in sub folders79f15be5b
releaser: Prepare repository for 0.116.0-DEV5c2e014a5
releaser: Bump versions for release of 0.115.3cc44583cc
Improve behavior of defaultContentLanguageInSubdir when only the default language is enabled4da672af8
Return error when .Render is invoked without argf1886f8c3
js: Pass tsconfig.json to esBuild5bec50838
tpl/collections: Fix WordCount (etc.) regression in Where, Sort, Delimitf650e4d75
config/allconfig: Update timeout descriptionc934a4506
docs: Refresh docs.json91b02091a
releaser: Prepare repository for 0.116.0-DEV8966424e0
releaser: Bump versions for release of 0.115.272510969a
snap: Allow access to AWS, Azure, and GCS config/credentials70c5e485b
snap: Update metadata and security.exec.osEnva78b17d7f
Make imageConfig work with modulesa48194253
Restore language.disabled config0f921ace6
Fix hugo mod vendor for modules with hugo.toml601995376
Fix static content files multilingual root regression92e86702e
Fix defaultContentLanguageInSubdir with only 1 language6c9ea022a
config: Expand default security.exec.osEnv policy12d3469dd
Add titleCaseStyle none and firstupperbf7ee8a91
Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0d912491f2
releaser: Prepare repository for 0.116.0-DEV857374e69
releaser: Bump versions for release of 0.115.1c27639b9a
docs: Regen docs helperceb486f98
Fix buildStats when tags and classes are disabled5afc89f2b
Rework the build.writeStats structc1eac616d
snap: Explicitly set security.exec.osenv during build3c8256a13
snap: Restore security.exec.osenv whitelist19d76ae96
github: Build for Dragonfly in CI build11ecea610
Make build.writeStats a structda98724bc
build(deps): bump github.com/evanw/esbuild from 0.18.10 to 0.18.114d470bb73
build(deps): bump github.com/alecthomas/chroma/v2 from 2.7.0 to 2.8.00ff8e13c1
commands: Fix index out of range in hugo mod getffd37d4f7
Only print the path warnings onceb4b65245b
Update README.md87886f40d
releaser: Prepare repository for 0.116.0-DEV67caf5069
releaser: Bump versions for release of 0.115.07917961d5
Misc permalinks adjustments80ecb9589
commands: Handle hugo mod get --help58e09cc6c
Update README.md635cc346c
commands: Fix panic when running hugo new theme without theme name12646750a
Print help message when triggered with no flags79639c981
Fix output formats and media type per language config regression9b313cec1
build(deps): bump github.com/evanw/esbuild from 0.18.5 to 0.18.10b74b8d647
common/collections: Fix append regression to allow appending nil793e38f5c
commands: Fix help message for hugo new theme7f698c893
Don't panic on invalid security whitelist regexpfa0e16f4c
Fix false path warnings with resources.PostProcess12e4c4d5d
docs: Update permalinks documentationbac03f407
Merge branch 'master' of github.com:gohugoio/hugocc14c6a52
resources/page: Allow section and taxonomy pages to have a permalink configuratione3308a0bb
tpl/tplimpl: Fix typo in global variable name019299b0b
commands: Enable format flag with hugo new site23ed087c4
Update README.mda018259bc
Merge branch 'release-0.114.1'ad5e04daa
releaser: Prepare repository for 0.115.0-DEVe9b716ad9
releaser: Bump versions for release of 0.114.1ae31dbdd1
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.30.0"5b4bfc2db
Fix broken nodeploy setup92f55f112
build(deps): bump github.com/niklasfasching/go-org from 1.6.6 to 1.7.0078226dd6
Fix broken nodeploy setup06d228aad
snap: Switch from Embedded Dart Sass to Dart Sass (#11146)b1016d2e2
commands: Make hugo env respect --logLevel49336bfc5
commands: Update Jekyll post-import output941818295
build(deps): bump gocloud.dev from 0.24.0 to 0.30.05491e5547
build(deps): bump github.com/evanw/esbuild from 0.18.4 to 0.18.5bf7af9043
deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.75e12bf7dc
releaser: Prepare repository for 0.115.0-DEV9df2ec798
releaser: Bump versions for release of 0.114.059300faae
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0"9f98b3e71
docs: Regen docshelper3ab84651c
Add empty Environ when loading test config7241b5fd5
docs: Regen CLI docs6dfbd2479
common/loggers: Drop the bold INFO etc. prefixesf59c3c021
loggers: Avoid using Logf for the LevelLoggerToWriter3ca29b156
tocss/dartsas: Avoid using Logf for the internal Dart Sass loggingfdb0b7fb1
helpers: Remove superflous formatting flag in deprecation warnings49dd53a40
Revert "deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6"68d9d3ebd
all: Fix some typos9009c8cdc
all: Fix typos in function names and comments12dc9a6e4
deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN)1b85303ac
common/loggers: Re-add trailing newline in logger.Printf8a04d47ab
build(deps): bump github.com/evanw/esbuild from 0.18.3 to 0.18.47c9fada77
Replace the old log setup, with structured logging etc.0e7944658
Revert "snap: Transition base snap from core20 to core22 (#11101)" (#11125)aaf2e9693
build(deps): bump github.com/evanw/esbuild from 0.18.2 to 0.18.3ee359df17
Fix upstream Go templates bug with reversed key/value assignment0f989d5e2
build(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0f73c56753
common/collections: Always make a copy of the input slice in Appendd178fe94f
tpl/collections: Fix append when appending a slice to a slice of slices732dcb848
build(deps): bump google.golang.org/api from 0.123.0 to 0.127.0944859f1a
build(deps): bump golang.org/x/tools from 0.9.1 to 0.9.390b2674dd
Re-add site.RSSLink (and deprecate it)bb9377b5e
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.11 to 2.2.12e88f1b80b
build(deps): bump github.com/getkin/kin-openapi from 0.117.0 to 0.118.0516f0cb6c
build(deps): bump golang.org/x/net from 0.10.0 to 0.11.021d17566a
Fix .Width and .Height for animated gifs35e9b3ed1
snap: Transition base snap from core20 to core22 (#11101)3c1deaf20
Squashed 'docs/' changes from 1d5548d73..85befbb4da0009e070
Merge commit '3c1deaf201a35de08d23cc58f8f03682cace3349'7bed16c30
build(deps): bump gocloud.dev from 0.24.0 to 0.29.02ba2271e4
tpl/math: Allow variadic math functions to take slice args, add math.Product, math.Sum60a2cdf72
Fix config merge regression with root slices (e.g. disableKinds)e08cfc8ca
build(deps): bump golang.org/x/image from 0.7.0 to 0.8.0ef147f4e8
commands: Remove flags log, verboseLog, add flag logLevel, deprecate flags verbose and debug489519566
build(deps): bump github.com/magefile/mage from 1.14.0 to 1.15.091c0b0f76
build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.6 to 2.0.8baef235d5
build(deps): bump github.com/evanw/esbuild from 0.17.19 to 0.18.20541a1b57
Fix handling of aliases (e.g. hugo serve)258884f44
cache: Set default cache path based on $USER254c2b323
build(deps): bump go.uber.org/atomic from 1.10.0 to 1.11.084f71ba8f
build(deps): bump github.com/hairyhenderson/go-codeowners69f0e88a4
resources: Remove failing and superflous test assertion82adc972e
build(deps): bump github.com/frankban/quicktest from 1.14.4 to 1.14.560533fdc0
build(deps): bump github.com/mattn/go-isatty from 0.0.17 to 0.0.19261143bbb
build(deps): bump github.com/spf13/afero from 1.9.3 to 1.9.5b8526f32f
commands,config: Fix typo in log and error messagesed7e25006
helpers: Avoid url.Parse in RelURL and AbsURL if we can6a09e7f28
Adjust benchmarks29e5cbb69
Adjust benchmarkded686600
Add BenchmarkAbsURLe1d43021c
helpers: Improve schema detection when creating relative URLs5db215d4d
helpers: Add a basic benchmark for RelURLb7dc93ca1
config: Remove unexpected _merge keys introduced in author and social mapsf210188da
Upgrade to v2 of the Dart Sass Embedded Protocolc782ebd89
Fix indented SASS imports for Dart Sass73779707a
releaser: Prepare repository for 0.114.0-DEV085c1b3d6
releaser: Bump versions for release of 0.113.06c955cc3d
docs: Regenerate CLI docs5446900de
commands: Update CLI docs vs server and productioncf38c73f5
commands: Add TLS/HTTPS support to hugo server536bf71ab
releaser: Prepare repository for 0.113.0-DEVea3c95a7b
releaser: Bump versions for release of 0.112.75e5ce00d4
Fix menuItem.URL when pageRef is not seta191b38ac
Don't inject livereload script on hugo -w382c726e6
markup: Fix typo in function and struct names4c46f9400
all: Replace deprecated ioutil with io and os8c7a4e995
releaser: Prepare repository for 0.113.0-DEV2ca0fcc44
releaser: Bump versions for release of 0.112.6a6d774e80
docs: Regenerate CLI docsdfb1895e4
Squashed 'docs/' changes from 1798dc0d5..1d5548d739e4072ac2
Merge commit 'dfb1895e4b82b2249d9baaed37ac7ae5e855a126'0ef295284
commands: Add --lang to hugo confige3ae8f025
Make sure any default mounts show up in "hugo config"06faee5be
github: Fix Windows build409c6c3fc
deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6ff77a927f
tpl/tplimpl: Use .Language.LanguageCode in built-in templates9cdca1f95
Fail on invalid defaultContentLanguage6462eecfb
Avoid panic in invalid language configa7d6b1413
Don't panic on empty yaml config params3f497d496
Prevent double escaping of image alt-text in Goldmar typographer32585696b
Fix potential deadlock in ByParamd47225ce9
releaser: Bump versions for release of 0.112.5e3dfc76fa
Fix it so languageCode on top level config still workscd59216de
releaser: Prepare repository for 0.113.0-DEVe285153d7
releaser: Bump versions for release of 0.112.420ea2e0c6
docs: Regenerate CLI docs51d0a0ab0
commands: Add the common build flags to the config commandsfd099331e
Fix Processed images count regression for multiple languages43f1282e7
commands: Reinstate some of the removed build flags (e.g. --theme) to new and mode96cdfe96
Don't create the public folder unless neededffdbce578
docs: Regen CLI docsa838a27e4
Merge commit 'd3927310d5b2404c3238f9b899db3329ea516490'd3927310d
Squashed 'docs/' changes from 39af43ef1..1798dc0d5273d9f69a
commands: Fail the build when no config file or config dira6257d8a4
langs: Remove the Language.Params deprecation message for now6c2db0dfb
Add language.LanguageCode8f293a185
Fix --renderStaticToDisk regression901cd970d
commands: Re-introduce the -f shorthand for hugo new sitef86b5f70a
commands: Move the --format flag to only the commands that support it3297b395d
releaser: Prepare repository for 0.113.0-DEVba6f74e40
releaser: Bump versions for release of 0.112.3231374a1f
Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set5adc83790
releaser: Prepare repository for 0.113.0-DEVf89108f2b
releaser: Bump versions for release of 0.112.2dd6792201
minifiers: Make sure JS.Version always has a value9a235d0af
Fix regression with site.IsServer when not running a server99407c39b
releaser: Prepare repository for 0.113.0-DEV7c90c19d2
releaser: Bump versions for release of 0.112.1ed906a86e
Fix regression when config for OutputFormat.BaseName is an empty stringd666edad7
releaser: Prepare repository for 0.113.0-DEV0a95d6704
releaser: Bump versions for release of 0.112.070b2aaf87
circleci: Add github.com to known hostsf01492115
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0"bd38e35f9
Revert "postcss: Improve validation of option 'config'"85b13c105
Add --format to hugo configb6e6438f7
docs: Regen docshelper943ff7f7c
commands: Add missing gen docshelper command288be1976
Fix "unknown command" message when no suggestion9a0370e8e
postcss: Improve validation of option 'config'10d0fcc01
docs: Regen CLI docsb95e15694
Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'f96384a3b
Squashed 'docs/' changes from 6e32d0591..39af43ef14cac5f5e3
Avoid writing to hugo_stats.json when there are no changes2c3d4dfb7
Add cache busting config to support Tailwind 31292d5a26
build(deps): bump github.com/tdewolff/parse/v2 from 2.6.5 to 2.6.6baa556904
build(deps): bump gocloud.dev from 0.24.0 to 0.29.0a5413c1f8
build(deps): bump github.com/gobuffalo/flect from 0.3.0 to 1.0.29cea58a8a
build(deps): bump golang.org/x/image from 0.5.0 to 0.7.01a5dce4cc
build(deps): bump github.com/tdewolff/minify/v2 from 2.12.4 to 2.12.56ca8a40f2
commands: Make all list commands list what 'all' did before2db7ec622
tpl/tplimpl: Add img loading attribute to figure shortcode (#10927)e6dc8053b
commands: Fix build logic when listing expired/future draft content2637b4ef4
Allow whitelisting mediaTypes used in resources.GetRemote7c7baa618
Add hugo.WorkingDir4f085e80d
Make language merging of markup etc. config without values in the root150d190ff
tpl/urls: Return empty string when JoinPath has zero args065ae003a
build(deps): bump github.com/dustin/go-humanize from 1.0.0 to 1.0.11a7d57c0b
build(deps): bump google.golang.org/api from 0.76.0 to 0.123.0bba54e694
build(deps): bump golang.org/x/tools from 0.4.0 to 0.9.1737054311
build(deps): bump github.com/cli/safeexec from 1.0.0 to 1.0.1f6269ee92
build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.117.0715d48404
deps: Update github.com/evanw/esbuild v0.17.0 => v0.17.190a51dfac9
commands: Fix data racec371171ab
deps: Update github.com/alecthomas/chroma/v2 v2.7.0d6197a41f
Re-add --printUnusedTemplates and --printPathWarningse4e0313c8
tpl/urls: Fix build broken by a merge5b3e165ba
tpl/urls: Add JoinPath template function03cb38e6c
Allow legacy taxonomyTerm in disableKindsad4bc969d
Fix warn message about custom params on the language top level4003c7903
Fix some spelling mistakes610cedaa6
all: Fix comments for exported functions and packages24e7d0c17
deps: Update github.com/bep/golibsass v1.1.0 => v1.1.1008170c8a
Make GOMAXPROCS to be CPU limit aware7c647bcae
Allow empty params.mainSections95818e27d
modules: Fix format flag in error3f00f4753
commands: Load config before creating the filesystem834b3d7e4
Fix some recently introduced error handling issues1155bbca9
tpl/lang: document delimiter option for FormatNumberCustom86b2a2743
Re-add site.LanguagePrefix35955f50e
github: Trim the test flow a little8a69ccbb0
commands: Improve the common build flag handling7ce033a89
Support, but warn, about top level language custom params05542130b
Handle transient errors in config loading etc.5251f015b
Re-establish all the server flags5d857165f
Deprecate site.Language.Params and some other fixes0106cf1a6
Revert "Make GOMAXPROCS CPU limit aware"59050f97f
Make GOMAXPROCS CPU limit awarefaa6998f2
Add Sections to Site interface3d90871e9
helpers: simplify path tests with T.TempDirbda082c98
tpl: Add math.Abs241b21b0f
Create a struct with all of Hugo's config options6aededf6b
Improve date parsing performance for the common case0988b76a7
Add a counter helpere0e19a934
Expand the baseline benchmark a littlebcd7ac770
Revert "Update syntax-highlighting.md (#10929)" (#10930)a4fb8dc6b
Update syntax-highlighting.md (#10929)4f341fa1a
Update README.md5c7b79cf7
tpl/strings: Clarify findRESubmatch description0cb6ca590
langs/i18n: Fallback to defaultContentLanguage instead of Englishf1062519a
tpl/debug: Add VisualizeSpaces46a3cf618
Update README.md9906c1ae5
Prevent the global error collector to panic when sending on closed channel5596dc24a
markup/goldmark: Add config options for the typographer extensiond01731d53
readme: Fix build commandf1e8f010f
Update README.md5748133d5
Add test for ToC vs include05c095a0e
resources.functions: improve validation891b2918d
resources: Fix typos in error message and variablesb0b1b76dc
markup/goldmark: Fail on invalid Markdown attributes0fbab7cbc
commands: Fix data race in testf5eddf89b
tpl/math: Return error if less than 2 input numbers0e8ab20a8
releaser: Prepare repository for 0.112.0-DEV5d4eb5154
releaser: Bump versions for release of 0.111.31c841ec91
deps: Update go-org to v1.6.6e7148f335
Fix "unknown shortcode token" when calling shortcode within fenced code blockd55af2abf
Run gofmt -s on source filesb6f44aaf1
docs: Improve examples of variadic math functions84201e8d5
tpl/math: Allow multi numbers in add, sub, mul, div, min and max04b981164
readme: Update dependency list9818724b5
Improve error message for unclosed shortcode with inner content34a86e13f
Don't fail when calling Paginate with an empty pages.PagesGroup0f01bd463
server: Replace golang.org/x/net/context with contextd171d1543
tpl: Add hasSuffix alias02ab77da3
watcher: use time.NewTicker to prevent leaks873be9f90
ensure we default to 10 correctlybebb2b8d0
switch transfers to workerse6f029bde
customize parallel transfer countbdbfacb86
metadecoders: Add support for native org dates in frontmatter PR #7433 added support for Org timestamps for the DATE header. This PR widens the support with additional front matter headers LASTMOD, PUBLISHDATE and EXPIRYDATE.32ea40aa8
releaser: Prepare repository for 0.112.0-DEV4164f8fef
releaser: Bump versions for release of 0.111.2b83050cb4
Fix .Fragments when called cross sites on uninitialized output formatdf5608f8a
Allow page.TableOfContents on self in shortcodef56ce01ae
tpl/partial: Consolidate GoDoc3bbeb5688
Fix "context canceled" with partial184a67ac4
cache: Fix --gc failure on Windows6c798eba6
Page context handling in i18nec1c97e7e
Work around --gc failure on Windows <= 10f10009e7f
Update to Go 1.20.1a950950f1
snap: Fix dart-sass-embedded installation36ce3a4a9
Correct typos in Go comments17e60b77e
releaser: Prepare repository for 0.112.0-DEV39a4a3cf6
releaser: Bump versions for release of 0.111.152f339dad
Merge branch 'release-0.111.0'eef23a7f2
Fix "page" not defined18cf75805
releaser: Prepare repository for 0.112.0-DEV3fa8bb831
releaser: Bump versions for release of 0.111.0db9f74d24
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)"60e6fa798
build: Bump build images7e51ba03c
build: Update Linux ARM build image66f94b494
tpl/tplimpl: Remove the Google News internal templatec0d15a289
strings: fix Truncate behavior for formatted html2a61910e8
tpl/strings: Adjust benchmark079d1b654
tpl/strings: Add BenchmarkTruncatea56b9071d
cods: Regen docs helper5c317c55e
Move the Related doc counter to prevent a racea669467d9
Misc ioutil deprecation adjustmentsd453c1274
Replace deprecated ioutil with io and os336622d5e
Squashed 'docs/' changes from 36dd5483f..6e32d059197b010f52
Merge commit '336622d5e7afd9334cd2de7150d4f16bdf7c24f9'4d36b99a4
build(deps): bump github.com/tdewolff/parse/v2 from 2.6.4 to 2.6.5807237bc0
build(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.1779b03b3f7
build(deps): bump golang.org/x/imagee31441031
Remove unused temp directory39cc3a2a7
exif: Return the proper exposure time value in some special casesce524d0b5
Add a page template func2662faf61
dartsass: Import CSS without extension at compile time271318ad7
Split parse and render for Goldmarke442a63bb
related: Add config option cardinalityThresholdd5601e839
docs: Another fix related docs examplecedd04db3
docs: Fix related docs example4bf91b975
build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0ae48507d6
Fix shortcode error when closing without .Inner7d78a498e
Throw an error when shortcode is expected to be closed0dbeac80c
Add some shortcode testcasesb99d073ca
sass: Remove some unused leftover codee965cb679
resources/sass: Remove debug statementscf591b7c0
Squashed 'docs/' changes from 1214f6ffb..36dd5483f7e539cb39
Merge commit 'cf591b7c0c598d34896709db6d28598da37e3ff6'586fea0de
page: Move the cache double check right after the lockfa2d7adf1
page: Add some concurrency to the building of the related page index4346987fa
related: Adjust benchmark2dad13c0e
create: Fix typo in error messageecf3cd514
tocss: Simplify the hugo:vars type handlinga1a9c08b5
resource_transformers/tocss: Fixed hugo:vars casting6abd15e78
Adjust tests for GO 1.20094135ff9
tpl/internal: Sync Go template src to Go 1.204801e2e8e
build: Update to Go 1.2090da7664b
Add page fragments support to Related0afec0a9f
related: Adjust benchmark28540ed13
related: Add benchmark9af78d110
tpl/collections: Improve error message in Indexd33a7ebcc
Make the HTML collector parsing more robust2a364cca6
Revert "build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0"3fb2417cb
deps: Upgrade github.com/yuin/goldmark v1.5.3 => v1.5.4fce089048
tpl/strings: Add strings.ContainsNonSpace87c78bd3e
build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.069c369e11
deps: Upgrade github.com/alecthomas/chroma v2.4.0 => v2.5.073ece30d8
markup: Fix linenos codeblock hl option case regressionf9fc0e045
Fix slow HTML elements collector for the pre case4f4a1c00b
publisher: Add benchmark76c6140c5
snap: Install dart-sass-embedded for 32-bit ARM (armhf) tood4482e8bf
snap: Add read access for ~/.gitconfig.local and ~/.config/git/* too1477d0ba9
commands: Fix server url rewrites (http status 200)dd37163f5
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.10 to 2.2.11c3a59a7d5
build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)4ccc8cfb4
Fix description of collections.Uniqe2cfc3d5a
Update CONTRIBUTING.md168858331
Fix shortcode detection in RenderString4ef9baf5b
Only invoke a given cached partial once93ed6e447
Update README.md0d1161b26
releaser: Prepare repository for 0.111.0-DEVe32a493b7
releaser: Bump versions for release of 0.110.019e960562
dos: Regen CLI docs80e8bd3b7
docs: Regen docshelperb661132e0
Merge commit 'ef6f101e75256c3bb88a6f1f3b5c1273bf8d7382'ef6f101e7
Squashed 'docs/' changes from 2c0125b52..1214f6ffbd59541903
related: Handly []any671f64b2e
Fix permalinks issue with repeated sections2fb40ece5
tpl/strings: Add findRESubmatchc6b388769
config/security: Add O\w+ (e.g. GOROOT) to the default allowed list21af5b359
Preserve front matter slice value types (e.g. int)f38a2fbd2
Make hugo.toml the new config.toml6a579ebac
Add fill HTTP Response info into .Data in resources.GetRemotef13531e60
Fix HEAD method in resources.GetRemoteb5d485060
Fix order when reading custom headers in resources.GetRemote6e9fa9e0f
deps: Upgrade github.com/evanw/esbuild v0.15.18 => v0.17.0c4f3a46ce
Update README.mdfbc3e08c6
resource: Fix Go Doc vs .Data.Integritye402d91ee
Misc doc, code refactoring to improve documentation3c51625c7
Make readFile return nil when file not found (note)dd6d0a6de
Remove reference to Goreleaser in code commentf95fd57aa
tpl/compare: Sort special float values as stringe754d5cb3
tpl/diagrams: Move Goat to its own file002cd5280
Update CONTRIBUTING.mda76c405d4
Update CONTRIBUTING.mdc0a03a2a3
Update README.mde127d3e5c
releaser: Prepare repository for 0.110.0-DEV47b12b83e
releaser: Bump versions for release of 0.109.0180dfeba0
Adjust "you need the extended version" error message10bb29d7f
docs: Regen docs helper JSONeb0c8f9d0
resource/page: Slight adjustment of Page.Ancestors3a216186b
resource/page: Add Page.Ancestors7874b9681
build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.071832328f
Annotate test assertions37ab1cf12
hugolib: Exclude non-linkable pages from translations map59af05cab
Add HUGO_PUBLISHDIR to the Node environment4989da653
Revert "tpl/tplimpl: Use https in sitemap templates"cd1ed563a
tpl: Improve template funcs GoDocaa2c72419
tpl/resources: Fix data race in ToCSSeffa6a422
tocss: Add some more test cases5d5f0a237
tocss: Fix unquote case with double quotesd20d2651e
Allow "fast render mode" even if --disableLiveReload is set41a080b26
tocss: Add vars option41bc6f702
Squashed 'docs/' changes from 2201ac0e5..2c0125b529a215d695
Merge commit '41bc6f702aa54200530efbf4267e5c823df3028d'eda1e720c
modules: Improve "module workspace" not found error330fa8941
modules: Adjust watch logic vs workspace use definitions6db527483
Add any configured Go Workspace file to the config watcher0d4b17d4c
modules: Make the module.workspace=off as default (note)3afaca758
release: Add a note section in release notes2d217cba5
helpers: Allow at signs in UnicodeSanitize (note)17055d1fa
parser/metadecoders: Remove superflous cast in test2a81a4949
parser/metadecoders: Simplify nil check in Unmarshale30d711c2
parser/metadecoders: Add empty /data JSON file as empty mapad2059878
Also consider wrapped errors when checking for file IsNotExist errors87e898a17
tpl/openapi3: Wrap *kopenapi3.Tb54de1bd9
resources/js: Fix some import discrepancies between Hugo and ESBuildc9354d546
github: Update to Dart Sass 1.56.2d89426985
github: Use ruby/setup-ruby3fd0b7849
tpl/tplimpl: Use https in sitemap templatese0e63f35e
parser/metadecoders: Fix spellingcc574ef12
releaser: Prepare repository for 0.109.0-DEVa0d64a46e
releaser: Bump versions for release of 0.108.0f97544a83
Make the hugo env non verbose output slightly more verbosed8efe085c
Add dart-sass-embedded version info to hugo env -vf5b5b71c6
deps: Upgrade github.com/bep/godartsass v0.15.0 => v0.16.0b82b547ac
tpl/embedded: Make Open Graph's series optionalda670c38e
Squashed 'docs/' changes from 4c1309cdf..2201ac0e5c9f2fa266
Merge commit 'da670c38ee63a7fef25e2b9f42519232055b60dc'5067775a6
common/hugio: Fix multiWriteCloser.Close50549c867
build(deps): bump github.com/getkin/kin-openapi from 0.109.0 to 0.110.0de9c5542c
docs: Add basic doc for wrapStandAloneImageWithinParagraph etc.e93138dfd
dartsass: Add sourceMapIncludeSources option7d16c3c0c
github: Update Dart Sass Embedded to 1.56.163126c635
markup/goldmark: Add removeSurroundingParagraph for Markdown images535ea8cc9
build(deps): bump github.com/evanw/esbuild from 0.15.16 to 0.15.188bbec426c
build(deps): bump golang.org/x/text from 0.4.0 to 0.5.00bfa293dc
build(deps): bump github.com/evanw/esbuild from 0.15.15 to 0.15.160b976d2b4
tpl/tplimpl: Allow alternate comment syntaxa49e51fd0
resources: Increase timeout for http.Clientd373774cb
tpl/collections: Fix some index cases where the indices given is a slice and be more lenient with nil inputs7d5e3ab8a
tpl: Misco GoDoc improvementsdc44bca96
config/security: Add CI env var to whitelistda1652789
Squashed 'docs/' changes from 32cb8785e..4c1309cdfef518485c
Merge commit 'da16527896d3087585c5e758083ea498dcabc2c3'83080df61
deps: Upgrade github.com/bep/godartsass v0.14.0 => v0.15.0b8d5c378b
tpl: Use consistent delimiter spacing in examples75f782a5a
docs: Regen docs helper2221b5b30
releaser: Bump versions for release of 0.107.06a004b8d9
build(deps): bump github.com/getkin/kin-openapi from 0.108.0 to 0.109.0092362242
build(deps): bump github.com/evanw/esbuild from 0.15.14 to 0.15.157855b47f0
Add a cache for lexers.Get34d1150d9
markup/goldmark: Improve benchmark85e2ac1a4
commands: Create assets directory with new site74776726d
build(deps): bump github.com/frankban/quicktest from 1.14.3 to 1.14.463f7f0ff5
build(deps): bump golang.org/x/tools from 0.2.0 to 0.3.0bcb62d891
deps: Upgrade github.com/alecthomas/chroma/v2 v2.4.000fe7e040
hugo/parser: Fix shortcode boolean param parsingdf85cb9ae
releaser: Prepare repository for 0.107.0-DEVe08ce30fe
releaser: Bump versions for release of 0.106.0a99fed485
resources/tpl: Add a test for resources.Getdb945a6ed
tlp/resources: resources.Get returns nil when given empty stringbafb389b3
build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.4 to 2.0.60a019a1a5
docs: Regen CLI docs9f7fb0a73
docs: Regenerate docs helperf04cc581e
Merge commit '00c4484c7092181729f6f470805bc7d72e8ad17b'00c4484c7
Squashed 'docs/' changes from 392668f4f..32cb8785ecdd83bf3c
build(deps): bump github.com/evanw/esbuild from 0.15.13 to 0.15.14e00220a06
deps: Update the libweb version stringa662ddae1
deps: Upgrade github.com/bep/gowebp v0.1.0 => v0.2.013adf3e02
readme: Update ToCfe08d35f2
build(deps): bump github.com/yuin/goldmark from 1.5.2 to 1.5.34b675ddd4
build(deps): bump github.com/spf13/afero from 1.9.2 to 1.9.324eaa290c
build(deps): bump github.com/getkin/kin-openapi from 0.107.0 to 0.108.0f6ab9553f
tpl/internal: Sync go_templates58a98c775
build(deps): bump github.com/clbanning/mxj/v2 from 2.5.6 to 2.5.7900904fd1
build(deps): bump golang.org/x/net from 0.1.0 to 0.2.024eca0cbe
build(deps): bump github.com/evanw/esbuild from 0.15.12 to 0.15.1360e0e2c1d
Add Go 1.16+ install method to README52ea07d2e
Fix taxonomy weight sort regression77fc74a5b
releaser: Prepare repository for 0.106.0-DEV0e3b42b4a
releaser: Bump versions for release of 0.105.0f50585442
build(deps): bump golang.org/x/tools from 0.1.12 to 0.2.02aedccc9a
build(deps): bump github.com/getkin/kin-openapi from 0.106.0 to 0.107.0c10931404
build(deps): bump golang.org/x/text from 0.3.7 to 0.4.04732c47d1
build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.162780ec8d
build(deps): bump github.com/getkin/kin-openapi from 0.103.0 to 0.106.0351d6b062
build(deps): bump github.com/tdewolff/minify/v2 from 2.12.1 to 2.12.4631d768be
Revise the fix for shortcode vs output format nilpointere5d2a8f6a
Avoid nilpointer when shortcode page content output nil00ff161b6
livereload: Use text/javascript here, too588710a7a
media: Rename application/javascript, application/typescript to text/javascript etc.ed930db2f
build(deps): bump github.com/yuin/goldmark from 1.4.15 to 1.5.205df96481
build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.020ef6dcf9
Skip flakey server tests on GitHub Action on Windows9860e0e18
build(deps): bump github.com/magefile/mage from 1.13.0 to 1.14.0d1cd1db0e
github: Avoid duplicate test runs09e10110a
tpl/encoding: Add noHTMLEscape option to jsonify2ef60dbd2
build(deps): bump github.com/evanw/esbuild from 0.15.9 to 0.15.126275aad9e
Update Go and Alpine version in Dockerfile01ebb6e30
Don't use self-closing generator taga066e9885
build: Update to Go 1.19.21fd3320dc
github: Use SHA versions0fb2b3d14
Resolve dependency-path not found error in workflowdb05232d5
Use setup-go action to cache dependencies2734f956c
releaser: Prepare repository for 0.105.0-DEV58b824581
releaser: Bump versions for release of 0.104.3ec57cf2c3
resources: Update golden image dithering exception list3a9cb7b0f
resources/images: Fix 2 animated GIF resize issues0addb302a
server: Fix flaky TestServerPathEncodingIssues testsb002d4795
commands: Remove extraneous newline from result of convert toTOMLe3f31352d
config/security: Fix filenameec02c537e
releaser: Prepare repository for 0.105.0-DEV84cbe7249
releaser: Bump versions for release of 0.104.24611b6920
Fix htimes /: operation not permitted error on config changes2171e3c9a
Revert "Adjust a test"cac773aef
Adjust a test51010a69b
releaser: Prepare repository for 0.105.0-DEV8958b8741
releaser: Bump versions for release of 0.104.129ccb3606
Fix /static performance regression from Hugo 0.103.0d8aba18e0
releaser: Prepare repository for 0.105.0-DEVc744dbd6e
releaser: Bump versions for release of 0.104.05c4165336
Consolidate the glob case logic281554ee9
hugofs: Fix glob case-sensitivity bugf3560aa0e
server: Fix 404 redirects on Windowsedf9038a9
build(deps): bump github.com/evanw/esbuild from 0.15.8 to 0.15.978f49b4c0
build(deps): bump github.com/yuin/goldmark from 1.4.14 to 1.4.15fa4b77e7e
build(deps): bump github.com/getkin/kin-openapi from 0.100.0 to 0.103.08377c3cea
docs: Regen docs helper4d909d476
build(deps): bump github.com/alecthomas/chroma/v2 from 2.2.0 to 2.3.04eb6d9740
build(deps): bump github.com/evanw/esbuild from 0.15.7 to 0.15.84f9cb4f34
docs: Regenerate CLI docs0171fb201
Run go mod tidya4028112e
resources/images: Add $image.Colors08f0984f9
commands: Skip flaky test on CI86653fa38
config/security: Allow proxy variables in subcommandsc46d10498
releaser: Prepare repository for 0.104.0-DEVb665f1e8f
releaser: Bump versions for release of 0.103.16be6752c8
server: Fix redirects when file path contains bytes > 0x808e9dce109
Merge branch 'release-0.103.0'00b71668b
releaser: Prepare repository for 0.104.0-DEVbeebf2afb
releaser: Bump versions for release of 0.103.03f0b40f67
Use standard GOOS/GOARCH values in release archives0bd79d30c
Use standard GOOS/GOARCH values in release archives8e77bcc93
Filter out any duplicate files to post process74daca6b3
Support PostProcess for all file types1fd4c562a
build(deps): bump github.com/gobuffalo/flect from 0.2.5 to 0.3.0a5cda5ca4
server: Add 404 support5e2b28d6e
build(deps): bump github.com/getkin/kin-openapi from 0.98.0 to 0.100.0f2019f0a2
build(deps): bump github.com/evanw/esbuild from 0.15.5 to 0.15.7475638fe0
build(deps): bump github.com/yuin/goldmark from 1.4.13 to 1.4.14203cc5457
Feat/sponsors in readme (#10273)90ad80450
Squashed 'docs/' changes from e5aa641a6..392668f4faf23cdca9
Merge commit '90ad8045056167004d27857a95542936657b8a16'ab5ce5989
Fix usage description7d40da876
Add `--force` to `hugo new`02c89a446
scss: Handle single-file sourcemaps correctly06c3ac674
release: Bump Hugoreleaser version5e03de0dd
Update stale.ymlbef31b58a
releaser: Prepare repository for 0.103.0-DEVb76146b12
releaser: Bump versions for release of 0.102.38e5044d7f
Fix shortcode parser regression with quoted param values5046a6c7c
deps: Update github.com/tdewolff/minify/v2 v2.12.0 => v2.12.1160a067c8
snap: Use "snapcraftctl set-grade"e0ba1a805
snap: Use "snapcraftctl set-version"7b49c56a6
snap: Make external dependencies actually workdffca5788
release: Add the releaser commits to the ignore list79932e722
release: Fix the Deb archives9eb9b70a2
releaser: Prepare repository for 0.103.0-DEV0ff4a9326
releaser: Bump versions for release of 0.102.045e1084ff
Add linux/arm64 extended to release setupc98348416
license: Add copyright info2de393c79
build(deps): bump go.uber.org/atomic from 1.9.0 to 1.10.07efb35680
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.9 to 2.2.10ddbcc6712
build(deps): bump github.com/getkin/kin-openapi from 0.97.0 to 0.98.0fd75f129b
deps: Update github.com/pelletier/go-toml/v2 v2.0.2 => v2.0.414878ca0a
build(deps): bump github.com/spf13/afero from 1.8.2 to 1.9.2e88873b80
build(deps): bump github.com/tdewolff/parse/v2 from 2.6.1 to 2.6.24219993b0
build(deps): bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16988e1417a
build(deps): bump github.com/rogpeppe/go-internal from 1.8.1 to 1.9.042529882c
build(deps): bump github.com/yuin/goldmark from 1.4.12 to 1.4.1345f1b1cfc
build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0369bdf22f
build(deps): bump github.com/tdewolff/minify/v2 from 2.11.10 to 2.12.0d1b03a093
build(deps): bump github.com/evanw/esbuild from 0.14.43 to 0.15.5941c28ab0
readme: Add Golang URL to Go linksffbdcc75a
Update README.md95d976451
Update README.mdb66f9f266
Update README.mdf7e00c039
github: Use GitHub's Choco-Install function to retry installsf5ba6fd45
common/hugio: One more fix for non-OS fsc4bbc1eee
common/hugio: Fix CopyDir when fs is not OS0e0fb1b64
snap: Delete obsolete custom x-nodejs pluginsb017f7cb0
livereload: Inject script without head or body tag7fb28085a
releaser: Fat MacOS binaries0cd1929b9
Update to Go 1.19cbdaff213
markup/goldmark/codeblock: Fix attributes when no language identifier in CodeBlock3fefea06b
commands: Fix embed in livereload.go5c48ba934
Update README.md21562e3aa
Externalise and embed livereload.js string9c24b86e4
Cache when not found in LookupLayout223bf2800
parser/pageparser: Don't store the byte slices72b0ccdb0
Make the baseline benchmark's test files stablebdf935d66
Squashed 'docs/' changes from 30f32a624..e5aa641a665e52a7f5
Merge commit 'bdf935d66c1f02dfc942a30e9fc00519bba3aacb'8ebcaa539
Accept vendor-specified build date if .git/ is unavailable241481931
snap: Replace mage with "go build" and set VendorInfo=snap5caed8a71
snap: Use interface names etc-gitconfig and gitconfig, Take 2d1278f696
Extract the baseline benchmark to a test92f31ae63
Add a baseline benchmarkfd3953c18
snap: Use interface names etc-gitconfig and gitconfig15463f835
releaser: Prepare repository for 0.102.0-DEV466fa43c1
releaser: Bump versions for release of 0.101.06072ce0bc
releaser: Add release notes for 0.101.0 [ci skip]2c5943ddc
build: Update to Go 1.18.30cb459a20
docs: Regen docshelper475f87f68
Squashed 'docs/' changes from 96fdc246c..30f32a624604cfffc5
Merge commit '475f87f685439de0f907a9ffc29bfd1361eb1c59'd863dde6c
markup/highlight: Add hl_inline option580b214a4
deps: Update github.com/alecthomas/chroma/v2 v2.1.0 => v2.2.0ddb954708
build(deps): bump github.com/clbanning/mxj/v2 from 2.5.5 to 2.5.6288b0fb15
build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.1 to 2.0.23e1344632
build(deps): bump golang.org/x/tools from 0.1.10 to 0.1.117a9ce0eca
build(deps): bump github.com/tdewolff/minify/v2 from 2.11.5 to 2.11.10f2ba0cc8c
build(deps): bump github.com/evanw/esbuild from 0.14.42 to 0.14.4362ceaabdc
build(deps): bump github.com/getkin/kin-openapi from 0.94.0 to 0.97.035fa19283
deps: Udpate to github.com/alecthomas/chroma/v209ac73338
common: Add hugo.GoVersion66da1b7b2
resources: Panic on Copy of Resource with .Err5a9ecb82a
resources/page: Add :slugorfilename attributecbc35c48d
Respect NO_COLOR44f3c0796
readme: Update dependency lista5a4422aa
Fix relURL with leading slash when baseURL includes a subdirectory617e09448
js: Resolve index.esm.jscf12fa616
Add animated GIF support2e1c81770
resources: Add a Gif source file to golden tests4276075c7
releaser: Prepare repository for 0.101.0-DEVd25cb2943
releaser: Bump versions for release of 0.100.28b9bdc403
releaser: Add release notes for 0.100.2 [ci skip]4e94d1db7
Update CONTRIBUTING.md0566bbf7c
Fix raw TOML dates in where/eq534e7155b
deps: Update to github.com/pelletier/go-toml/v2 v2.0.1953f215f3
tpl/path: Add path.BaseName function8e2fd5592
livereload: Use `X-Forwarded-Host` for Codespace311b8008b
helpers: Fix panic with invalid defaultMarkdownHandlerc7d5f9f06
resources: Register MediaTypes before buildbfebd8c02
releaser: Prepare repository for 0.101.0-DEV0afb4866e
releaser: Bump versions for release of 0.100.1b1ec0c226
releaser: Add release notes for 0.100.1 [ci skip]212d9e301
Fix panic with markdownify/RenderString with shortcode on Page with no content file4daac654d
releaser: Prepare repository for 0.101.0-DEV27b077544
releaser: Bump versions for release of 0.100.00f8343a2c
releaser: Add release notes for 0.100.0 [ci skip]3fcbee261
docs: Regen CLI docsdb9d27427
docs: Regen docs helper95baafeac
Merge commit 'e4bfe59c4e043c92d3992587d8c64d264b262a22'e4bfe59c4
Squashed 'docs/' changes from 2d9da3a56..96fdc246c6f7bf3f2d
Fix indentation in highlight shortcode9e904d756
Make .RenderString render shortcodesd2cfaede5
Improve shortcode indentation handling322d19a81
Add Markdown as an output format7cb484e12
build(deps): bump github.com/evanw/esbuild from 0.14.39 to 0.14.420b395f0b4
Run go mod tidyc1a83076b
Add a shortcode benchmark0f8dc4703
Remove Blackfriday markdown engine3b478f50b
Fix HasMenuCurrent and IsDescendant/IsAncestor when comparing to itselff343b8eb7
build(deps): bump github.com/sanity-io/litter from 1.5.4 to 1.5.560ede146b
deps: Update to github.com/tdewolff/minify/v2 v2.11.5dd9eaf19f
Don't use the baseURL /path as part of the resource cache key46a2ea6d0
postcss: Make the resource cache key more stable653ab2cc1
commands: Fix case where languages cannot be configured52edea0fe
github: Set HUGO_BUILD_TAGS: extended when running tests6a5acd753
metrics: Fix divide by zero error805b21555
Fix error message when PostCSS config file is not found8ca705252
server: Skip watching dirs in ignoreFilesbb232a351
resources: Improve error message on .Resize etc. on SVGs3854a6fa6
Fix Plainify edge casescd0112a05
Add resources.Copy6f7fbe03b
basefs: add `noBuildLock` flag2fc2e9c87
import: Fix importing jekyll sitee164834f0
releaser: Prepare repository for 0.100.0-DEVd52406738
releaser: Bump versions for release of 0.99.131ce89f7f
releaser: Add release notes for 0.99.1 [ci skip]ee55fde5e
releaser: Fix version replacement2f9eac480
server: Fix multihost crash3a8189ee9
Update stale.yml7bc3401eb
common/hugo: Fix version logic1de333e7a
releaser: Bump versions for release of 0.99.035cb6eefb
releaser: Add release notes for 0.99.0 [ci skip]657d1a2d9
server: Refresh the error template87a22eb6d
server: Fix SIGINT handling after loading bad configurationfc9f315d8
Improve SASS errors4b189d8fd
postcss: Fix import error handlingc2fa0a332
build(deps): bump github.com/fsnotify/fsnotify from 1.5.3 to 1.5.448ea24f89
common/herrors: Remove unused struct9f563856c
build(deps): bump github.com/evanw/esbuild from 0.14.38 to 0.14.395c96bda70
errors: Misc improvements4a96df96d
server: Always rebuild the files involved in an errore8537e6dd
postcss: Fix line numbers in error messages2fbdee726
Update CONTRIBUTING.md91fe1b6c6
js: Bump test dependency7de629121
deps: Update github.com/spf13/cast v1.4.1 => v1.5.09d7f16624
hugolib: Check for nil in shouldRender51f08b0b6
Revise the use of htime.Since/htime.Now860c51c31
tpl/collections: Make sort stable855e5869c
docs: Regen CLI docs327aaed6d
Squashed 'docs/' changes from 7030fe3a2..2d9da3a561c7759028
Merge commit '327aaed6d8ca57d8e5e3acb99ff53402ff1c556d'35c88a7f9
Use configured timeZone for the clocke77ca3c10
Add `clock` cli flagf2946da9e
Improve error messages, esp. when the server is running6eea32bd6
tpl: Improve godoca6d545854
github: Add permissions to test actione5f217316
tpl/crypto: Add example for FNV32a89c1655ec
releaser: Prepare repository for 0.99.0-DEV165d299cd
releaser: Bump versions for release of 0.98.0e94dc6710
releaser: Add release notes for 0.98.0 [ci skip]a4fff5753
docs: Regen docs helper3902f9a47
Squashed 'docs/' changes from 4c5edacfe..7030fe3a24852a3765
Merge commit '3902f9a4767fe6e62ac5146728d8311b8cd227e0'fa80fe3c8
Some godoc adjustments and image struct renames11047534e
tpl/crypto: Add FNV32ad7b54a4c3
markup/goldmark: Fix attribute nilpointer13ceef759
deps: Update to gocloud.dev v0.24.0942d0dd2c
build(deps): bump github.com/mitchellh/mapstructure from 1.4.3 to 1.5.0a022ca271
deps: Update github.com/yuin/goldmark v1.4.11 => v1.4.12d56b33955
build(deps): bump github.com/evanw/esbuild from 0.14.36 to 0.14.3855e28c239
deps: Update github.com/tdewolff/minify/v2 v2.11.1 => v2.11.29a888c243
Some godoc adjustments05b45c35c
tpl/lang: Handle nil values in lang.Merge625be77e0
resources/page: Mark some more interface methods as internal097fd588c
Deprecate page.Author and page.Authors41cc4e4ba
releaser: Prepare repository for 0.98.0-DEV078053a43
releaser: Bump versions for release of 0.97.37d9f88808
releaser: Add release notes for 0.97.3 [ci skip]9b352f04a
Fix syncing of /static regressione66e2e9ce
Revert "Revert "Fix PostProcess regression for hugo server""5de6f8a02
releaser: Prepare repository for 0.98.0-DEV5099abe60
releaser: Bump versions for release of 0.97.299ec88d42
releaser: Add release notes for 0.97.2 [ci skip]6c35a1a9e
Revert "Fix PostProcess regression for hugo server"363bc907c
releaser: Prepare repository for 0.98.0-DEV04efcb2a6
releaser: Bump versions for release of 0.97.1456072552
releaser: Add release notes for 0.97.1 [ci skip]4deb5c606
Fix PostProcess regression for hugo server397fce560
Fix MediaType when reading images from cache0093eaa68
deps: Upgrade github.com/bep/overlayfs v0.4.0 => v0.5.0d0f731c03
releaser: Prepare repository for 0.98.0-DEVc07f3626e
releaser: Bump versions for release of 0.97.042b5d1653
releaser: Add release notes for 0.97.0 [ci skip]d80d5a104
releaser: Reduce parallelism842262f65
Revert "build(deps): bump gocloud.dev from 0.20.0 to 0.25.0"2dbdf38a5
resources: Add `key` to reources.GetRemote options mapf8c4e1690
build(deps): bump github.com/evanw/esbuild from 0.14.34 to 0.14.36627eed1d6
Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language aware82ba634ed
Fix gosum checksum errorsd417a6cf7
build(deps): bump github.com/tdewolff/minify/v2 from 2.11.0 to 2.11.113dac7f3c
compare: Add a string sort benchmark30c2e54c2
Replace all usage of CopyOnWriteFs with OverlayFs3117e5859
deps: Update github.com/tdewolff/minify/v2 v2.10.0 => v2.11.0ec920363c
Squashed 'docs/' changes from 63386081c..4c5edacfe5b5dcb8d5
Merge commit 'ec920363cdeb687c8bcac9c242767d366fb058cb'ffe3eb919
docs: Regen CLI docsd070bdf10
Rework the Destination filesystem to make --renderStaticToDisk workb08193971
Revert "Revert "Some minor adjustments to the new static filesystem logic""0a56f2af4
Revert "Revert "Allow rendering static files to disk and dynamic to memory in server mode""9e360d384
build(deps): bump github.com/evanw/esbuild from 0.14.31 to 0.14.34a8c221d33
modules/client: Vendor config directory if presente58a54089
resources: Create a common ResourceFinder interface20162518c
build(deps): bump gocloud.dev from 0.20.0 to 0.25.06b469cc8f
build(deps): bump golang.org/x/tools from 0.1.9 to 0.1.10080dcac6b
build(deps): bump github.com/magefile/mage from 1.12.1 to 1.13.0072fc8cc3
build(deps): bump github.com/gobuffalo/flect from 0.2.4 to 0.2.5658e11eba
Localize all the GroupBy*Date methodse0a882fd3
build(deps): bump github.com/getkin/kin-openapi from 0.93.0 to 0.94.0d0657a436
deploy: Set an MD5 attribute and use that if eTag not availablea6e2e38bb
build(deps): bump github.com/sanity-io/litter from 1.5.2 to 1.5.4510e17900
build(deps): bump github.com/evanw/esbuild from 0.14.25 to 0.14.3121484f9e1
build(deps): bump github.com/frankban/quicktest from 1.14.2 to 1.14.3da00e7714
Add environment as a new filter to _cascade.targeted9aa374d
Merge branch 'release-0.96.0'2a231b0b5
Snap: Add {system,user}-gitconfig plugs to read gitconfig (#9619)69c590080
releaser: Prepare repository for 0.97.0-DEV2fd4a7d3d
releaser: Bump versions for release of 0.96.05a4ac2dac
releaser: Add release notes for 0.96.0 [ci skip]db1562e13
docs: Regen docshelper5b18e1084
docs: Regen CLI docsd276e901b
Squashed 'docs/' changes from a393f4cf4..63386081cd7497b28c
Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'94459680b
Deprecate .File.Extension9202117ba
resources: Add more details to .Erra6fa290f6
commands: Change link protocol to https0bbc2fb52
build(deps): bump github.com/getkin/kin-openapi from 0.91.0 to 0.93.094e8a9076
tpl/crypto: Add optional encoding arg to hmac functiona461e9d01
Fix typo48c98a8d2
Fix some typosbbd455fe7
Update CONTRIBUTING.md to use "go install" to install mage8309a2b1c
Dockerfile: Make it build with Go 1.182b7231097
snap: Make it build with Go 1.1813ff4ded7
build(deps): bump github.com/yuin/goldmark from 1.4.10 to 1.4.11c3289eb5b
build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.09539069f5
commands: Improve server startup to make tests less flaky0e305d695
all: Use strings.Cut5adb81ce3
Support '-u=patch' in hugo mod get1c0e7c1ae
Make sure file mounts higher up winscad2d8cc7
resources/images: Require width and height for Crop, Fill, and Fitb80853de9
all: gofmt -w -r 'interface{} -> any' .423594e03
dartsass: Enable deprecation, @warn and @debug logging64afb7ca5
Use revision etc. from debug.BuildInfo004bec2e9
releaser: Prepare repository for 0.96.0-DEV9f2e76af6
releaser: Bump versions for release of 0.95.0f1d157682
releaser: Add release notes for 0.95.0 [ci skip]5930173cd
readme: Add note about Go 1.183476b5334
tpl: Pull in Go 1.18 patch that fixes the "no space in {{ continue }} and {{ break }}" buge792d2701
readme: Add a contribution note9d6495d77
github: Make it build with Go 1.1842cc5f88b
tpl: Adjustments and an integration test for Go 1.18a6488e7ba
Remove Go 1.17 support65a78cae1
tpl: Sync go_templates for Go 1.184d6d1d08d
build: Bump to Go 1.18b60e1bbdf
dartsass: Improve error message when no read access61cf3c9f6
Fix and refactor typos31fbc081c
Improve server startup/shutdowncebd886ac
commands: Improve server tests38f778cfc
releaser: Prepare repository for 0.95.0-DEV48fb9e4de
releaser: Bump versions for release of 0.94.20958167b3
releaser: Add release notes for 0.94.2 [ci skip]b37183e48
deps: Update github.com/yuin/goldmark v1.4.9 => v1.4.1004ccde3e9
releaser: Prepare repository for 0.95.0-DEV0fcd9a5d8
releaser: Bump versions for release of 0.94.1414608436
releaser: Add release notes for 0.94.1 [ci skip]3bc742bea
docs: Regenerate CLI docs1a796d723
deps: Fix Goldmark regression with HTML comments64b7b7a89
Revert "Allow rendering static files to disk and dynamic to memory in server mode"5ef8a9f32
Revert "Some minor adjustments to the new static filesystem logic"3bc34666c
releaser: Prepare repository for 0.95.0-DEV63b236603
releaser: Bump versions for release of 0.94.0b107b4b29
releaser: Add release notes for 0.94.0 [ci skip]a4ac188c1
docs: Regenerate docshelperb82d95575
Revert "markup/highlight: Add hl_inline option"4e14cf760
Fail with error when double-rendering text in markdownify/RenderString5697348e1
markup/goldmark: Default to https for linkifyf98e570b1
Add lang attribute to internal alias templatecdb8b0842
docs: Regenerate docshelpera360cab75
markup/highlight: Add hl_inline optionc97fed08f
minifiers: Make keepWhitespace = false default for HTML (note)53a6210d8
markup/goldmark/codeblocks: Fix slice bounds out of range7182809d9
docs: Regenerate CLI docs1f8cd2614
docs: Regenerate docshelper9d76b8fa3
Merge commit 'd706529720b3b2ccb99719ccd578062ca25a0cc2'd70652972
Squashed 'docs/' changes from 3f95a2ace..a393f4cf44576c82ed
Cache reflect.MethodByNameff02d4172
releaser: Remove the GitHub link syntax around release contributors63bb2a5b1
Some minor adjustments to the new static filesystem logic7d8011ed6
Allow rendering static files to disk and dynamic to memory in server modeb9a1be2f9
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.8 to 2.2.9097824503
build(deps): bump github.com/evanw/esbuild from 0.14.23 to 0.14.25ff37df830
build(deps): bump github.com/niklasfasching/go-org from 1.6.0 to 1.6.25857d5524
build(deps): bump github.com/getkin/kin-openapi from 0.90.0 to 0.91.0d86eca5bb
releaser: Prepare repository for 0.94.0-DEV44e3c002a
releaser: Bump versions for release of 0.93.39177849f9
releaser: Add release notes for 0.93.3 [ci skip]0e0d672bc
Remove the decorator from the fs used in ReadDir19f816f77
Update stale.yml970f385c4
build(deps): bump github.com/yuin/goldmark from 1.4.7 to 1.4.876c1248f7
Remove the examples/ folder9e76507da
releaser: Prepare repository for 0.94.0-DEV643b5ae9c
releaser: Bump versions for release of 0.93.22f7feca9a
releaser: Add release notes for 0.93.2 [ci skip]673cde1eb
tpl/os: Revert readDir in theme behavioure46e9ceb2
markup/goldmark: Escape image alt attribute883e71c96
releaser: Prepare repository for 0.94.0-DEVe9669fed1
releaser: Bump versions for release of 0.93.1fefb1caac
releaser: Add release notes for 0.93.1 [ci skip]0327da050
tpl/transform: Fix it when template.HTML is passes as option to Hightlight9b8b6d34e
tpl/partials: Fix partialCached deadlock regression376704d38
tpl/collections: Fix apply when function have Context as first argc1398b91a
Squashed 'docs/' changes from 93f7baf80..3f95a2ace41b5bc963
Merge commit 'c1398b91a9f4c67876b31feb67516b252e654d3c'5a1b394f2
releaser: Prepare repository for 0.94.0-DEV074690824
releaser: Bump versions for release of 0.93.075084bfc7
releaser: Add release notes for 0.93.0 [ci skip]12d00d288
docs: Regenerate docs helper260ff1374
markup/highlight: Ignore HL_lines_parsed in the gen docs14915a0c3
cod: Regen CLI docsfd0c1a5e9
tpl/diagrams: Rename the SVG accessor to Wrapped3ad39001d
markup/highlight: Rework the return value from HighlightCodeblock39261b689
tpl/transform: Add CanHighlightcff14144a
Rename Codeowners() to CodeOwners()5f6715155
tpl/diagrams: Rename Body to Innerf7109771a
CodeblockContext method renamese1f696911
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.29 to 2.10.05f65c17a1
markup/goldmark: Adjust test for Windows579ff9b65
markup/goldmark: Improve attributes vs options928a89696
markup/goldmark: Add Position to CodeblockContext2e54c0093
markup/goldmark: Unify some code block tests10928a4f7
Remove the trailing new line in .Codeafd63bf7d
markup/goldmark: Rename extension struct228126b7f
build(deps): bump github.com/gobuffalo/flect from 0.2.3 to 0.2.40f80be341
markup/goldmark: Use Ordinal to create default lineanchors78afdb88a
build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.03ed83227b
build(deps): bump github.com/sanity-io/litter from 1.5.1 to 1.5.21a257bb2b
Move the Goat template to the correct place97514f17d
build(deps): bump google.golang.org/api from 0.63.0 to 0.70.00df096b86
Update error message about failed menus in config.toml308ad611b
build(deps): bump github.com/getkin/kin-openapi from 0.85.0 to 0.90.06bffcdbd2
Add test for line anchor attributes with code fences7248f4318
build(deps): bump github.com/evanw/esbuild from 0.14.22 to 0.14.2308fdca9d9
Add Markdown diagrams and render hooks for code blocks2c20f5bc0
build(deps): bump github.com/aws/aws-sdk-go from 1.41.14 to 1.43.5723b2c485
build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.706bac57ab
Add support for CODEOWNERSec8b767fa
Remove Viper as a dependency6407b2cd0
helpers: Allow hyphens in UnicodeSanitize6ff39fd90
Change `disqus_config` to `window.disqus_config`96c0bdf3a
deps: Update github.com/spf13/cobra v1.2.1 => v1.3.0e97d3c640
Add page.Store7732da9f9
Allow images to be cropped without being resizedaebde49b8
commands: Fix server panic regression4ada09415
markup/goldmark: Add BenchmarkCodeblocksbddcfd911
deps: Update github.com/gohugoio/localescompressed v0.14.0 => v0.15.0d485f9543
deps: Update github.com/yuin/goldmark v1.4.4 => v1.4.7a87be597a
modules: Add modules.Workspace config for Go 1.18b0eea0075
Update stale.ymlef8b781b1
Update stale.yml3136ff67d
github: Configure stale to be run manually929808190
tpl/partials: Fix recently introduced deadlock in partials cache667f3a4ba
tpl/partials: Add some more partials to BenchmarkIncludeCachedc061b253a
deps: Update github.com/evanw/esbuild v0.14.11 => v0.14.220927cf739
tpl/partials: Make sure a cached partial is invoked only once26a5e89fa
build(deps): bump github.com/rogpeppe/go-internal from 1.8.0 to 1.8.1e9fa7e81b
build(deps): bump github.com/magefile/mage from 1.11.0 to 1.12.1ff545f427
markup/goldmark: Exclude event attributes from markdown render hookb2a827c52
markup/goldmark: Fix mangling of headers/links in render hooks77c7059ff
markup/goldmark: Add a render hook benchmarkf4c90bd6b
Fix BenchmarkCascadeTargetd16228334
metrics: Add cached count trackingea6bcd694
tpl: Remove TODO commentf2e7b49ac
Add --printUnusedTemplates923419d7f
deps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29837fdfdf4
commands: Rename --i18n-warnings to printI18nWarnings6819feab6
commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsageea54a99ca
deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.09563c7d13
Finally remove deprecated Page methods230a49594
Squashed 'docs/' changes from b8b20e9a2..93f7baf80c707b71cd
Merge commit '230a495941b191af0bdaa7e2fc8c61607cb38207'b0a9cf0a7
tpl: Use go:embed to load internal templates9433cc256
releaser: Prepare repository for 0.93.0-DEVcdf6a0d62
releaser: Bump versions for release of 0.92.2bf1fa7137
releaser: Add release notes for 0.92.2 [ci skip]4f4cec73b
Add HUGO_ENV to the os/exec environmentda4866c2b
Simplify some integration testsd1109f590
Fix validation of Page Kind in cascade target mapa7d182cea
Add another cascade benchmarka2a660ed1
commands: Fix server deadlock on config errorf7bc4cc50
Exclude event attributes when rendering markdown54f8d8a70
Remove the "check" command3036d0ac9
Update the application/javascript media type6a238a727
tpl/templates: Fix templates.Exist issue with base templatesf60714b5a
Add a migration test helper215a715dd
babel: Port integration tests to their own packaged128d260b
js: Port integration tests to its own packagec4aaf1d51
postcss: Move integration test to its own package94f10cf4f
minifier: Port integration tests to its packageb06c2103b
templates: Port integration test to its packaged22f7795c
tocss: Port integration tests to their package39f69ca7f
openapi3: Port integration test into correct package64f75adcf
Add a new integration test framework926271909
Validate comparison operator argument count333676293
Remove hugo gen autocomplete5ca40c8f7
deps: Update github.com/pelletier/go-toml/v2 to v2.0.0-beta.6ef7d14a24
Fix erroneous warning with .Page.RenderString on a page without a backing filec05c99f0c
Fix typo in panicOnWarning messageff7689ce0
releaser: Prepare repository for 0.93.0-DEV85e2e8626
releaser: Bump versions for release of 0.92.1515f8a6d8
releaser: Add release notes for 0.92.1 [ci skip]f22c4aba0
Make the RenderString content provider fix more general85d31f7bf
Fix .RenderString issue in .Translations22055176d
general: Fix issue causing log threads to hang indefinitely when print() panics7a080b624
Fix duplicate mount sources265573994
tpl/collections: Fix apply with namespaced template funcs348d300a7
common: Remove unused code6f07bdb15
common/paths: Remove unused code55a9bc1e7
helpers: Remove unused code20a7ce7c1
Do not render hl_style as an HTML attribute8cd449240
build(deps): bump github.com/spf13/viper from 1.8.1 to 1.10.19d8f318aa
Fixing typos (#9387)fcbbbef22
Fix typo in warning message6041adc16
github: Clean up the issue templates a little408da4365
github: Add lock-threads steped04ed574
releaser: Prepare repository for 0.93.0-DEVb35494036
releaser: Bump versions for release of 0.92.0bd89aef8b
releaser: Add release notes for 0.92.0 [ci skip]f2bc13dd9
docs: Regenerate docshelper098254f17
Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb'a8e9fc699
Squashed 'docs/' changes from 4eb10c1a9..b8b20e9a2cdcd15b6c
Only create LazyContentProvider for the non-rendering Site25d645f47
Fix missing page data for alternative formatsfbb3c181c
docs: Add dependency table to maintainance page9af4ca386
deps: Upgrade github.com/evanw/esbuild v0.14.8 => v0.14.117396aa945
Add hugo.Depsd82cef5c5
hugolib: Fix livereload problem with files including NFC characters in MacOs74f0777c5
docs. Regen CLI docse334a4066
commands: Fix CLI help text for hugo new5bd3c8df4
Update to Go 1.17.60aca99fe0
create: Correctly pass newContentEditor flagsc8b5ab75b
Add --panicOnWarning flag85c5b8959
github: Increase stale days965760835
docs: Regenerate CLI docs4a0b55330
docs: Regenerate docshelper1651beb2c
Remove mmark2b6063c3e
Misc depreation updates56ab83a59
Make the deprecated Page/File methods (from Hugo 0.55) ERRORdad0dc8d8
github: Add add stale GitHub actiond3c4fdb8f
Fix surprise OutputFormat.Rel overwritingd632dd7d7
hugolib: Make an RST test optional0671ef559
deps: Upgrade github.com/niklasfasching/go-org v1.5.0 => v1.6.0672481f1f
Update stale.yml1dbfc0f93
releaser: Prepare repository for 0.92.0-DEV1798bd3fd
releaser: Bump versions for release of 0.91.2f0b55a68e
releaser: Add release notes for 0.91.2 [ci skip]623dda717
Revert "config/security: Add HOME to default exec env var whitelist"aee9e11a4
Make sure we always create the /public folderbd63c1aa5
Fix "stuck on build" in error situations in content processing9eb05807c
deps: Run "go mod tidy"654f513a4
deps: Upgrade github.com/evanw/esbuild v0.14.7 => v0.14.8759cdf3fc
releaser: Prepare repository for 0.92.0-DEVf42350574
releaser: Bump versions for release of 0.91.1af165d5b6
releaser: Add release notes for 0.91.1 [ci skip]6779117f7
media: Also consider extension in FromContentce0401109
media: Add missing BMP and GIF to the default MediaTypes listcdc73526a
media: Add PDF MIME type425c7d90f
deps: Update github.com/evanw/esbuild v0.14.5 => v0.14.7fca266ebb
config/security: Add HOME to default exec env var whitelist0016e21cd
modules: Set GOCACHE env var728feaecf
releaser: Prepare repository for 0.92.0-DEVd1dc0e9a5
releaser: Bump versions for release of 0.91.0072bca69d
releaser: Add release notes for 0.91.0 [ci skip]e26e13fbb
releaser: Drop running tests as part of the release6df2f080c
docs: Regen docs helperb84745d49
tpl/resources: Add empty method mapping for GetRemote44954497b
Always use content to resolve content type in resources.GetRemote22ef5da20
Add resources.GetRemote5758c370e
Allow for return partials with falsy arguments (#9298)8ee6de6d9
deps: Upgrade github.com/evanw/esbuild v0.14.2 => v0.14.5a4b9f1a92
don't use path.Join, because it cleans the final pathf4389e48c
Add some basic security policies with sensible defaults803f572e6
Simplify Babel test assertions6183184b9
Merge commit '45e6fdb315d113ba13e20a633ed0c67e3f25170d'45e6fdb31
Squashed 'docs/' changes from 316cec249..4eb10c1a9a037be774
Improve handling of remote image/jpeg resources (#9278)8a005538d
Fix Dockerfile657d0272e
Remove debug statement159120cdd
Fix deprecation notice3f0d49e50
releaser: Prepare repository for 0.91.0-DEV489078897
releaser: Bump versions for release of 0.90.13075eaa3b
releaser: Add release notes for 0.90.1 [ci skip]3bc683041
Remove the retries on error in remote resources.Gete4d6ec94b
Allow user to handle/ignore errors in resources.Get6260455ba
Make resource.Get return nil on 404 not foundc397975af
Update to Go 1.17.5965a6cbff
Update to Go 1.17.4 and remove timeout in resources.Get34a96290f
releaser: Prepare repository for 0.91.0-DEVdd0d3fdbb
releaser: Bump versions for release of 0.90.0b92175233
releaser: Add release notes for 0.90.0 [ci skip]0fa40ce58
releaser: Simplify the release processbf537f1c6
releaser: Remove unused codee86b33113
docs: Regenerate docs helper6c841a691
Merge commit '8d9511a08f14260cbfb73119e4afae50e5a9966d'8d9511a08
Squashed 'docs/' changes from 39a7fac34..316cec249e71d715b9
Add custom font support to images.Texte61cdf335
images: Fix cache busting of image text filter6c3bc5eba
build(deps): bump github.com/getkin/kin-openapi from 0.80.0 to 0.85.0283394a4f
images: Text filter that draws text with the given options (#9239)5538507e9
tpl/transform: Optional options for highlight funcb4f27ef8e
deps: Upgrade github.com/evanw/esbuild v0.13.12 => v0.14.2 (note)3473e31eb
releaser: Add "note" to Note regexpfa0da004a
build(deps): bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.324a893cf8
releaser: Rework and simplify to use GitHub only for release notesbf1564bd2
build(deps): bump google.golang.org/api from 0.51.0 to 0.61.0cd44d409b
media: Add rss suffix for application/rss+xml9a326d563
parser: Add a test case in format resolutionb10381fbe
lazy: Reset error in Reset0eaaa8fee
Implement XML data support58adbeef8
Validate private use language tags93572e531
resources: Add timeout to the HTTP request in Get94f149b21
Add a remote retry for resources.Get66753416b
Make resources.Get use a file cache for remote resources133e4bfbe
Remove empty href element from pagination templatef122771fb
Check for empty deployment targets and matchers08a863e1e
resources: Adjust the remote Get cache so it does not get evicted on restarts8aa7257f6
Add remote support to resources.Get75a823a36
Add deprecation warning to google_news template5e0947c5b
helpers: Make UniqueStringsReuse allocation free0b70b46aa
releaser: Prepare repository for 0.90.0-DEVab01ba6e7
releaser: Add release notes to /docs for release of 0.89.4cc08c0959
releaser: Bump versions for release of 0.89.4f97da9eca
releaser: Add release notes for 0.89.4 [ci skip]2e70f61fb
Fix content dir resolution when main project is a Hugo Module1ed8069a3
releaser: Prepare repository for 0.90.0-DEVc88cdb561
releaser: Add release notes to /docs for release of 0.89.3e1064d219
releaser: Bump versions for release of 0.89.3bf489b96d
releaser: Add release notes for 0.89.3 [ci skip]b8155452a
Improve error when we cannot determine content directory in "hugo new"08552a7a4
deps: Upgrade github.com/yuin/goldmark v1.4.3 => v1.4.4fdad91fd9
commands: Make sure pollInterval is always set5f3f60898
create: Improve archetype directory discovery and tests057d02de2
create: Add a log statement when archetype is a directory43ac59da8
create: Always print "Content ... created"ab5c6990a
commands: Fix missing file locking in server partial render9369d13e5
modules: Improve error message805c24c32
releaser: Prepare repository for 0.90.0-DEV63e3a5ebb
releaser: Add release notes to /docs for release of 0.89.2eaa6c96a7
releaser: Bump versions for release of 0.89.2cf3eb580b
releaser: Add release notes for 0.89.2 [ci skip]2b01c85d1
Fix path resolution in hugo newc09f5c5fd
deps: Upgrade github.com/yuin/goldmark v1.4.2 => v1.4.39232e2844
releaser: Prepare repository for 0.90.0-DEVb6a4ae4ad
releaser: Add release notes to /docs for release of 0.89.184de0c325
releaser: Bump versions for release of 0.89.1a07410226
releaser: Add release notes for 0.89.1 [ci skip]da4406ea5
Revert "releaser: Fat MacOS binaries"166862a09
create: Make sure the build lock is released before we open editor82c33c710
readme: Update dependency list41e9e9fe1
releaser: Prepare repository for 0.90.0-DEVade966b84
releaser: Add release notes to /docs for release of 0.89.0a93d4ba64
releaser: Bump versions for release of 0.89.0110512a65
releaser: Add release notes for 0.89.0f503b6395
docs: Regen CLI docs30aba7fb0
source: Make ContentBaseName() return the directory for branch bundles04a3b45db
Fix description of lang.FormatNumberCustom0cc39af68
Update Twitter shortcode oEmbed endpointed6fd26ce
common/htime: Fix time.Format with Go layouts7fa66425a
build(deps): bump github.com/evanw/esbuild from 0.13.10 to 0.13.1269210cfdf
build(deps): bump github.com/yuin/goldmark from 1.4.1 to 1.4.24b36498a8
Merge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e'aa5ac36a3
Squashed 'docs/' changes from 327003421..39a7fac343a977485e
releaser: Fat MacOS binaries0f248606d
releaser: Only build amd64 binary for freebsd, netbsd, openbsd, dragonflye82cbd746
tpl/time: Use configured location when date passed to Format is string3339c2bb6
build(deps): bump github.com/aws/aws-sdk-go from 1.40.8 to 1.41.1403bbdba8b
build(deps): bump github.com/getkin/kin-openapi from 0.79.0 to 0.80.0a772b8fc3
build(deps): bump github.com/evanw/esbuild from 0.13.8 to 0.13.10dce49d133
resources: Rename excepted filenames for image golden testdata61c5b7a2e
build(deps): bump github.com/frankban/quicktest from 1.13.1 to 1.14.01d60bd1ef
Fix typo in error message75c9b893d
create: Validate the target path in hugo new64e1613fb
Fix panic when specifying multiple excludeFiles directivesb959ecbc8
htime: Set zone of datetime from from `go-toml`70e454812
Added nodesource apt repository to snap package355ff83e7
config: Set HUGO_ENABLEGITINFO=false override in Set_in_string471ed91c6
hugofs: Add includeFiles and excludeFiles to mount configuration94a5bac5b
build(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.29830ca9e3
resources: Always preserve the original transform errorb64fd0577
readme: Add hyperlink to the banner2706437a7
build(deps): bump github.com/getkin/kin-openapi from 0.78.0 to 0.79.0ec7c993cf
deps: github.com/evanw/esbuild v0.13.5 => v0.13.832c6f656d
create: Return error on no content dirse02e0727e
Fix file permissions in new archetype implementation096f5e192
Fix the "page picker" logic in --navigateToChangedba35e6985
Add a cross process build lock and use it in the archetype content builderc7957c90e
readme: Fix a typo on OpenBSDbb0537703
deps: github.com/alecthomas/chroma v0.9.2 => v0.9.49185e11ef
Reimplement archetypes168a3aab4
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.21 to 2.9.228bcfa3bdf
deps: Update github.com/evanw/esbuild v0.13.5d7331aaa7
releaser: Fix regexpcd4e67af1
build(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14e6ad1f0e7
build(deps): bump github.com/getkin/kin-openapi from 0.75.0 to 0.78.0625d2c257
releaser: Update to Go go1.17.2e6e44b7c4
Fix value of useResourceCacheWhen in TestResourceChainPostCSS64abc83fc
Allow multiple plugins in the PostCSS options mapf8d132d73
docs: Create path.Clean documentation26f1919ae
Skip a test assertion on CIe55466ce7
tpl/path: Add path.Cleanecf025f00
readme: Remove tracking imagefab1e43de
Revert "Remove credit from release notes"e03f82eef
Pass minification errors to the usera864ffe9a
Clarify "precision" in currency format functionsb49da3328
build(deps): bump github.com/evanw/esbuild from 0.12.24 to 0.12.297c21eca74
resources: Use default math/rand.Source for concurrency safety13ad8408f
commands: Make the error handling for the mod commands more lenient1cabf61dd
modules: Add some help text to the 'unknown revision' error268e3069f
deps: Update github.com/yuin/goldmark v1.4.0 => v1.4.13efc2e2af
releaser: Prepare repository for 0.89.0-DEV5bc547389
releaser: Add release notes to /docs for release of 0.88.1bb3254385
releaser: Bump versions for release of 0.88.19b1d6d7e3
releaser: Add release notes for 0.88.1 [ci skip]e1ead4dbc
Bump down again to Go 1.16.7 for the release builds5b59b9c17
releaser: Prepare repository for 0.89.0-DEVacc5eb5b5
releaser: Add release notes to /docs for release of 0.88.06cacfa329
releaser: Bump versions for release of 0.88.04d03cd780
Release 0.88.08b14fdbf8
Update 0.88.0-relnotes.mdfc21b63b4
releaser: Add release notes for 0.88.06631c9c7e
Run go mod tidycf73cc2ec
js: Fix import order for ./foo when both ./foo.js and ./foo/index.js exists7d1f806ec
commands: Don't fail on template errors on go mod graph etc.04b595996
build(deps): bump github.com/getkin/kin-openapi from 0.74.0 to 0.75.0c278b6e45
build(deps): bump github.com/frankban/quicktest from 1.13.0 to 1.13.1107c86feb
build(deps): bump github.com/evanw/esbuild from 0.12.22 to 0.12.24a0489c2df
Avoid failing with "module not found" for hugo mod init and similar0fc2ce9e4
Update to Go 1.1732569285c
Remove Pygments from snapcraft.yml5a46eefbc
Revert "build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0"7a15edafe
highlight: Add tabindex when code is not highlighted2f0945baf
build(deps): bump github.com/evanw/esbuild from 0.12.17 to 0.12.22f4ffeea71
Fix it so disableKinds etc. does not get merged in from theme7ba3f3d20
build(deps): bump golang.org/x/text from 0.3.6 to 0.3.7f70165242
build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0bc0743ed8
Prevent minifier from removing quoutes around post-processed attributesffa2fe611
Revert "commands: Avoid too many watch file handles causing the server to fail to start"d966f5d08
highlight: Remove some pygments references3f38c785b
commands: Avoid too many watch file handles causing the server to fail to start24589c081
build(deps): bump github.com/getkin/kin-openapi from 0.68.0 to 0.74.0efebd756e
deps: Update github.com/spf13/cast v1.4.0 => v1.4.158b6742cf
Import time/tzdata on Windows32ead4b1e
releaser: Bump to Go 1.16.7abd969a67
Revert "tpl/time: Handle nil values in time.AsTime"3e1107289
tpl/time: Handle nil values in time.AsTime9bba9a3a9
parser: Indent TOML tablesd6c8cd771
Fix `lang.FormatPercent` descriptiondfe54d321
releaser: Prepare repository for 0.88.0-DEVb0c541e49
releaser: Add release notes to /docs for release of 0.87.02ed7be295
releaser: Bump versions for release of 0.87.0d9d1ef8b0
Release 0.87ec1c1c345
Merge branch 'b087' into release-0.87.0c7fd13462
Update 0.87.0-relnotes.mda5d2632eb
Update 0.87.0-relnotes.md494f284be
docs: Adjust config docsbf738d2f4
docs: Regen CLI docs8d19850e2
docs: Regen docs helper093498352
Merge commit 'bd77f6e1c99e04a476f0b1bb4e44569134e02399' into release-0.87.0bd77f6e1c
Squashed 'docs/' changes from 60a58d123..3270034211c5b025dd
docs: Adjust time zone docsc13d33dd5
releaser: Add release notes for 0.87.0d70c48570
Make sure module config loading errors have file positioning info9ff17c332
tpl/time: Adjust tests to handle matching local time zones7aaaf7e33
mod: Remove superflous replace statement3a9665559
Reduce binary size vs locale, update to CLDR v36.19a7383caf
deps: Update github.com/tdewolff/minify/v2 v2.9.20 => v2.9.216c70e1f22
Fix error handling for the time func alias4d221ce46
Fail on invalid time zonee3dc5240f
Improve handling of <nil> Params268065cb2
Merge branch 'release-0.86.1'e0304c06e
releaser: Add release notes for 0.86.1 [ci skip]7aa8b1cd7
releaser: Prepare repository for 0.87.0-DEVf6821b88a
releaser: Add release notes to /docs for release of 0.86.1580d320a6
releaser: Bump versions for release of 0.86.1b75d4526e
releaser: Add release notes for 0.86.1 [ci skip]94b616bdf
config: Fix a potential deadlock in config readinge90b3591a
build(deps): bump github.com/evanw/esbuild from 0.12.16 to 0.12.174b7da6a9d
build(deps): bump github.com/getkin/kin-openapi from 0.67.0 to 0.68.07907d24ba
tpl/lang: Add new localized versions of lang.FormatNumber etc.726fe9c3c
Go back to WARNING for Page deprecationsb5de37ee7
Handle toml.LocalDate and toml.LocalDateTime in front matterbf301daf1
deps: Upgrade github.com/pelletier/go-toml/v2 v2.0.0-beta.3 => v2.0.0-beta.3.0.20210727221244-fa0796069526a3701e093
Switch to go-toml v240b6016cf
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.19 to 2.9.207e1305710
Add a TOML front matter benchmarkefa5760db
Add timezone support for front matter dates without onea57dda854
Localize time.Formatf9afba933
build(deps): bump github.com/getkin/kin-openapi from 0.61.0 to 0.67.0a5d2ba429
build(deps): bump github.com/spf13/cast from 1.3.1 to 1.4.031972f364
build(deps): bump google.golang.org/api from 0.45.0 to 0.51.02e58782f9
build(deps): bump github.com/sanity-io/litter from 1.5.0 to 1.5.17b68f6524
build(deps): bump github.com/mattn/go-isatty from 0.0.12 to 0.0.1381265af2c
build(deps): bump github.com/spf13/cobra from 1.1.3 to 1.2.1c102c9719
build(deps): bump github.com/mitchellh/mapstructure from 1.3.3 to 1.4.17c0f904f2
build(deps): bump github.com/google/go-cmp from 0.5.5 to 0.5.6b2fbd4d13
build(deps): bump github.com/mitchellh/hashstructure from 1.0.0 to 1.1.090041d1b6
build(deps): bump github.com/gobuffalo/flect from 0.2.2 to 0.2.305047096f
build(deps): bump github.com/pelletier/go-toml from 1.9.0 to 1.9.3a469156ea
build(deps): bump github.com/aws/aws-sdk-go from 1.38.23 to 1.40.818fdd85bc
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.18 to 2.9.19aeb1935d4
deps: Update github.com/evanw/esbuild v0.11.16 => v0.12.16c7252224c
Deprecate Blackfriday and fix a potential deadlock in confige09d7882c
deps: Update github.com/yuin/goldmark v1.3.9 => v1.4.015c0eed04
build(deps): bump github.com/frankban/quicktest from 1.12.0 to 1.13.091cbb9630
Bump all long-living deprecations to ERRORsa352d19d8
Fix theme count in release notes11bb67dcf
releaser: Prepare repository for 0.87.0-DEV41c6c52ea
releaser: Add release notes to /docs for release of 0.86.0d270eaf4f
releaser: Bump versions for release of 0.86.0b2e67505f
Release 0.86.032508045d
navigation: Check Page first in URL()e521c9a36
Update 0.86.0-relnotes.mddfb1cc431
releaser: Add release notes for 0.86.00294a4a4f
Merge commit '53a352795a69a9d4a373f50ec62138595948c6ea'53a352795
Squashed 'docs/' changes from 6ebb5dad9..60a58d123351ed0f56
commands: Fix panic on invalid config in "hugo mod get" and similard831d2fce
Simplify "active menu" logic for section menus634481ba8
Fix Params case handling for menu items defined in site configc19f65f95
minifiers: Make keepWhitespace = true default for HTML022c47955
hugofs: Make FileMeta a structf27e54244
markup: Add tabindex="0" to default <pre> wrapperae6cf93c8
Fix default values when loading from config dira70da2b74
Fix the deprecation error/warn log levels805664818
markup/goldmark: Rename/reorder the hook methodsee3d2bb1d
markup/goldmark: Support auto links in render hookeb2a50036
Adjust a test helper5cb52c231
Add config.cascade30eea3915
resources: Regenerate image golden testdata8f40f34cd
Fix transparency problem when converting 32-bit images to WebP8ddbc9546
releaser: Prepare repository for 0.86.0-DEV724d5db58
releaser: Add release notes to /docs for release of 0.85.0875fe4050
releaser: Bump versions for release of 0.85.056362e4bc
Update 0.85.0-relnotes.mdf5cfb9e25
releaser: Add release notes for 0.85.004dc469fb
commands: Move time notification to after any build errors07919d1cc
exif: Log warning for metadata decode errorf75f90079
Fix tab selection of disabled items in internal pagination templatee31b1d194
commands: Make the --poll flag a duration43a23239b
docs: Regen CLI docs4479f09c9
Merge commit '7eb0e10a80708c638554b8221a3120dc1168566c'7eb0e10a8
Squashed 'docs/' changes from 710856e5a..6ebb5dad924ce98b6d
Add polling as a fallback to native filesystem events in server watch0019d60f6
deps: Bump github.com/yuin/goldmark v1.3.9e451b984c
Fix panic when theme has permalinks configb4d60b3db
releaser: Prepare repository for 0.85.0-DEV020e4acee
releaser: Add release notes to /docs for release of 0.84.44c34faf42
releaser: Bump versions for release of 0.84.4a339f6266
releaser: Add release notes for 0.84.4 [ci skip]4c8552b11
Fix Cloudflare vs Netlify cache dir issue34e4742f0
Fix date format in schema and opengraph templatesbffa2a2a9
releaser: Prepare repository for 0.85.0-DEVa1b0353cc
releaser: Add release notes to /docs for release of 0.84.3bc6f84c58
releaser: Bump versions for release of 0.84.380410257e
releaser: Add release notes for 0.84.3 [ci skip]6c8c0c8b6
config: Fix Netlify default cache dir logic49fedbc51
config: Fix handling of invalid OS env config overrides829072010
releaser: Prepare repository for 0.85.0-DEVe0c67958f
releaser: Add release notes to /docs for release of 0.84.2f6b9ce6eb
releaser: Bump versions for release of 0.84.24b03399b7
releaser: Add release notes for 0.84.2 [ci skip]40dfdd095
modules: Add module.import.noMounts config3a6dc6d3f
modules: Use value type for module.Time6cd2110ab
commands: Add version time to "hugo config mounts"6a365c271
commands: Add some more info to "hugo config mounts"19aa95fc7
Fix config handling with empty config entries after merge923dd9d1c
Fix config loading for "hugo mod init"d9bdd37d3
deps: Update to Minify v2.9.18b2eaf4c8c
Remove credit from release notesefb6ee6c1
releaser: Prepare repository for 0.85.0-DEV4bd65e224
releaser: Add release notes to /docs for release of 0.84.1ff2266300
releaser: Bump versions for release of 0.84.18677cfb04
releaser: Add release notes for 0.84.1 [ci skip]093dacab2
Fix language menu config regression4a9d408fe
config: Fix merge of config with map[string]string values.931205988
releaser: Bump to Goreleaser v0.171.0a7e3da242
markup: Rename Header(s) to Heading(s) in ToC structb70a12ec4
Merge commit '4dd90050f154c91373329a5d7e348289c40be12f'4dd90050f
Squashed 'docs/' changes from 3a923e155..710856e5a3d544c9ae
releaser: Prepare repository for 0.85.0-DEV2c4689f7b
releaser: Add release notes to /docs for release of 0.84.09c0860f74
releaser: Bump versions for release of 0.84.0a1694b06a
releaser: Increase timeout219ec3800
releaser: Add release notes for 0.84.0be6b901cf
docs: Regenerate docs helper643b67193
output: Make WebAppManifestFormat NotAlternative=trueab4e1dfa4
media: Adjust test assertion02f31897b
media: support application/manifest+json402da3f8f
docs: Regenerate docshelper92405e5b0
Squashed 'docs/' changes from 4c81c6c2a..3a923e155a074f758b
Merge commit '92405e5b0adc5d8c3dfde88d6a8b67eb09169190'bb2aa0870
Implement configuration in a directory for modules9096842b0
tpl: Rename err-missing-instagram-accesstoken => error-missing-instagram-accesstoken3aa7f0b27
deps: Update github.com/alecthomas/chroma v0.9.1 => v0.9.29b870aa78
deps: Run go mod tidy93aad3c54
Split out the puthe path/filepath functions into common/paths5af045eba
resources/image: Fix fill with smartcrop sometimes returning 0 bytes images8eafe0845
deps: Update to Goldmark v1.3.831fb29fb3
Do not read config from os.Environ when running testsd392893cd
Misc config loading fixesa886dd53b
github: Set a dummy Instagram tokena91cd7652
docs: Regenerate docs helper162f41d0e
Merge commit '32ba623541d74ee0b7ae4efb1b8326dc49af28b8'32ba62354
Squashed 'docs/' changes from bcc4f9324..4c81c6c2a552cef5c5
Update to Go 1.16.5, Goreleaser 0.169.073483d0f9
tpl: Add a terse pagination template variant to improve performance9b5debe4b
Upgrade Instagram shortcode12530519d
Fix nested OS env config override when parent does not existf55d2f437
tpl/fmt: Add erroridf template func282f1aa3d
tpl/data: Print response body on HTTP errorsfcd63de3a
tpl/data: Misc header improvements, tests, allow multiple headers of same key150d75738
tpl/data: Allows user-defined HTTP headers with getJSON and getCSV06d295427
hugofs: Set modTime at creation time26ae12c0c
Fix invalid timestamp of the "public" folderee733085b
config: Fix env split to allow = character in values01758f99b
Add math.Max and math.Min845a7ba4f
Catch incomplete shortcode error10f60de89
Use SPDX license identifier785a31b5b
navigation: Cache and copy Menu for sortingbc1e05286
deps: Update to LibSASS 3.6.5f518b4f71
publisher: Make the HTML element collector more robustdc6b7a75f
Revert "publisher: Make the HTML element collector more robust"3f515f0e3
Revert "publisher: Get the collector in line with the io.Writer interface"a9bcd3818
publisher: Get the collector in line with the io.Writer interfaceef0f1a726
publisher: Make the HTML element collector more robustabbc99d4c
common/maps: Add Scratch.DeleteInMap76c95f55a
Display version when building site (#8533)2c7f5b62f
docs: Update querify function description and examplesc46fc838a
tpl: Allow 'Querify' to take lone slice/interface argument504c78da4
modules/npm: Change SetEscapeHTML to falseb660ea8d5
Add a benchmark64f88f301
readme: Update dependency list7a2c10ae6
tpl: Fix countwords to handle special charse1c328df2
releaser: Prepare repository for 0.84.0-DEV5afe0a57d
releaser: Add release notes to /docs for release of 0.83.18900e3391
releaser: Bump versions for release of 0.83.19753e1b9c
releaser: Add release notes for 0.83.1 [ci skip]ececd1b12
langs/i18n: Fix warning regression in i18nb0ca723eb
releaser: Prepare repository for 0.84.0-DEV4c65ceccc
releaser: Add release notes to /docs for release of 0.83.057a471a0d
releaser: Bump versions for release of 0.83.09b63af55b
Update 0.83.0-relnotes.md23fc65832
docs: Fix shortcodee7b5e36e0
releaser: Add release notes for 0.83.0a9b52b417
docs: Regenerate docs helperb073a1c97
docs: Regenerate CLI docs4227cc1bd
commands: Remove all dates from gendocc239c643f
Squashed 'docs/' changes from fb551cc75..bcc4f9324d7b22aee4
Merge commit 'c239c643fee10bfa217cb108755b798f8f5f3b10'3cc4fdd6f
deps: Update getkin/kin-openapi v0.60.0 => v0.61.7eb80a9e6
langs/i18n: Fix multiple unknown language codes78c1a6a7c
deps: Update github.com/evanw/esbuild v0.11.14 => v0.11.16f6745ad35
Remove .Site.Authors from embedded templatesf523e9f0f
deploy: Don't treat a NotFound response for Delete as a fatal error.63cd05ce5
snap: Switch to deb packages of nodejs and python3-pygments902535ef1
snapcraft.yaml: Install bin/node from node/14/stable70aebba04
build(deps): bump github.com/getkin/kin-openapi from 0.55.0 to 0.60.03e3b7d447
build(deps): bump github.com/evanw/esbuild from 0.11.13 to 0.11.14c13d36874
resources/page: Fix permalinks pattern detection for some of the sections variants048418ba7
deps: Update to Chroma v0.9.1eebde0c2a
langs/i18n: Improve plural handling of floatse4dc9a82b
tpl/collections: Fix where on type mismatches0d86a32d8
Make the shortcode template lookup for output formats stable65c502cc8
build(deps): bump github.com/evanw/esbuild from 0.11.12 to 0.11.13537c905ec
langs/i18n: Revise the plural implementation243951ebe
snapcraft.yaml: Update to "base: core20"fe2ee0280
build(deps): bump github.com/frankban/quicktest from 1.11.3 to 1.12.0316d65cd7
build(deps): bump google.golang.org/api from 0.44.0 to 0.45.0b95229ab4
build(deps): bump github.com/aws/aws-sdk-go from 1.37.11 to 1.38.230551df090
Correct function name in commentbca40cf0c
Fix Params case handling in where with slices of structs (e.g. Pages)057e5a22a
deps: Upgraded github.com/evanw/esbuild v0.11.0 => v0.11.12fd96f65a3
docs: Regen docs helper8f7891e70
Merge commit '07b8d9466dfb59c429c1b470a0443337bc0aeefe'07b8d9466
Squashed 'docs/' changes from 9cece6640..fb551cc75d3a64708f
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.15 to 2.9.163b56244f4
build(deps): bump golang.org/x/text from 0.3.5 to 0.3.6f5d3d635e
publisher: Remove some unreachable code0d3c42da5
build(deps): bump github.com/getkin/kin-openapi from 0.39.0 to 0.55.0ef34dd8f0
publisher: Some performance tweaks for the HTML elements collectorbc80022e0
publisher: Exclude comment and doctype elements from writeStats2bb9496ce
Merge branch 'release-0.82.1'fda3c4d1e
releaser: Prepare repository for 0.83.0-DEV60618210b
releaser: Add release notes to /docs for release of 0.82.1f8b064f3c
releaser: Bump versions for release of 0.82.14713e509b
releaser: Add release notes for 0.82.1 [ci skip]6e9d2bf0c
Regression in media type suffix lookupe73f7a770
Regression in media type suffix lookup3ddffd064
build(deps): bump github.com/yuin/goldmark from 1.3.2 to 1.3.56fc52d185
Remove duplicate references from release notes73c3ae818
build(deps): bump github.com/spf13/afero from 1.5.1 to 1.6.07ca118fdf
build(deps): bump github.com/pelletier/go-toml from 1.8.1 to 1.9.033d5f8059
Add webp image encoding support509d39fa6
build(deps): bump google.golang.org/api from 0.40.0 to 0.44.07725c41d4
build(deps): bump github.com/nicksnyder/go-i18n/v2 from 2.1.1 to 2.1.25d36d8015
build(deps): bump github.com/rogpeppe/go-internal from 1.6.2 to 1.8.09b34d42bb
Remove extraneous space from figure shortcodec2d8f87cf
build(deps): bump github.com/magefile/mage from 1.10.0 to 1.11.0cbc246616
build(deps): bump github.com/google/go-cmp from 0.5.4 to 0.5.5fa432b17b
org: Disable broken pretty relative links feature0cd55c66d
deps: Update go-org to v1.5.00d5cf256e
build(deps): bump github.com/jdkato/prose from 1.2.0 to 1.2.136527576b
build(deps): bump github.com/spf13/cobra from 1.1.1 to 1.1.39b83f45b6
Add complete dependency list in "hugo env -v"7fdd2b95e
Add hugo.IsExtended3d5dbdcb1
publisher: Also test minified HTML in the element collector8a308944e
publisher: Skip script, pre and textarea content when looking for HTML elements7b4ade56d
output: Only output mediaType once in docshelper JSON7c7974b71
Fix typo in docshelper.go5656a908d
tpl: Remove the FuzzMarkdownify func for now2dc222cec
Add slice syntax to sections permalinks config4d22ad580
deps: Upgrade github.com/evanw/esbuild v0.9.6 => v0.11.05e2f12891
Try to fix the fuzz build97934779e
releaser: Prepare repository for 0.83.0-DEV9d9607843
releaser: Add release notes to /docs for release of 0.82.01efd93c09
releaser: Bump versions for release of 0.82.0584a9b3e2
releaser: Add release notes for 0.82.086b4fd35e
docs: Regenerate docs helper195d108da
docs: Regen CLI docs81689af79
Squashed 'docs/' changes from bb15e9804..9cece6640c94aa5cf4
Merge commit '81689af79901f0cdaff765cda6322dd4a9a7ccb3'df8bb8812
Simplify some config loading code57d8d208e
deps: Update github.com/evanw/esbuild v0.9.0 => v0.9.6fc06e8508
Apply OS env overrides twiceb725253f9
Attributes for code fences should be placed after the lang indicator only35dedf15c
deps: Bump github.com/tdewolff/minify/v2 v2.9.157ed56c694
Fix OS env override for nested config param only available in theme24c716cac
Fix `new theme` command description137d2dab3
github: More explicit support link to discourseba1d0051b
media: Make Type comparable1b1dcf586
deps: Update to esbuild v0.9.0f6612d8bd
exif: Fix handling of utf8 runes in nullString()0a2ab3f8f
exif: Allow more spacing characters in strings4d24e2a32
media: Add a basic benchmark18074d0c2
Fix output format handling for render hooks35bfb6622
Rename a test6d21559fb
Add a debug helperba16a14c6
Add support for Google Analytics v4782c79ae6
Bump go.mod to Go 1.165afcae7e0
#8210 Upgrade golang version for Dockerfile60469f429
Update CONTRIBUTING.mdaed7df62a
markup: Handle attribute lists in code fencescd0c5d7ef
Allow markdown attribute lists to be used in title render hookse7e194435
Merge commit '9d31f650da964a52f05fc27b7fb99cf3e09778cf'9d31f650d
Squashed 'docs/' changes from d343ebf71..bb15e980488a85dcea
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.7 to 2.2.87f8530039
tpl: Add method mappings for strings.Contains, strings.ContainsAny01dd7c16a
Fixes #7698.c8f45d1d8
commands: Fix autocomplete docsb3504a0ee
releaser: Prepare repository for 0.82.0-DEV59d15c97d
releaser: Add release notes to /docs for release of 0.81.09e2d086ca
releaser: Bump versions for release of 0.81.0b65518ac6
releaser: Increase build timeout0e9cd8128
releaser: Add release notes for 0.81.0fe77f7434
tpl: Make the build green again9e99950c6
docs: Regen CLI docs1b364b003
docs: Regen docs helperacb9109df
Squashed 'docs/' changes from ef9c4913c..d343ebf717d0a26198
Merge commit 'acb9109df778fa4a51c0d8b29b3212b12988908f'c60806550
tpl: Regenerate internal templatesffd9dac42
tpl: Update date logic of opengraph and schema internal templates88b93a09d
Run go mod tidy29fb456c9
build: Add arm64 to Darwinextended build and add vendorInfo718fba7d6
Update Travis, GitHub, CircleCI and Snap to Go 1.16 (only)9650e5684
tpl: Add temporary patch to fix template data racee77b2e3aa
Pull in latest Go 1.16 template sourceb5485aeae
Add breaking tests for "map read and map write in templates"ccb822eb5
Pull in latest Go template source21e9eb18a
Expand template newline testcase to commandsae57ba6a9
Add a test case for Go 1.16 template action newlinescf3e077da
tpl/internal: Synch Go templates fork with Go 1.16dev66beac99c
deps: Update github.com/tdewolff/minify/v2 v2.6.2 => v2.9.13968dd7a71
build(deps): bump github.com/frankban/quicktest from 1.11.2 to 1.11.338f29e817
build(deps): bump github.com/getkin/kin-openapi from 0.32.0 to 0.39.0cd87813aa
build(deps): bump github.com/aws/aws-sdk-go from 1.36.33 to 1.37.114e815b063
build(deps): bump github.com/sanity-io/litter from 1.3.0 to 1.5.0652a59d38
build(deps): bump github.com/olekukonko/tablewriter from 0.0.4 to 0.0.584f0ec7f8
deps: Update to esbuild v0.8.46bdfbcf6f4
modules: Add config option modules.vendorClosestb60e9279a
js: Fix potential path issue on Windowsa9b0fea6a
build(deps): bump google.golang.org/api from 0.26.0 to 0.40.0e8df09774
Change version string format and add VendorInfo to help with issue triaging3a5ee0d2d
modules: Allow absolute paths for any modules resolved via project replacement4ffaeaf15
modules: Throw an error running hugo mod vendor on mountless modulebf55afd71
Fix some humanize issues5f621df25
commands: Add PowerShell completion support7118f89cf
Refer to mage instead of make in comment regarding commitHashe6dd31281
markup/goldmark: Fix handling of legacy attribute config2681633db
markup/goldmark: Add attributes support for blocks (tables etc.)1b2472825
deps: Update to Goldmark v1.3.2441b11bee
Update to Dart Sass Protocol beta64867cd1de
tpl/embedded: Exclude pages without Permalink from sitemap92c6c4041
langs/i18n: Support translation files with suffix *.ymld36fd5b3e
Refactor: Write to stdout by defaulta7c515e1b
Refactor: Remove powershell support216b00f35
Feat: Add zsh, fish and powershell completion support144943798
github: Enable NPM tests on Windows440fdb0eb
deps: Update to esbuild v0.8.39b2a48dce5
Trim whitespace in elements written to hugo_stats.json35def0ae4
tpl/data: Add default user-agent header for getJSON requests2f9dadae4
build(deps): bump github.com/aws/aws-sdk-go from 1.35.0 to 1.36.33ed3071b75
docs: Remove mention of a file size limit for readFileee9c13676
tpl/os: remove 1mb limit for readFile.32b86076e
js: Add Inject config option241b7483e
tpl: Fix race condition in text template baseofe19a046c4
js: Add Shims optiona1fe552fc
Fix nilpointer in js.Build error handlinga1a9f088b
Merge commit 'e48ffb763572814a3788780bb9653dfa2daeae22'e48ffb763
Squashed 'docs/' changes from 1de7a358c..ef9c4913c07ad283f6
build(deps): bump github.com/spf13/afero from 1.4.1 to 1.5.12c8b5d916
pipes: Add external source map support to js.Build and Babel0004a733c
tpl: Fix metrics hint tracking8a26ab0bc
tpl: Do not return errors in substr for out-of-bounds cases788e50ad3
tpl: Add missing test scenario for strings.Substr4d2b6fc4c
Run go mod tidy212e5e554
deps: Update go-org to v1.4.04fdec67b1
rst: Adjust log level9b681ecfb
releaser: Prepare repository for 0.81.0-DEV792ef0f41
releaser: Add release notes to /docs for release of 0.80.05b3fc1c67
releaser: Bump versions for release of 0.80.063a33afee
Update 0.80.0-relnotes.md69aa3d459
releaser: Add release notes for 0.80.0ffbf5e45f
Allow Dart Sass transformations to be cached on disk48994ea76
dartsass: Dart Sass only supports `expanded` and `compressed`428b0b329
dartsass: Add missing OutputStyle option1f7e9f733
Update emoji import paths and versioncea157402
Add Dart Sass supportf9f779786
GroupByParamDate now supports datetimesa9718f44c
para: Skip para test when not on CIf802bb236
Update SECURITY.md6c2941827
releaser: Add release notes to /docs for release of 0.79.110ae7c321
Improve LookPathae2d1bd52
docs: create a SECURITY.md81975f847
Fix Resource.ResourceType so it always returns MIME's main type8103188b9
para: Show more detail on failed time test3ba147e70
images: Add images.Overlay filtera2d146ec3
tpl: Regenerate templatesd2d493ab5
tpl: Fix series detection in opengraphce96895de
hugolib/paths: Fix typo04b89857e
all: Fix minor typos21fa1e86f
Fix BenchmarkMergeByLanguagec84ad8db8
deps: Bump github.com/spf13/cobra from 0.15.0 to 0.20.04e0acb89b
chore: configure proper link to discourse.gohugo.io (#8020)718e09ed4
tpl/internal/go_templates: Revert formattingd90e37e0c
all: Format code with gofumpt32471b57b
build(deps): bump github.com/evanw/esbuild from 0.8.15 to 0.8.174fc918e02
tpl: Add title parameter to YouTube shortcode0ad378b09
Use --baseURL path for live-reload URLaebfe156f
Fix RelURL and AbsURL when path starts with language907d9e926
build(deps): bump github.com/getkin/kin-openapi from 0.31.0 to 0.32.05862fd2a6
tpl: Fix substr when length parameter is zero64789fb5d
tpl: Refactor and fix substr logic32d4bf68d
releaser: Prepare repository for 0.80.0-DEV1415efdcd
releaser: Add release notes to /docs for release of 0.79.04e6bf7907
releaser: Bump versions for release of 0.79.050be4370b
Update 0.79.0-relnotes.md3d2e6a30d
releaser: Add release notes for 0.79.04f1e4bb3f
Merge commit '9f1265fde4b9ef186148337c99f08601633b6056'9f1265fde
Squashed 'docs/' changes from 57c1d1a67..1de7a358cd162bbd79
publisher: Fix memory usage in writeStats17e0bbe82
build(deps): bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0e442cf30a
Fix server rebuild issue with partials referenced from render hooks7e223b3ba
Allow setting the delimiter used for setting config via OS env, e.g. HUGO_8a6e70605
deps: Update to github.com/evanw/esbuild 0.8.11 to 0.8.1434061706e
output: Add more layout lookup tests6f7633df7
build(deps): bump github.com/google/go-cmp from 0.5.2 to 0.5.3a546059a9
examples: Remove unneeded meta tag from blog exampleb5d906e31
build(deps): bump github.com/getkin/kin-openapi from 0.30.0 to 0.31.0fd70bdafe
docs: Regen docshelper8f5c9a747
Add menu paramse4fcb672e
resources: Preserve url set in frontmatter without sanitizing18c13adcd
watcher: Add file deleted by accident20a35374a
Revert "docs: Regenerate docshelper"caf16c208
docs: Regenerate docshelperb298c06e0
deps: Update to Chroma v0.8.255e290af4
build(deps): bump github.com/evanw/esbuild from 0.8.8 to 0.8.11506a190a8
build(deps): bump github.com/getkin/kin-openapi from 0.26.0 to 0.30.0fc81de643
build(deps): bump github.com/evanw/esbuild from 0.8.6 to 0.8.8fcaa324e3
releaser: Prepare repository for 0.79.0-DEV959724f0e
releaser: Add release notes to /docs for release of 0.78.2a3012d85d
releaser: Bump versions for release of 0.78.2fc7f73927
releaser: Add release notes for 0.78.2 [ci skip]78f227b66
js: Let ESBuild handle all imports from node_modules5e03f644a
build(deps): bump github.com/evanw/esbuild from 0.8.5 to 0.8.6a92ef20ff
build(deps): bump github.com/evanw/esbuild from 0.8.4 to 0.8.50d54a8440
build(deps): bump github.com/getkin/kin-openapi from 0.22.1 to 0.26.0943f3c932
Update GH docs to say "main" as default branch4f20bf29e
Updated year in header4c613d5d5
Added first fuzzer82a182e52
build(deps): bump github.com/frankban/quicktest from 1.11.1 to 1.11.2dfc662b20
build(deps): bump golang.org/x/text from 0.3.3 to 0.3.42f0917cc0
build(deps): bump github.com/evanw/esbuild from 0.8.3 to 0.8.47565cda1f
releaser: Prepare repository for 0.79.0-DEV347f2de67
releaser: Add release notes to /docs for release of 0.78.1210f6d38a
releaser: Bump versions for release of 0.78.103f87f8f0
releaser: Add release notes for 0.78.1 [ci skip]3437174c3
Disable NPM test on Travis on Windowsf66302ca0
travis: Install nodejs on Windows944150baf
js: Remove external source map optionbf2837a31
js: Misc fixescf6131dc1
releaser: Prepare repository for 0.79.0-DEVfd62817bb
releaser: Add release notes to /docs for release of 0.78.03ebe83aea
releaser: Bump versions for release of 0.78.00c16debc7
Update 0.78.0-relnotes.md794e1f9e7
releaser: Add release notes for 0.78.0c64e9504d
Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0'b74591123
Squashed 'docs/' changes from d1157b687..57c1d1a673b2fe3cd3
js: Add avoidTDZ option85e4dd737
Make js.Build fully support modules3089fc0ba
js.Build: Generate tsconfig filese10e36cf7
releaser: Prepare repository for 0.78.0-DEVef290125c
releaser: Add release notes to /docs for release of 0.77.05d2fceeca
releaser: Bump versions for release of 0.77.00696df668
Release 0.77.05ba49c877
Update 0.77.0-relnotes.mdc3ccda8fa
releaser: Add release notes for 0.77.0beabc8d99
modules: Allow absolute paths for project imports332b65e4c
docs: Regen docs helper3553fc533
Merge commit '9cabb46f68bae01aeb1859727dcb21e8a10f5ec7'9cabb46f6
Squashed 'docs/' changes from 9abd3043a..d1157b687173187e26
Add module.replacements8a1c637c4
Fix setting HUGO_MODULE_PROXY etc. via env vars6d95dc9d7
tpl: Fix reflection bug in merge56a343507
deploy: Do not call CDN service invalidation when executing a dry run deploymentd48a98c47
create: Pass editor arguments from newContentEditor correctly3261678f6
deps: Bump github.com/spf13/cobra from 0.0.7 to 1.1.1f465c5c30
build: Allow optional "nodeploy" tag to exclude deploy command from bin3400aff25
Allow cascade _target to work with non toml fmfdfa4a5fe
Allow getJSON errors to be ignored8cbe2bbfa
build(deps): bump github.com/evanw/esbuild from 0.7.15 to 0.7.18807db97af
tpl: Refactor time.AsTime location implementation26eeb2914
tpl: Update Hugo time to support optional [LOCATION] parameterb886fa46b
Revert "Add benchmark for building docs site"14bce18a6
highlight: Avoid making unnecessary allocation837e084bb
Add benchmark for building docs site08e4f9ff9
embedded: Always show page number when 5 pages or lessacfa15386
output: Improve layout path constructionf033d9f01
build(deps): bump github.com/frankban/quicktest from 1.11.0 to 1.11.159fe27942
build(deps): bump github.com/evanw/esbuild from 0.7.14 to 0.7.1562119022d
Merge branch 'release-0.76.5'2f3f41f73
releaser: Prepare repository for 0.77.0-DEV60f0725b3
releaser: Add release notes to /docs for release of 0.76.5dcf70ea5a
releaser: Bump versions for release of 0.76.57487c0abf
releaser: Add release notes for 0.76.5 [ci skip]79a022a15
Render aliases even if render=linkead5799f7
Render aliases even if render=linkd57be1132
build(deps): bump github.com/spf13/afero from 1.4.0 to 1.4.1d07059669
build(deps): bump github.com/evanw/esbuild from 0.7.9 to 0.7.14f5ea359dd
docker: Update to Go 1.15 and Alpine 3.1278b26d538
output: Test all lookup permutations in TestLayout28179bd55
output: Reformat TestLayout tablefef057b48
releaser: Prepare repository for 0.77.0-DEV50dfe40b9
releaser: Add release notes to /docs for release of 0.76.41ef4211fe
releaser: Bump versions for release of 0.76.4b148063ec
releaser: Add release notes for 0.76.4 [ci skip]e9a7ebaf6
snap: Install postcss v8 explicitly as it is now a peer dependency506820435
lang/i18n: Fix for language code case issue with pt-br etc.49972d079
Merge branch 'release-0.76.3'c98132e30
Add merge helperaf19253f4
releaser: Prepare repository for 0.77.0-DEVe96234590
releaser: Add release notes to /docs for release of 0.76.3d62bc7477
releaser: Bump versions for release of 0.76.31b1d62fdc
releaser: Add release notes for 0.76.3 [ci skip]33e9d79b7
langs/i18n: Add workaround for known language, but missing plural rule errorfc6abc39c
langs/i18n: Fix for bare TOML keys18ed22be5
releaser: Prepare repository for 0.77.0-DEV207913f34
releaser: Add release notes to /docs for release of 0.76.2830b1a94d
releaser: Bump versions for release of 0.76.2605cff407
releaser: Add release notes for 0.76.2 [ci skip]6dd60fca7
Revert "deps: Update to github.com/tdewolff/minify v2.9.4"138a02591
releaser: Prepare repository for 0.77.0-DEV58ac83a98
releaser: Add release notes to /docs for release of 0.76.12b8e8e6d9
releaser: Bump versions for release of 0.76.1aef836986
releaser: Add release notes for 0.76.1 [ci skip]f9e798e8c
langs/i18n: Fix i18n .Count regressionee56efffc
Fix typo in 0.76.0 release note2c4e76e96
releaser: Prepare repository for 0.77.0-DEV9c7d6e475
releaser: Add release notes to /docs for release of 0.76.04482958f9
releaser: Bump versions for release of 0.76.0e1ec3bc2b
Release 0.76.01cfa63b9e
releaser: Add release notes for 0.76.0b9318e431
docs: Regen docshelper5e39eb20a
Merge commit 'e5568488051a571df48401e03f1304b95dbc9028'e55684880
Squashed 'docs/' changes from 4895c29c5..9abd3043a634938908
pagemeta: Make BuildConfig.Render an enumc63db7f1f
Allow cascade to be a slice with a _target discriminator5e2a547cb
Add force flag to server redirects configee090c094
build(deps): bump github.com/evanw/esbuild from 0.7.8 to 0.7.9edc5c4741
tpl: Add Do Not Track (dnt) option to Vimeo shortcode05e358fd3
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.5 to 2.9.7a2e85d9a7
build(deps): bump github.com/aws/aws-sdk-go from 1.34.34 to 1.35.04fba78dd0
build(deps): bump github.com/getkin/kin-openapi from 0.22.0 to 0.22.1c011b4667
build(deps): bump github.com/aws/aws-sdk-go from 1.34.33 to 1.34.3435348b4b3
build(deps): bump github.com/evanw/esbuild from 0.7.7 to 0.7.834915777c
build(deps): bump github.com/aws/aws-sdk-go from 1.34.27 to 1.34.330f4a837ed
build(deps): bump github.com/evanw/esbuild from 0.7.4 to 0.7.7b395d686e
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.4 to 2.9.597987e5c0
langs/i18n: Upgrade to go-i18n v2111344113
publisher: Fix writeStats with quote inside quotes4855c186d
build(deps): bump github.com/evanw/esbuild from 0.7.2 to 0.7.40c3d2b67e
Fix CLI example for PostCSS 86f07ec7e9
build(deps): bump github.com/aws/aws-sdk-go from 1.34.26 to 1.34.274318dc72f
build(deps): bump github.com/alecthomas/chroma from 0.8.0 to 0.8.1acdc27a32
build(deps): bump github.com/evanw/esbuild from 0.7.1 to 0.7.23acde9ae0
Make sure CSS is rebuilt when postcss.config.js or tailwind.config.js changes473b6610d
Fix typo in redirect error message0bce97703
build(deps): bump github.com/aws/aws-sdk-go from 1.34.22 to 1.34.26b254532b5
deps: Update to github.com/tdewolff/minify v2.9.405a228929
snap: Bump bundled Node.js from v12.18.3 to v12.18.48e553dcde
markup/asciidocext: Add preserveTOC optiond4fc70a3b
build(deps): bump github.com/frankban/quicktest from 1.10.2 to 1.11.0d905abc00
build(deps): bump github.com/evanw/esbuild from 0.6.32 to 0.7.18f3946746
build(deps): bump github.com/rogpeppe/go-internal from 1.5.1 to 1.6.2b01b2564e
build(deps): bump github.com/jdkato/prose from 1.1.1 to 1.2.09fa5ebe2c
build(deps): bump github.com/spf13/afero from 1.2.2 to 1.4.0efaed306b
releaser: Prepare repository for 0.76.0-DEVa4a7bab73
releaser: Add release notes to /docs for release of 0.75.12a9dce423
releaser: Bump versions for release of 0.75.130159b58e
releaser: Add release notes for 0.75.1 [ci skip]cd00f7f96
resources/image: Fix nilpointer for images with no Exif214afe4c1
modules/npm: Preserve the original package.json if it existscd830bb02
tpl: Fix grammar in the new 'requires non-zero' error messagea8458bfb2
releaser: Prepare repository for 0.76.0-DEVfef924baf
releaser: Add release notes to /docs for release of 0.75.007b5e602f
releaser: Bump versions for release of 0.75.070f16e84e
Release 0.75.0abadf2954
releaser: Add release notes for 0.75.0377ad87a5
Set PWD in environment when running the Node apps292b0e26e
typo: already -> already534ae9c57
Squashed 'docs/' changes from d3eb97a33..4895c29c5df56682a1
Merge commit '534ae9c57a902aea9ed6e62390dec11fa74b7122'be2404c8b
docs: Regen docs helperc8da8eb1f
docs: Regenerate CLI docs787da6bd5
releaser: Drop 32-bit for MacOS85ba9bfff
Add "hugo mod npm pack"9df60b62f
Print layout name if it was specified when showing missing layout file error4fad43c8b
build(deps): bump github.com/aws/aws-sdk-go from 1.34.21 to 1.34.22fb0f2cc71
markup/highlight: Add support to linkable line anchors on Chroma748fd4cb0
snap: Bump bundled Node.js from v8.12.0 to v12.18.3b82f440c5
Revert "snap: Change confinement from strict to classic"c8143efa5
build(deps): bump github.com/getkin/kin-openapi from 0.14.0 to 0.22.0c80132bbe
build(deps): bump github.com/aws/aws-sdk-go from 1.34.20 to 1.34.2175fa4c5c9
build(deps): bump github.com/spf13/viper from 1.6.1 to 1.7.1fd7969e0b
deps: Run "go mod tidy"b7fa3c4bb
deps: Update to Goldmark v1.2.16a848cbc3
markup/asciidocext: Fix AsciiDoc TOC with code746ba803a
build(deps): bump github.com/aws/aws-sdk-go from 1.27.1 to 1.34.20612b7d376
build(deps): bump github.com/mitchellh/mapstructure from 1.1.2 to 1.3.36f4ff1a46
snap: Change confinement from strict to classicddeca4593
build(deps): bump github.com/spf13/cobra from 0.0.5 to 0.0.731f2091f5
build(deps): bump github.com/sanity-io/litter from 1.2.0 to 1.3.0d4611c432
modules: Add noVendor to module config20af9a078
modules: Add ignoreImports to module imports config9a1e6d15a
modules: Make ignoreVendor a glob pattern84adecf97
build(deps): bump github.com/gorilla/websocket from 1.4.1 to 1.4.2573558a07
build(deps): bump github.com/fsnotify/fsnotify from 1.4.7 to 1.4.98b10c22f8
build(deps): bump github.com/kyokomi/emoji195bd1243
build(deps): bump github.com/markbates/inflect from 1.0.0 to 1.0.46a544ece2
build(deps): bump github.com/frankban/quicktest from 1.7.2 to 1.10.24b430d456
Encode & in livereload injected codeb9f10c75c
build(deps): bump github.com/niklasfasching/go-org from 1.3.1 to 1.3.2537c598e9
build(deps): bump github.com/bep/golibsass from 0.6.0 to 0.7.067348676f
build(deps): bump golang.org/x/text from 0.3.2 to 0.3.3f9cc0ec76
build(deps): bump github.com/evanw/esbuild from 0.6.5 to 0.6.32b5483eed6
build(deps): bump github.com/nicksnyder/go-i18n from 1.10.0 to 1.10.190285f475
Revert "Update dependabot.yml"4949bdc2e
markup/asciidocext: Fix broken testf7c1b5fe1
docs: Update replaceRE func183e86260
docs: Update replace funcf50ee6bbe
docs: Update merge functionc0655ba6c
Update dependabot.ymla2dda22c3
Create dependabot.yml910d81a69
Remove Pygments from requirements.txt8c490a73b
docs: Regen CLI docse6cd9da42
docs: Regen docs helperdcf25c0b4
markup/asciidocext: Revert trace=true7d7771b67
Squashed 'docs/' changes from 7297c1172..d3eb97a33b9e4f5898
Merge commit '7d7771b673e5949f554515a2c236b23192c765c8'e820b366b
Update to Go 1.15.1 and 1.14.84055c1218
Fix some change detection issues on server reloads3ba7c9253
markup/asciidoc: Add support for .TableOfContents19ef27b98
markup/goldmark: Add a test casec6b661de8
js.Build: Add SourceMap flag with inline optioncdfd1c99b
tpl: Add limit support to replaceRE047af7cfe
tpl: Extend merge to accept multiple parametersf9ebaaed1
tpl: Add limit option to replace template functiond39636a5f
commands: Remove logic that hides 'Building Sites' message after build completesad01aea3f
Fixed misspelled wordsec3742046
Improve stderr logging for PostCSS and simlilarae63c2b5c
Fail on partials with return when given none or a zero argumente627449c0
Update to Go 1.15c2235c6a6
Revert "Update stale.yml"4f69ade71
Update stale.ymlf8b8b091f
Merge commit 'cb39847dee488c373dd5bc2a3706385342a59355'cb39847de
Squashed 'docs/' changes from a26d0e610..7297c11725f4259014
Remove trailing whitespace and tabs from RSS templatesf3cb0be35
Fix a typo in CONTRIBUTING.mdbffc4e12f
Revert "Fix ellipsis display logic in pagination template"12f6a1cdc
Respect mediatypes for deploy2fa851e65
Fix ellipsis display logic in pagination template21dbfa1f1
mage: Add uninstall targete5591e89d
deps: Update Chroma to 0.8.088929bc23
deps: Update go-org to v1.3.1850c18bfe
releaser: Prepare repository for 0.75.0-DEVda0437b48
releaser: Add release notes to /docs for release of 0.74.390fe00df0
releaser: Bump versions for release of 0.74.302efadc24
releaser: Add release notes for 0.74.3 [ci skip]00e00da23
publisher: Collect transition attributes as classes45c665d39
Fix Asciidoctor argsa06c06a5c
Fix date format in internal schema template0256959a3
resources/js: Add option for setting bundle formateded9ac2a
resources/js: Simplify options handling8d7251282
make sure documentation intro text only appears oncee81aef0a9
resources/js: Add es5 build target673e622fa
Merge commit '28bd06265e88454b061810578919d891909a83ad'28bd06265
Squashed 'docs/' changes from c3b4f8410..a26d0e6109f9191471
deps: esbuild v0.6.53727a9d11
releaser: Prepare repository for 0.75.0-DEV48565de62
releaser: Add release notes to /docs for release of 0.74.2808e12621
releaser: Bump versions for release of 0.74.2aa85a46dc
releaser: Add release notes for 0.74.2 [ci skip]35011bcb2
Add .Defines to js.Build options084624baa
releaser: Prepare repository for 0.75.0-DEV15163266c
releaser: Add release notes to /docs for release of 0.74.1a74f7d3cc
releaser: Bump versions for release of 0.74.1cb84d9816
releaser: Add release notes for 0.74.1 [ci skip]c91dbe4ce
Fix baseof block regression6e0452e18
releaser: Prepare repository for 0.75.0-DEVd2b116268
releaser: Add release notes to /docs for release of 0.74.0626518430
releaser: Bump versions for release of 0.74.0797127010
Release 0.74.01672a332d
releaser: Add release notes for 0.74.0823ce055e
Squashed 'docs/' changes from cfd74b57d..c3b4f84105f7a65a08
Merge commit '823ce055ed3356da37e9ec4ac70446bdbbaa8de8'25e3da334
docs: Regenerate docs helper9df98ec49
Add proper Media Type handling in js.Build2fc338070
Add js.Build asset bundlingf1916f114
Merge commit '6aa5c9117fd34644459ea9bcfb1b3f5010658d5d'6aa5c9117
Squashed 'docs/' changes from ac2c4a487..cfd74b57d12a65e76d
Add openapi3.Unmarshal58c0f5e61
Remove trailing hyphen from auto heading IDa1c3e3c1f
deploy: Ensure that non-trivial default flag values are passed through.42e150fbf
Fix server reload when non-HTML shortcode changes028b35678
tpl/strings: Add strings.Counte9f87c4e3
Update formats.md doc for new allowed extensions.defd7106b
tpl: Add debug.Dumpbeb6c03bc
Update config.go to add two Asciidoctor extensions4a3efea7e
Add support for inline partialsc66dc6c74
Add support for native Org dates in frontmatter127d5feb3
deps: Update go-org to v1.3.02d42ba912
deps: Update go-org to v1.2.05b7b5dea1
Update bug_report.mdccfaeb678
hugolib: Add missing zero check on file057b1377c
cache: Remove some unused code48dbb593f
commands: Add an option to print memory usage at intervalsf0266e2ef
Rework external asciidoctor integration77aa385b8
Enable the embedded template test when race detector is off545a1c1ce
Merge branch 'release-0.73.0'47aaa52e3
releaser: Prepare repository for 0.74.0-DEV428907cc3
releaser: Add release notes to /docs for release of 0.73.0a78b3e341
releaser: Bump versions for release of 0.73.0cfcb01451
Release 0.73.00b579db80
Updated installation instruction about Sass/SCSS supportee5d027cd
releaser: Add release notes for 0.73.04a340ba25
Remove some old release notes3466884e3
Create robots.txt in the domain root directory6ff435aa3
Make GroupByParamDate work with string params82abca32f
Add GroupByLastmodfc045e12a
Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy9679023f2
Fix aliases with path in baseURL0a9172672
Merge commit 'efa74c5c6e6ff1daddeb5834ea7c69bed2acf171'efa74c5c6
Squashed 'docs/' changes from 9be494de3..ac2c4a4876408c1cbc
Fix server data race/nil pointer in withMaps522ba1cd9
Fix order of GetTerms889dc47ce
Add genDocsHelper mage targetf720fe56d
Fix aliases with uglyURLsd6ed17c60
Fix crash for closing shortcode with no .Inner set145b3fcce
Fix aliases with relativeURLs01e249e97
Regenerate templates4b560cc11
Beautify HTML generated by pagination templatee3e627e6b
Add a nested data dir test83d03a520
hugofs: Use os.PathError in RootMappingFs.doLstatfc0f13b68
commands: Fix URL rewrites vs fast render server mode7eeebe1e5
tpl/crypto: Add hmac740fa4a91
Remove credit (#7347)f8c67f93e
Allow hook template per section/type3d9235e8f
tpl: Fix bad rounding in NumFmtf7d909f39
releaser: Prepare repository for 0.73.0-DEV8a7ef3cf4
releaser: Add release notes to /docs for release of 0.72.02dfe242ea
releaser: Bump versions for release of 0.72.07a1464e54
Release 0.72.041d50b4dd
releaser: Add release notes for 0.72.04d53ae697
releaser: Adjust the "thanks" section626b16e02
Merge commit '9e1dcefc5f559944b70d2fa520f6acd5c56a69f2'9e1dcefc5
Squashed 'docs/' changes from 6c2195936..9be494de32919a6a50
common/maps: Add Scratch.Values432885c49
deps: Update Goldmark to improve Typographer6a3e89743
Add redirect support to the server9613e3e8a
Fix typo in install instructionsc950c86b4
publisher: Fix tag collector for nested table elements915202494
snap: Fix build error: my previous commits did not fix itb3e4f911f
releaser: Prepare repository for 0.72.0-DEVa301f6b2a
releaser: Add release notes to /docs for release of 0.71.1646bc8508
releaser: Bump versions for release of 0.71.15c0d10045
releaser: Add release notes for 0.71.1 [ci skip]81f563324
Add some more date test cases9698b0dab
Fix RenderString vs render hooks32344fe3d
Prevent WARNINGs in RenderString4d7fa9f11
Fix IsAncestor/IsDescendant for taxonomiesa985efcec
Fix GetPage on section/bundle name overlaps6c3c6686f
Fix Go template script escapingc34bf4856
Add a test helper833d16d46
releaser: Prepare repository for 0.72.0-DEV06150c87b
releaser: Add release notes to /docs for release of 0.71.0330e52ebe
releaser: Bump versions for release of 0.71.09e7823537
Release 0.717cd66c53b
releaser: Add release notes for 0.71.0723ec555e
Fix Babel on Windows518d14964
commands: Use WARN log level also for the early initializatione0e81b280
Merge commit 'c9403cbceaaeff53ff4833561f4eefe1dc1a405e'c9403cbce
Squashed 'docs/' changes from ec0abe052..6c21959363cc41523b
Update to Go 1.14.3 and Go 1.13.112fd0a5a67
Improve error message when no Babel installed6e051c053
Add test for headings render hook423b8f2fb
Add render template hooks for headings991934497
Add math.Pow558c09305
deploy: Do not suppress .well-known/ directoryb69a36140
snap: Quote "@babel/cli" to solve build errora0103864a
snap: Remove custom x-nodejs pluginb342e8fbd
Upgrade chroma to 0.7.3 to fix invalid css6205d56b8
Use .Lastmod for og:updated_timea5039ddda
releaser: Prepare repository for 0.71.0-DEV7f47b99ea
releaser: Add release notes to /docs for release of 0.70.0b98e2f66b
releaser: Bump versions for release of 0.70.057ebab7c2
Release 0.70.00e314925f
releaser: Add release notes for 0.70.0e4621446c
Merge commit '89044b8f8795f17c36396c67823183a20fc88139'89044b8f8
Squashed 'docs/' changes from 19f44e150..ec0abe05201befcce3
deps: Update minify to v2.6.204b1a6d99
Add support for sort by booleandd31e8000
deps: Update to Libsass 3.6.46add6d77b
Rename transpileJS to babel2a171ff1c
resources: Add JavaScript transpiling solution67f920419
Disable a test locallyc03ea2b66
Fix some missing JS class collector casesfe60b7d9e
Add diagnostic hints to init timeout messagec2d9fd1eb
releaser: Prepare repository for 0.70.0-DEVec9dcf304
releaser: Add release notes to /docs for release of 0.69.203802ff3c
releaser: Bump versions for release of 0.69.25e31198c9
releaser: Add release notes for 0.69.2 [ci skip]8d5766d41
Fix IsAncestor and IsDescendant when the same page is passed5c41f41ad
deps: Update goldmark-highlighting27a4c4410
Fix IsAncestor and IsDescendant under subsectionade27699e
releaser: Prepare repository for 0.70.0-DEV17661debb
releaser: Add release notes to /docs for release of 0.69.18549189e8
releaser: Bump versions for release of 0.69.1c2c7a4ce5
releaser: Add release notes for 0.69.1 [ci skip]49e6c8cb4
hugolib/filesystems: Fix typo in test suitef37e77f2d
Fix class collector when running with --minify27af5a339
related: Fix toLowerb3c825756
Fix broken test5146dc614
tpl/tmplimpl/template: Change defer RLock to RUnlock736f84b2d
hugolib: Add Unlock before paniccd4d82020
docs: Fix typo in Hugo's Security Model2b28e5a9c
deps: Update go-org to v1.1.0102ec2da7
commands: Modify gen chromastyles to output all CSS classesfeaa582cb
deps: Update to goldmark v1.1.28ee67dbeff
Fix query parameter handling in server fast render mode4a3f2427e
releaser: Prepare repository for 0.70.0-DEV4205844bc
releaser: Add release notes to /docs for release of 0.69.09b55d1358
releaser: Bump versions for release of 0.69.06f56a636f
Update 0.69.0-relnotes.md5ec7fa343
releaser: Add release notes for 0.69.0b7ff4dc23
docs: Regen docs helperda3c3e5fb
Squashed 'docs/' changes from 20d77860b..19f44e15030748decf
Merge commit 'da3c3e5fbd0de65f956618cd2e35401460a3cd02'095bf64c9
Collect HTML elements during the build to use in PurgeCSS etc.7791a804e
deps: Update to latest emoji packagec774b230e
Update hosting-on-aws-amplify.md2f721f8ec
Add basic "post resource publish support"8568928aa
tpl: Extend Jsonify to support options map1bc93021e
tpl: Extend Jsonify to support optional indent parameter7eba37ae9
Typo correctionefc61d6f3
commands: Use semver for min_version per recommendationsd8d6a25b5
modules: Fix hugo mod vendor for regular file mounts9f12be54e
Revert "Revert "common/herrors: Fix typos in comments""4437e918c
Revert "common/herrors: Fix typos in comments"4de3ecdc2
deps: Updateto gitmap v1.1.21123711b0
common/herrors: Fix typos in comments3d84ef972
Merge commit 'c494c37a4523fbf2db6274dc87e0877fd5bec24b'c494c37a4
Squashed 'docs/' changes from 2a0ea423d..20d77860b9c9987535
helpers: Fix TrimShortHTML4a39564ef
Fix IsDescendant/IsAncestor for overlapping section namesb6e097cfe
fix typo in getting started19a8accc9
releaser: Prepare repository for 0.69.0-DEV157669a0e
releaser: Add release notes to /docs for release of 0.68.38f49df946
releaser: Bump versions for release of 0.68.31a68ad4e3
releaser: Add release notes for 0.68.3 [ci skip]523d51948
Fix _build.list.local logic971b28904
releaser: Prepare repository for 0.69.0-DEV63bbb40df
releaser: Add release notes to /docs for release of 0.68.273ae6d581
releaser: Bump versions for release of 0.68.2e18a2ad3f
releaser: Add release notes for 0.68.2 [ci skip]cfa73050a
Fix cache reset for a page's collections on server live reload244e49c0e
releaser: Prepare repository for 0.69.0-DEV98dc46e1a
releaser: Add release notes to /docs for release of 0.68.187dd5725d
releaser: Bump versions for release of 0.68.18c6a03a92
releaser: Add release notes for 0.68.1 [ci skip]1ce3e7d52
releaser: Include "Revert" commits in change logc9dc316ad
Revert "resources: Add data context to the key in ExecuteAsTemplate"1664a0e89
releaser: Prepare repository for 0.69.0-DEV1e67854b1
releaser: Add release notes to /docs for release of 0.68.0e1b609af9
releaser: Bump versions for release of 0.68.08e5566af6
Release 0.68.01005f754e
Update 0.68.0-relnotes.mdefde7078e
releaser: Add release notes for 0.68.02ebb9f548
Fix Go build version7204b354a
Some minify configuration adjustments574c2959b
Add minify config99958f90f
Allow headless bundles to list pages via $page.Pages and $page.RegularPages1d91d8e14
Update to Go 1.14.1 and 1.13.995f492114
Fix GetTerms nil pointerc947351d7
Merge commit 'aa54803a84208816e9c678359bd3f86760484ce0'aa54803a8
Squashed 'docs/' changes from 988f7d5c2..2a0ea423dcc2a5d52a
Pass directory name to filters in LstatIfPossible in the same way as Readdir52c159c45
Update to goldmark 1.1.25.c7b6d74e8
resources: Fix scss vs css import regexp1a8af7d4f
Add workaround for regular CSS imports in SCSS03b93bb98
Add .RegularPagesRecursive94fb4dc3d
releaser: Prepare repository for 0.68.0-DEV4f44227bd
releaser: Add release notes to /docs for release of 0.67.199d36237c
releaser: Bump versions for release of 0.67.1e371162c3
releaser: Add release notes for 0.67.1 [ci skip]5eadc4c0a
metrics: Fix --templateMetricsHints18cb21ff2
resources: Add data context to the key in ExecuteAsTemplatedf298558a
Improve Tailwind/PostCSS error messagesb1106f871
deps: Update Blackfridayc0177fe2b
resources: Try to fix a Go 1.15 go vet error5914f91b6
Add languageDirection to language configuration5b4659fa0
releaser: Prepare repository for 0.68.0-DEV7f1da3efc
releaser: Add release notes to /docs for release of 0.67.0f7d4b01c6
releaser: Bump versions for release of 0.67.0b809b9680
Update 0.67.0-relnotes.mda9c91361c
releaser: Add release notes for 0.67.063393230c
docs: Doument the server config6b61f2a5b
Merge commit '14e369b961943a0b977776899e24e8bea63834df'14e369b96
Squashed 'docs/' changes from 341ecabb2..988f7d5c26cceef65c
Fix ambigous error on site.GetPageffcb4aeb8
Fix handling of HTML files without front matter8279d2e22
Support unComparable args of uniq/complement/inc4fa2f079
tpl: Fix error with unicode in file paths108314444
Add HTTP header support for the dev server51e178a6a
deploy: Add include and exclude support for remotecb12f41a9
releaser: Prepare repository for 0.67.0-DEV78c3c78fc
releaser: Add release notes to /docs for release of 0.66.0713132cd4
releaser: Bump versions for release of 0.66.0bbaefd7e3
Update 0.66.0-relnotes.mdcc1a71886
releaser: Add release notes for 0.66.06a34f88dc
Skip some tests on CircleCIae383f04c
{{ in }} should work with html.Template typeee31e61fb
docs: Regen CLI docs760a87a45
commands: Add --all flag to hugo mod clean3d3fa5c3f
Add build.UseResourceCacheWhenee3d02134
Update dependency list in README.md8947c3fa0
Fix ref/relref short lookup for pages in sub-folderd7798906d
tpl: Change error message on missing resource305ce1c9e
resources: Add full filename to image when processing fails3e9db2ad9
hugolib: Fix error handling in page collector449deb7f9
Update dependency list in README1746e8a9b
Fix ref/relRef regression for relative refs from bundles6f48146e7
identity: Fix potential infinite recursion in server change detectionb0d850321
Fix rebuild logic when editing template using a base templateb66d38c41
resources: Add basic @import support to resources.PostCSS05a74eaec
deploy: Implement include/exclude filters for deploy33ae62108
Update to Go 1.14 and 1.13.81352bc880
Add hugo.IsProduction functiond184e5059
tpl: Add math.Sqrt322c285ba
releaser: Prepare repository for 0.66.0-DEV211ba42a9
releaser: Add release notes to /docs for release of 0.65.30ac528d74
releaser: Bump versions for release of 0.65.3d8bde266c
releaser: Add release notes for 0.65.3 [ci skip]0bd6356c6
Fix panic when home page is draftedca68abf0b
Fix goldmark toc renderinga524124be
Fix crashes for 404 in IsAncestor etc.c1eb62512
releaser: Add release notes to /docs for release of 0.65.21510f0778
releaser: Bump versions for release of 0.65.2aa2ef4542
releaser: Add release notes for 0.65.2 [ci skip]76b2afe64
Apply missing go fmtf46053034
Fix panic on no output formats4c2a0de41
Fix panic in 404.Parent6be6684cc
releaser: Add release notes to /docs for release of 0.65.1dbaa15d40
releaser: Bump versions for release of 0.65.1a449e87da
releaser: Add release notes for 0.65.1 [ci skip]7ef5a4c83
hugolib: Fix 2 Paginator.Pages taxonomy regressionsa70bbd069
hugolib: Fix deletion of orphaned sections24afe2b82
releaser: Add release notes to /docs for release of 0.65.09fd7d3957
releaser: Bump versions for release of 0.65.0c45025cb9
releaser: Add release notes for 0.65.0a5ebdf7d1
docs: Regenerate CLI docs9bdedb251
Fix lazy publishing with publishResources=falsedce210ab5
modules: Improve "hugo mod clean"0b96aba02
commands: Add "hugo mod verify"fa520a2d9
Add Page.GetTerms4b670bc8c
Squashed 'docs/' changes from 16753a78d..341ecabb282029c1ec
Merge commit '4b670bc8cc38103c2c60e5090c2f56bf30832b8d'7489a8645
Add a list terms benchmarkda54787cf
Handle disabled RSS even if it's defined in outputsc7975b48b
Fix goMinorVersion on non-final Go releasesb2dcd53e3
Use the tree for taxonomy.Pages()36983e618
Add some cagegories to the site collections benchmarksd73e37387
tpl: Adjust the RSS taxonomy logicaa3e18305
tpl: Fix RSS template for the terms listing1b7acfe76
Fix taxonomy19e12caf8
Fix RenderString for pages without content20f2211fc
modules: Do not try to get local themes in "hugo mod get"a21a9373e
deps: Update goldmark-highlighting775c7c247
commands: Support "hugo mod get -u ./..."eada236f8
Introduce a tree map for all contente5329f13c
Another benchmark rename5b145ddc4
Rename the Edit benchmarks3c568ad01
markup/highlight: Fix chroma highlight54bdcaaca
Refactor a benchmark to make it runnable as test1622510a5
Add benchmark for content edits56d0b6588
Add "go mod verify" to build scripts75c3787fc
Add git to Dockerfile9babb1f0c
deps: Update go.sum8a5124d6b
commands: Rename doWithCommandeer to cfgInit/cfgSetAndInit898a0a96a
deps: Update golibsass3b721110d
Shuffle test files before insertion40ba7e6d6
Update to LibSass v3.6.34f43c9022
releaser: Prepare repository for 0.65.0-DEVc327e75d0
releaser: Add release notes to /docs for release of 0.64.18bd8d4fe9
releaser: Bump versions for release of 0.64.1ad7c38cd6
releaser: Add release notes for 0.64.1 [ci skip]b78576fd3
hugofs: Fix mount with hole regression18888e09b
Fix bundle resource ordering regression1e5eb8679
Merge commit '3c0036805d64fdd8290f1c4a31371780ff3ea365'3c0036805
Squashed 'docs/' changes from bd0e15bb6..16753a78d7f0ebd4a3
CONTRIBUTING: Fix note about CGO23ea43180
Update Go version requirement6a74cbe91
releaser: Prepare repository for 0.65.0-DEV241db8f78
releaser: Add release notes to /docs for release of 0.64.07624ab028
releaser: Bump versions for release of 0.64.08490a0aa9
Update 0.64.0-relnotes.mdbd731d27b
releaser: Add release notes for 0.64.080dd6ddde
Fix module mount in sub folder299731012
Mention a "no CGO rule"2bbc865f7
commands: Fix config environment handling0792cfa9f
Update to Go 1.13.7 and Go 1.12.16b3f0674b8
transform/livereloadinject: Add defer to livereload script tagef78a0d18
transform/livereloadinject: Don't use document.write to inject livereload585958645
hubolig: Add a render hook whitespace test2d159e9cc
Do not render alias paginator pages for non-HTML outputsf45cb3172
Fix base template handling with preceding comments49ef64720
modules: Fix "hugo mod get -u" with no arguments8f08cdd0a
transform/livereloadinject: Inject livereload script right after head if possible281abb18e
deps: Update goldmark to v1.1.22d8e685154
releaser: Prepare repository for 0.64.0-DEV934ee21fa
releaser: Add release notes to /docs for release of 0.63.2c7427a50e
releaser: Bump versions for release of 0.63.249e2931eb
releaser: Add release notes for 0.63.2 [ci skip]e8831a056
hubolib: Revert to .Type = "page" when empty74b6c4e5f
And now finally fix the 404 templates8df5d76e7
Fix 404 with base template regression8ae2c9c3d
releaser: Prepare repository for 0.64.0-DEVce9aceb74
releaser: Add release notes to /docs for release of 0.63.1fd32849bf
releaser: Bump versions for release of 0.63.1417f9ddf5
releaser: Add release notes for 0.63.1 [ci skip]0df7bd62d
deps: Make the build flags shared between sitesf441f6751
Fix baseof with regular define regression7ed22e9fb
Revert to minify v2.6.1fb974ae87
releaser: Prepare repository for 0.64.0-DEV745ddcbba
releaser: Add release notes to /docs for release of 0.63.03b3f5a259
releaser: Bump versions for release of 0.63.0d10ed683c
Release 0.63.019e387d18
releaser: Add release notes for 0.63.0cafb1d53c
docs, output: Add base template lookup variant to docs.json4f466db66
docs: Regen docs helper17af79a03
Fix 0.62.1 server rebuild slowdown regression2fefc0160
tpl/compare: Fix eq when > 2 args0c251be66
Allow multiple arguments in ne/ge/gt/le/lt functions Treat op arg1 arg2 arg3 ... as (arg1 op arg2) && (arg1 op arg3) and so on for ne/ge/gt/le/lt.836c24261
hugolib: Disable a test assertion on ARMc6d650c8c
tpl/tplimpl: Rework template management to get rid of concurrency issues8585b388d
deps: Update go-orgd61bee5e0
examples: Fix blog not building21ca2e9ce
Add support for newline characters in raw string shortcode3efa1d812
deps: Update github.com/alecthomas/chroma65ec8fe82
deps: Update minify to v2.7.2d3e8ab2e3
deps: Update Goldmark to v1.1.21da8145565
Allow raw string literals in shortcode params0c0bb3728
deps: Update github.com/gohugoio/testmodBuilderddd75f212
hugolib: Some more benchmark adjustments4ed6ebef4
hugolib: Adjust site benchmarks94cfdf6be
deps: Update direct dependencies451380177
minifiers: Update to new CSS config56354a63b
deps: Update to Minify v2.7.0b9b73a2f6
Revert "Add support for freebsd/arm64"aead8108b
Add support for freebsd/arm641cf235412
tpl: Put Go's internal template funcs in Hugo's mapdf6e9efd8
Update releasenotes_writer.goea05c0e84
hugolib: Add a benchmark with lots of templates273047b5b
releaser: Prepare repository for 0.63.0-DEV83e501849
releaser: Add release notes to /docs for release of 0.62.212230b689
releaser: Bump versions for release of 0.62.2afdb180e2
releaser: Add release notes for 0.62.2 [ci skip]196a9df58
hugolib: Fix relative .Page.GetPage from bundle9b6e61464
markup/goldmark: Adjust auto ID space handlingd62ede8e9
docs: Document the new autoHeadingIDType setting81b7e48a5
docs: Regenerate docshelper16e7c1120
markup/goldmark: Add an optional Blackfriday auto ID strategy8f071fc15
markup/goldmark: Make the autoID type config a string469351d5b
Merge commit '26f1458a2df6b55eee3a5de46f5fec23a43a7c7d'26f1458a2
Squashed 'docs/' changes from 54f0e8776..bd0e15bb65ee1f0876
markup/goldmark: Simplify codea82d2700f
markup/goldmark: Make auto IDs GitHub compatibleae816452b
releaser: Prepare repository for 0.63.0-DEVa1518704a
releaser: Add release notes to /docs for release of 0.62.13a21a1708
releaser: Bump versions for release of 0.62.1451746ddd
releaser: Add release notes for 0.62.1 [ci skip]ff6253bc7
Support files in content mountsaa4ccb8a1
Update alpine base image in Dockerfile to 3.115509954c7
hugolib: Fix inline shortcode regression6b59b64f0
releaser: Prepare repository for 0.63.0-DEV6608f1557
releaser: Add release notes to /docs for release of 0.62.0b361d9a46
releaser: Bump versions for release of 0.62.0592a7d104
Release 0.62.093216fda7
releaser: Add release notes for 0.62.08a4005cf2
Squashed 'docs/' changes from af4b7ac5b..54f0e8776740b72558
Merge commit '8a4005cf2b0ef34265ff8051a6b76226685fc226'1fb17be9a
deps: Update Goldmark to v1.1.1851d89dab1
deps: Update go-orgc8bfe47c6
docs: More on hooks50cc7fe54
tpl: Do not return any value in errorf1773d71d5
tpl: Add a warnf template func8a58ebb31
hugolib: Improve error and reload handling of hook templates in server mode045368381
deps: Update to Goldmark v1.1.1755c29d4de
docs: Regen docshelperccb1bf1ab
tpl/collections: Some more params merge adjustmentsa67d95fe1
Preserve HTML Text for image render hooksad6504e6b
Fix abs path handling in module mounts158e7ec20
Fix incorrect MIME type from image/jpg to image/jpegeef934ae7
deps: Update Goldmark00954c5d1
Preserve HTML Text for link render hooks1b785a7a6
tpl/collections: Fix merge vs Paramsd20ca3700
tpl: Get rid of the custom template truth logic3e316155c
docs: Footnotee625088ef
Add render template hooks for links and images67f3aa72c
Merge commit '2e711a28c71e8667258e5ab824f9b9a71c261b0a'2e711a28c
Squashed 'docs/' changes from 51c4f3184..af4b7ac5b0947cf958
Enhance accessibility to issues3c24ae030
hugolib: Fix test03d6960a1
deps: Re-introduce the correct version of Goldmark92c7f7ab8
tpl: Add some commentsa03c631c4
Rework template handling for function and map lookups167c01530
Create lightweight forks of text/template and html/template4c804319f
markup/tableofcontents: Add config option for ordered list186a5ebfc
releaser: Prepare repository for 0.62.0-DEV9b445b9da
releaser: Add release notes to /docs for release of 0.61.03af783966
releaser: Bump versions for release of 0.61.031f322a61
Release 0.61.038c60f2be
releaser: Add release notes for 0.61.03cc217a65
deps: Update Goldmark5f8c2818f
Deprecate Ace and Amberc5f2f5837
markup: Add typographic chars from goldmark to toc0efb00c2a
tpl/partials: Allow any key type in partialCached40a092b06
markup: Reimplement pygmentsCodefencesGuessSyntaxd534ce942
deps: Update Goldmarka6b6b135a
releaser: Prepare repository for 0.61.0-DEV960667561
releaser: Add release notes to /docs for release of 0.60.16c0556308
releaser: Bump versions for release of 0.60.1f5250ec09
releaser: Add release notes for 0.60.1 [ci skip]86a5b59f6
deps: Update minifybb80fff69
Fix headless regression347cfb0c1
deps: Update Goldmarkb60ae35b9
hugolib: Fix timeout number parsing for YAML/JSON config003ba5b10
releaser: Prepare repository for 0.61.0-DEVf2dea9b03
releaser: Add release notes to /docs for release of 0.60.0763b0dcb9
releaser: Bump versions for release of 0.60.0b2969b7a7
Release 0.60.060fea562c
releaser: Add release notes for 0.60.014a1de14f
modules: Add some more output if modules download takes timedcde8af8c
Add some internal template image testsc91970c08
tpl/tplimpl: Featured and Site.Params image support for Schemadd1e5fc0b
hugolib: Disable test assertion on Windowsb0c7749fa
deps: Update Goldmark25a6b3369
tpl/tplimpl: Add support for featured and global image to OpenGraph template017664392
hugolib: Fix cascade in server modeda5352359
hugolib: Fix .Sections vs siblings96f09659c
Fix language handling in ExecuteAsTemplate03b369e67
hugolib: Adjust .Site.Permalinks deprecation level69fd1c60d
hugolib: Remove .Site.Ref/RelRef33d733300
Deprecate mmarke3451371b
hugolib: Fix recently broken timeout config5c5231e09
commands: Use HUGO_ENV if setd6f7a9e28
resources/images: Make the image cache more robust031f948f8
Update to Go 1.13.4 and Go 1.12.1371597bd1a
mage: Restore -v behavioura8e9f8389
hugolib: Increase default timeout value to 30s03e2d7462
hubolig: Fix potential data raceea96e1dc5
Revert "deps: Update Goldmark"822191286
deps: Update Goldmark8beaa4c25
mage: Fix mage check on darwin and add debugging output8a89b8582
commands: Fix jekyll metadata import on individual postse1175ae83
Improve grammar in README.mda2d77f4a8
markup/highlight: Replace the temp for with a dependencyb546417a2
deps: Update Chroma4175b0468
deps: Update Goldmark55f951cbb
markup/tableofcontents: GoDoc etc.20f351ee4
Minor cleanupsbfb9613a1
Add Goldmark as the new default markdown handlera3fe5e5e3
Fix Params case handling in the index, sort and where funccd07e6d57
Fix GetPage Params case issue628efd6e2
common/para: Add parallel task executor helper2dcc1318d
Add some more output if loading modules takes time14a985f8a
Update homepage.md0cf85c071
hugolib: Add a benchmark20ec9fa2b
modules: Do not check for remote modules if main project is vendored812688fc2
hugolib: Fix emoji handling inside shortcodesa2670bf46
tpl/collections: Allow dict to create nested structures1a36ce9b0
commands: Add hint when dir not empty90d0cdf23
tpl/collections: Add collections.Reverse95ef93be6
tpl/collections: Make index work with slice as the last arg79355043e
Merge commit 'efc0b1bb6c6564f54d596467dbc6a18cb206954e'efc0b1bb6
Squashed 'docs/' changes from 723da4a37..51c4f3184d1d1f240a
hubolib: Headless bundles should not be listed in .Pages70a1aa345
Support Go time format strings in permalinkscafecca44
travis: Increase timeout to 30000 for mage -v check5f6b6ec68
Prepare for Goldmark366ee4d8d
deps: Update quicktestc26d00db6
hugolib: Fix ref/relref anhcor handling8483b53ae
deps: Update to Chroma v0.6.9 for Java lexer fix9f46a72c7
tpl/collections: Add some index map test cases9abd39678
helpers: Use pointer receiver for ContentSpecad4c56b55
travis: Allow arm64 to fail3717db1f9
minifiers: Add a JSON roundtrip testae4fde086
Update .travis.yml for arm64 support, etc.c6d69d0c9
mage: Skip Test386 on non-AMD64 architecturesc3d433af5
Update past go-cmp's checkptr fix07a203406
releaser: Prepare repository for 0.60.0-DEVd5dab232c
releaser: Add release notes to /docs for release of 0.59.1e04a22c5e
releaser: Bump versions for release of 0.59.1d14265da8
releaser: Add release notes for 0.59.1 [ci skip]33c474b9b
hugofs: Fix crash in multilingual content fsed2682325
Dockerfile: Switch to mage builds, various optimizations66fe68ffc
resources/images: Add exception for new test imagec5e1e8241
Adjust benchmark templatesbaa975082
deps: Update to Chroma v0.6.8 to fix a crash3e8b5a5c0
deps: Update quickteste6aa6edb4
Do not attempt to build if there is no config file6bcc5ad8b
releaser: Prepare repository for 0.60.0-DEV1dd0c69c7
releaser: Add release notes to /docs for release of 0.59.0b084af4bf
releaser: Bump versions for release of 0.59.00237d4595
Release 0.59.0109ac877c
releaser: Add release notes for 0.59.05ac0f751a
Squashed 'docs/' changes from 0584815c8..723da4a37de8ca7e4d
Merge commit '5ac0f751aa47e52625662215f66efa99a6abfc2e'5070ba6c9
Squashed 'docs/' changes from fdea5430f..0584815c8ec5962278
Merge commit '5070ba6c9e6c492deade3c30cfe769b9dbf7151d'b9bd35d72
Squashed 'docs/' content from commit fdea5430f27aef3f1f
Merge commit 'b9bd35d72e14932fb6588ff62b90cddef0a060fc' as 'docs' git-subtree-dir: docs git-subtree-split: 9b06f951e61081c503927bb772b75f93504aeba8
This commit is contained in:
parent
2658a71e1b
commit
8b9803425e
475 changed files with 7889 additions and 4814 deletions
82
.cspell.json
82
.cspell.json
|
@ -20,13 +20,11 @@
|
|||
],
|
||||
"ignoreRegExpList": [
|
||||
"# cspell: ignore fenced code blocks",
|
||||
"^(\\s*`{3,}).*[\\s\\S]*?^\\1",
|
||||
"^(\\s*`{3,}).*[\\s\\S]*?^\\1$",
|
||||
"# cspell: ignore words joined with dot",
|
||||
"\\w+\\.\\w+",
|
||||
"# cspell: ignore strings within backticks",
|
||||
"`.+`",
|
||||
"# cspell: ignore strings within single quotes",
|
||||
"'.+'",
|
||||
"# cspell: ignore strings within double quotes",
|
||||
"\".+\"",
|
||||
"# cspell: ignore strings within brackets",
|
||||
|
@ -42,14 +40,11 @@
|
|||
],
|
||||
"language": "en",
|
||||
"words": [
|
||||
"antialiasing",
|
||||
"codeowners",
|
||||
"composability",
|
||||
"configurators",
|
||||
"defang",
|
||||
"deindent",
|
||||
"downscale",
|
||||
"downscaled",
|
||||
"downscaling",
|
||||
"exif",
|
||||
"geolocalized",
|
||||
|
@ -57,60 +52,99 @@
|
|||
"marshal",
|
||||
"marshaling",
|
||||
"multihost",
|
||||
"multiplatfom",
|
||||
"performantly",
|
||||
"preconfigured",
|
||||
"prerendering",
|
||||
"redirection",
|
||||
"redirections",
|
||||
"shortcode",
|
||||
"shortcodes",
|
||||
"subexpression",
|
||||
"subexpressions",
|
||||
"suppressable",
|
||||
"suppressible",
|
||||
"templating",
|
||||
"transpile",
|
||||
"transpiles",
|
||||
"unmarshal",
|
||||
"unmarshals",
|
||||
"unmarshaling",
|
||||
"unmarshals",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"# cspell: ignore hugo terminology",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"attrlink",
|
||||
"canonify",
|
||||
"codeowners",
|
||||
"eturl",
|
||||
"getenv",
|
||||
"gohugo",
|
||||
"gohugoio",
|
||||
"keyvals",
|
||||
"leftdelim",
|
||||
"linkify",
|
||||
"numworkermultiplier",
|
||||
"rightdelim",
|
||||
"shortcode",
|
||||
"stringifier",
|
||||
"struct",
|
||||
"toclevels",
|
||||
"zgotmplz",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"# cspell: ignore foreign language words",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"bezpieczeństwo",
|
||||
"buch",
|
||||
"descripción",
|
||||
"dokumentation",
|
||||
"erklärungen",
|
||||
"libros",
|
||||
"mercredi",
|
||||
"miesiąc",
|
||||
"miesiąc",
|
||||
"miesięcy",
|
||||
"miesiąca",
|
||||
"miesiące",
|
||||
"miesięcy",
|
||||
"misérables",
|
||||
"mittwoch",
|
||||
"muchos",
|
||||
"novembre",
|
||||
"otro",
|
||||
"pocos",
|
||||
"produkte",
|
||||
"projekt",
|
||||
"prywatność",
|
||||
"referenz",
|
||||
"régime",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"# cspell: ignore proper nouns",
|
||||
"# cspell: ignore names",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"Atishay",
|
||||
"Cosette",
|
||||
"Eliott",
|
||||
"Furet",
|
||||
"Gregor",
|
||||
"Jaco",
|
||||
"Lanczos",
|
||||
"Ninke",
|
||||
"Noll",
|
||||
"Pastorius",
|
||||
"Samsa",
|
||||
"Stucki",
|
||||
"Thénardier",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"# cspell: ignore operating systems and software packages",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"asciidoctor",
|
||||
"brotli",
|
||||
"cifs",
|
||||
"corejs",
|
||||
"disqus",
|
||||
"docutils",
|
||||
"dpkg",
|
||||
"doas",
|
||||
"eopkg",
|
||||
"gitee",
|
||||
"gohugoio",
|
||||
"goldmark",
|
||||
"KaTeX",
|
||||
"katex",
|
||||
"kubuntu",
|
||||
"lubuntu",
|
||||
"MathJax",
|
||||
"mathjax",
|
||||
"nosql",
|
||||
"pandoc",
|
||||
"pkgin",
|
||||
|
@ -119,21 +153,19 @@
|
|||
"# ----------------------------------------------------------------------",
|
||||
"# cspell: ignore miscellaneous",
|
||||
"# ----------------------------------------------------------------------",
|
||||
"achristie",
|
||||
"ddmaurier",
|
||||
"dring",
|
||||
"getenv",
|
||||
"gohugo",
|
||||
"inor",
|
||||
"jausten",
|
||||
"jdoe",
|
||||
"jsmith",
|
||||
"milli",
|
||||
"rgba",
|
||||
"rsmith",
|
||||
"stringifier",
|
||||
"struct",
|
||||
"tdewolff",
|
||||
"tjones",
|
||||
"toclevels",
|
||||
"vals",
|
||||
"xfeff",
|
||||
"zgotmplz"
|
||||
"wcag",
|
||||
"xfeff"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
bgcolor = "#ffffff"
|
||||
|
||||
[[banners]]
|
||||
name = "CloudCannon"
|
||||
link = "https://cloudcannon.com/hugo-cms/"
|
||||
logo = "/images/sponsors/cloudcannon-white.svg"
|
||||
utm_campaign = "HugoSponsorship"
|
||||
utm_source = "sponsor"
|
||||
utm_content = "gohugo"
|
||||
bgcolor = "#034AD8"
|
||||
name = "Route4Me"
|
||||
link = "https://route4me.com"
|
||||
title = "Route Planning & Route Optimization Software"
|
||||
utm_campaign = "hugosponsor"
|
||||
bgcolor = "#334799"
|
||||
link_attr = "style='color: #ffffff; font-weight: bold; text-decoration: none; text-align: center'"
|
||||
|
||||
[[banners]]
|
||||
name = "Your Company?"
|
||||
|
@ -20,3 +19,4 @@
|
|||
utm_campaign = "hugosponsor"
|
||||
show_on_hover = true
|
||||
bgcolor = "#4e4f4f"
|
||||
link_attr = "style='color: #ffffff; font-weight: bold; text-decoration: none; text-align: center'"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- /* Last modified: 2023-09-04T09:23:04-07:00 */}}
|
||||
{{- /* Last modified: 2024-04-26T13:54:00-07:00 */}}
|
||||
|
||||
{{- /*
|
||||
Copyright 2023 Veriphor LLC
|
||||
|
@ -118,7 +118,7 @@ either of these shortcodes in conjunction with this render hook.
|
|||
{{- $attrs = merge $attrs (dict "rel" "external") }}
|
||||
{{- else }}
|
||||
{{- with $u.Path }}
|
||||
{{- with $p := or ($.Page.GetPage .) ($.Page.GetPage (strings.TrimRight "/" .)) }}
|
||||
{{- with $p := or ($.PageInner.GetPage .) ($.PageInner.GetPage (strings.TrimRight "/" .)) }}
|
||||
{{- /* Destination is a page. */}}
|
||||
{{- $href := .RelPermalink }}
|
||||
{{- with $u.RawQuery }}
|
||||
|
@ -137,7 +137,7 @@ either of these shortcodes in conjunction with this render hook.
|
|||
{{- end }}
|
||||
{{- $attrs = dict "href" $href }}
|
||||
{{- else }}
|
||||
{{- with $.Page.Resources.Get $u.Path }}
|
||||
{{- with $.PageInner.Resources.Get $u.Path }}
|
||||
{{- /* Destination is a page resource; drop query and fragment. */}}
|
||||
{{- $attrs = dict "href" .RelPermalink }}
|
||||
{{- else }}
|
||||
|
@ -185,14 +185,14 @@ either of these shortcodes in conjunction with this render hook.
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Title }}
|
||||
{{- $attrs = merge $attrs (dict "title" .) }}
|
||||
{{- end -}}
|
||||
{{- $attrs = merge $attrs (dict "title" (.Title | transform.HTMLEscape)) }}
|
||||
|
||||
{{- /* Render anchor element. */ -}}
|
||||
<a
|
||||
{{- range $k, $v := $attrs }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- if $v }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
>{{ .Text | safeHTML }}</a>
|
||||
|
||||
|
|
|
@ -1,38 +1,68 @@
|
|||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Site.Title }} – {{ .Title }}</title>
|
||||
<title>Hugo News</title>
|
||||
<description>Recent news about Hugo, a static site generator written in Go, optimized for speed and designed for flexibility.</description>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent Hugo news from gohugo.io</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
<image>
|
||||
<url>{{ "img/hugo.png" | absURL }}</url>
|
||||
<title>GoHugo.io</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
</image>
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range first 50 (where .Site.RegularPages "Type" "in" (slice "news" "showcase")) }}
|
||||
<item>
|
||||
<title>{{ .Section | title }}: {{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>
|
||||
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
|
||||
{{ with $img }}
|
||||
{{ $img := .Resize "640x" }}
|
||||
{{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
|
||||
{{ end }}
|
||||
{{ .Content | html }}
|
||||
</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
<generator>Hugo {{ hugo.Version }}</generator>
|
||||
<language>{{ or site.Language.LanguageCode site.Language.Lang }}</language>
|
||||
{{- with site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>
|
||||
{{- end }}
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end }}
|
||||
|
||||
{{- $news_items := slice }}
|
||||
|
||||
{{- /* Get releases from GitHub. */}}
|
||||
{{- $u := "https://api.github.com/repos/gohugoio/hugo/releases" }}
|
||||
{{- $releases := partial "utilities/get-remote-data.html" $u }}
|
||||
{{- $releases = where $releases "draft" false }}
|
||||
{{- $releases = where $releases "prerelease" false }}
|
||||
{{- range $releases | first 20 }}
|
||||
{{- $summary := printf
|
||||
"Hugo %s was released on %s. See [release notes](%s) for details."
|
||||
.tag_name
|
||||
(.published_at | time.AsTime | time.Format "2 Jan 2006")
|
||||
.html_url
|
||||
}}
|
||||
{{- $ctx := dict
|
||||
"PublishDate" (.published_at | time.AsTime)
|
||||
"Title" (printf "Release %s" .name)
|
||||
"Permalink" .html_url
|
||||
"Section" "news"
|
||||
"Summary" ($summary | $.Page.RenderString)
|
||||
}}
|
||||
{{- $news_items = $news_items | append $ctx }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Get content pages from news section. */}}
|
||||
{{- range where site.RegularPages "Section" "news" }}
|
||||
{{- $ctx := dict
|
||||
"PublishDate" .PublishDate
|
||||
"Title" .Title
|
||||
"RelPermalink" .RelPermalink
|
||||
"Section" "news"
|
||||
"Summary" .Summary
|
||||
"Params" (dict "description" .Description)
|
||||
}}
|
||||
{{- $news_items = $news_items | append $ctx }}
|
||||
{{- end }}
|
||||
{{- /* Sort, limit, and render lastBuildDate. */}}
|
||||
{{- $limit := cond (gt site.Config.Services.RSS.Limit 1) site.Config.Services.RSS.Limit 999 }}
|
||||
{{- $news_items = sort $news_items "PublishDate" "desc" | first $limit }}
|
||||
<lastBuildDate>{{ (index $news_items 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
|
||||
|
||||
{{- /* Render items. */}}
|
||||
{{- range $news_items }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
|
||||
</item>
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
||||
</rss>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
{{/* Get releases from GitHub. */}}
|
||||
{{ $u := "https://api.github.com/repos/gohugoio/hugo/releases" }}
|
||||
{{ $releases := partial "inline/get-remote-data.html" $u }}
|
||||
{{ $releases := partial "utilities/get-remote-data.html" $u }}
|
||||
{{ $releases = where $releases "draft" false }}
|
||||
{{ $releases = where $releases "prerelease" false }}
|
||||
{{ range $releases | first 20 }}
|
||||
|
@ -55,16 +55,3 @@
|
|||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/inline/get-remote-data.html" }}
|
||||
{{ $u := . }}
|
||||
{{ $r := "" }}
|
||||
{{ with $r = resources.GetRemote $u }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "%s" . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get remote resource %q" $u }}
|
||||
{{ end }}
|
||||
{{ return ($r | transform.Unmarshal) }}
|
||||
{{ end }}
|
||||
|
|
68
_vendor/github.com/gohugoio/gohugoioTheme/layouts/news/list.xml
generated
Normal file
68
_vendor/github.com/gohugoio/gohugoioTheme/layouts/news/list.xml
generated
Normal file
|
@ -0,0 +1,68 @@
|
|||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Hugo News</title>
|
||||
<description>Recent news about Hugo, a static site generator written in Go, optimized for speed and designed for flexibility.</description>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<generator>Hugo {{ hugo.Version }}</generator>
|
||||
<language>{{ or site.Language.LanguageCode site.Language.Lang }}</language>
|
||||
{{- with site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>
|
||||
{{- end }}
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end }}
|
||||
|
||||
{{- $news_items := slice }}
|
||||
|
||||
{{- /* Get releases from GitHub. */}}
|
||||
{{- $u := "https://api.github.com/repos/gohugoio/hugo/releases" }}
|
||||
{{- $releases := partial "utilities/get-remote-data.html" $u }}
|
||||
{{- $releases = where $releases "draft" false }}
|
||||
{{- $releases = where $releases "prerelease" false }}
|
||||
{{- range $releases | first 20 }}
|
||||
{{- $summary := printf
|
||||
"Hugo %s was released on %s. See [release notes](%s) for details."
|
||||
.tag_name
|
||||
(.published_at | time.AsTime | time.Format "2 Jan 2006")
|
||||
.html_url
|
||||
}}
|
||||
{{- $ctx := dict
|
||||
"PublishDate" (.published_at | time.AsTime)
|
||||
"Title" (printf "Release %s" .name)
|
||||
"Permalink" .html_url
|
||||
"Section" "news"
|
||||
"Summary" ($summary | $.Page.RenderString)
|
||||
}}
|
||||
{{- $news_items = $news_items | append $ctx }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Get content pages from news section. */}}
|
||||
{{- range .Pages }}
|
||||
{{- $ctx := dict
|
||||
"PublishDate" .PublishDate
|
||||
"Title" .Title
|
||||
"RelPermalink" .RelPermalink
|
||||
"Section" "news"
|
||||
"Summary" .Summary
|
||||
"Params" (dict "description" .Description)
|
||||
}}
|
||||
{{- $news_items = $news_items | append $ctx }}
|
||||
{{- end }}
|
||||
{{- /* Sort, limit, and render lastBuildDate. */}}
|
||||
{{- $limit := cond (gt site.Config.Services.RSS.Limit 1) site.Config.Services.RSS.Limit 999 }}
|
||||
{{- $news_items = sort $news_items "PublishDate" "desc" | first $limit }}
|
||||
<lastBuildDate>{{ (index $news_items 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
|
||||
|
||||
{{- /* Render items. */}}
|
||||
{{- range $news_items }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
|
||||
</item>
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="w-100 center pt5">
|
||||
<div class="w-100 w-40-l tc center">
|
||||
<img src="/images/GitHub-Mark-64px.png" alt="Github Logo" class="tc center">
|
||||
<img src="/images/Github.svg" alt="Github Logo" class="tc center">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -25,26 +25,30 @@
|
|||
{{ $query_params := .query_params | default "" }}
|
||||
{{ $url := printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }}
|
||||
{{ $logo := resources.Get .logo }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }}
|
||||
<a
|
||||
href="{{ $url }}"
|
||||
onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
|
||||
class="w-100 grow pa3{{ if .show_on_hover }}
|
||||
show-on-hover
|
||||
{{ end }}"
|
||||
style="">
|
||||
{{ with $logo }}{{ .Content | safeHTML }}{{ end }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<a
|
||||
href="{{ $url }}"
|
||||
class="w-100 grow pa3{{ if .show_on_hover }}
|
||||
show-on-hover
|
||||
{{ end }}">
|
||||
{{ with $logo }}{{ .Content | safeHTML }}{{ end }}
|
||||
</a>
|
||||
{{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }}
|
||||
{{ $classes := "" }}
|
||||
{{ if .show_on_hover }}
|
||||
{{ $classes = printf "%s show-on-hover" $classes }}
|
||||
{{ end }}
|
||||
{{ if $isFooter }}
|
||||
{{ $classes = printf "%s f3" $classes }}
|
||||
{{ else }}
|
||||
{{ $classes = printf "%s f1" $classes }}
|
||||
{{ end }}
|
||||
<a
|
||||
href="{{ $url }}"
|
||||
title="{{ .title | default .name }}"
|
||||
{{ if hugo.IsProduction }}
|
||||
onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
|
||||
{{ end }}
|
||||
class="w-100 grow pa3 {{ $classes }}"
|
||||
{{ with .link_attr }}{{ . | safeHTMLAttr }}{{ end }}>
|
||||
{{ with $logo }}
|
||||
{{ .Content | safeHTML }}
|
||||
{{ else }}
|
||||
{{ .name }}
|
||||
{{ end }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
23
_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/utilities/get-remote-data.html
generated
Normal file
23
_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/utilities/get-remote-data.html
generated
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Parses the serialized data from the given URL and returns a map or an array.
|
||||
|
||||
Supports CSV, JSON, TOML, YAML, and XML.
|
||||
|
||||
@param {string} . The URL from which to retrieve the serialized data.
|
||||
@returns {any}
|
||||
|
||||
@example {{ partial "get-remote-data.html" "https://example.org/foo.json" }}
|
||||
*/}}
|
||||
|
||||
{{ $url := . }}
|
||||
{{ $data := dict }}
|
||||
{{ with resources.GetRemote $url }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "%s" . }}
|
||||
{{ else }}
|
||||
{{ $data = .Content | transform.Unmarshal }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get remote resource %q" $url }}
|
||||
{{ end }}
|
||||
{{ return $data }}
|
36
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/eturl.html
generated
Normal file
36
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/eturl.html
generated
Normal file
|
@ -0,0 +1,36 @@
|
|||
{{- /*
|
||||
Renders an absolute URL to the source code for an embedded template.
|
||||
|
||||
Accepts either positional or named parameters, and depends on the
|
||||
embedded_templates.toml file in the data directory.
|
||||
|
||||
@param {string} filename The embedded template's file name, excluding extension.
|
||||
|
||||
@returns template.HTML
|
||||
|
||||
@example {{% et robots.txt %}}
|
||||
@example {{% et filename=robots.txt %}}
|
||||
*/}}
|
||||
|
||||
{{- /* Get parameters. */}}
|
||||
{{- $filename := "" -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $filename = .Get "filename" -}}
|
||||
{{- else -}}
|
||||
{{- $filename = .Get 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Render. */}}
|
||||
{{- with $filename -}}
|
||||
{{- with site.Data.embedded_template_urls -}}
|
||||
{{- with index . $filename -}}
|
||||
{{- urls.JoinPath site.Data.embedded_template_urls.base_url . -}}
|
||||
{{- else -}}
|
||||
{{- errorf "The %q shortcode was unable to find a URL for the embedded template named %q. Check the name. See %s" $.Name $filename $.Position -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "The %q shortcode was unable to find the embedded_template_urls data file in the site's data directory. See %s" $.Name $.Position -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "The %q shortcodes requires a named or positional parameter, the file name of the embedded template, excluding its extension. See %s" .Name .Position -}}
|
||||
{{- end -}}
|
|
@ -119,8 +119,8 @@ Renders the given image using the given filter, if any.
|
|||
{{- end }}
|
||||
|
||||
{{- $validFilters := slice
|
||||
"autoorient" "brightness" "colorbalance" "colorize" "contrast" "gamma"
|
||||
"gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay"
|
||||
"autoorient" "brightness" "colorbalance" "colorize" "contrast" "dither"
|
||||
"gamma" "gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay"
|
||||
"padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
|
||||
"unsharpmask"
|
||||
}}
|
||||
|
@ -198,6 +198,8 @@ Renders the given image using the given filter, if any.
|
|||
{{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }}
|
||||
{{- template "validate-arg-value" $ctx }}
|
||||
{{- $f = images.Contrast (index $filterArgs 0) }}
|
||||
{{- else if eq $filter "dither" }}
|
||||
{{- $f = images.Dither }}
|
||||
{{- else if eq $filter "gamma" }}
|
||||
{{- $ctx = merge $ctx (dict "argsRequired" 1) }}
|
||||
{{- template "validate-arg-count" $ctx }}
|
||||
|
@ -354,7 +356,7 @@ Renders the given image using the given filter, if any.
|
|||
{{- if $u.IsAbs }}
|
||||
{{- with resources.GetRemote $u.String }}
|
||||
{{- with .Err }}
|
||||
{{- errorf "%s" }}
|
||||
{{- errorf "%s" . }}
|
||||
{{- else }}
|
||||
{{- /* This is a remote resource. */}}
|
||||
{{- $r = . }}
|
||||
|
|
|
@ -27,9 +27,7 @@ button will be hidden if any of the following conditions is true:
|
|||
{{- warnf "This call to the %q shortcode should be removed: %s. The button is now hidden because the specified version (%s) is older than the display threshold." $.Name $.Position $version }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
<button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow">
|
||||
<a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}">New in v{{ $version }}</a>
|
||||
</button>
|
||||
<a class="dib f5 fw6 ba bw1 b--gray ph2 mt1" href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}">New in v{{ $version }}</a>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- errorf "The %q shortcode requires a positional parameter (version). See %s" .Name .Position }}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 924 B |
1
_vendor/github.com/gohugoio/gohugoioTheme/static/images/Github.svg
generated
Normal file
1
_vendor/github.com/gohugoio/gohugoioTheme/static/images/Github.svg
generated
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24"><path d="M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12"/></svg>
|
After Width: | Height: | Size: 795 B |
|
@ -1 +1 @@
|
|||
# github.com/gohugoio/gohugoioTheme v0.0.0-20240201183016-8e648a3b5342
|
||||
# github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB |
|
@ -1,6 +1,6 @@
|
|||
[[docs]]
|
||||
identifier = 'about'
|
||||
name = 'About Hugo'
|
||||
name = 'About'
|
||||
pageRef = '/about/'
|
||||
weight = 10
|
||||
|
||||
|
@ -15,60 +15,60 @@ name = 'Getting started'
|
|||
weight = 30
|
||||
identifier = 'getting-started'
|
||||
pageRef = '/getting-started/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Quick reference'
|
||||
weight = 40
|
||||
identifier = 'quick-reference'
|
||||
pageRef = '/quick-reference/'
|
||||
post = 'break'
|
||||
|
||||
[[docs]]
|
||||
name = 'Content management'
|
||||
weight = 40
|
||||
weight = 50
|
||||
identifier = 'content-management'
|
||||
post = 'expanded'
|
||||
pageRef = '/content-management/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Templates'
|
||||
weight = 50
|
||||
weight = 60
|
||||
identifier = 'templates'
|
||||
pageRef = '/templates/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Functions'
|
||||
weight = 60
|
||||
weight = 70
|
||||
identifier = 'functions'
|
||||
pageRef = '/functions/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Methods'
|
||||
weight = 70
|
||||
weight = 80
|
||||
identifier = 'methods'
|
||||
pageRef = '/methods/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Quick reference'
|
||||
weight = 80
|
||||
identifier = 'quick-reference'
|
||||
pageRef = '/quick-reference/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Variables'
|
||||
weight = 85
|
||||
identifier = 'variables'
|
||||
pageRef = '/variables/'
|
||||
name = 'Render hooks'
|
||||
weight = 90
|
||||
identifier = 'render-hooks'
|
||||
pageRef = '/render-hooks/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Hugo Modules'
|
||||
weight = 90
|
||||
weight = 100
|
||||
identifier = 'modules'
|
||||
pageRef = '/hugo-modules/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Hugo Pipes'
|
||||
weight = 100
|
||||
weight = 110
|
||||
identifier = 'hugo-pipes'
|
||||
pageRef = '/hugo-pipes/'
|
||||
|
||||
[[docs]]
|
||||
name = 'CLI'
|
||||
weight = 110
|
||||
weight = 120
|
||||
post = 'break'
|
||||
identifier = 'commands'
|
||||
pageRef = '/commands/'
|
||||
|
@ -77,25 +77,25 @@ pageRef = '/commands/'
|
|||
|
||||
[[docs]]
|
||||
name = 'Troubleshooting'
|
||||
weight = 120
|
||||
weight = 130
|
||||
identifier = 'troubleshooting'
|
||||
pageRef = '/troubleshooting/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Developer tools'
|
||||
weight = 130
|
||||
weight = 140
|
||||
identifier = 'developer-tools'
|
||||
pageRef = '/tools/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Hosting and deployment'
|
||||
weight = 140
|
||||
weight = 150
|
||||
identifier = 'hosting-and-deployment'
|
||||
pageRef = '/hosting-and-deployment/'
|
||||
|
||||
[[docs]]
|
||||
name = 'Contribute'
|
||||
weight = 150
|
||||
weight = 160
|
||||
post = 'break'
|
||||
identifier = 'contribute'
|
||||
pageRef = '/contribute/'
|
||||
|
|
|
@ -15,7 +15,7 @@ features:
|
|||
- heading: Shortcodes
|
||||
image_path: /images/icon-shortcodes.svg
|
||||
tagline: Hugo's shortcodes are Markdown's hidden superpower.
|
||||
copy: We love the beautiful simplicity of markdown’s syntax, but there are times when we want more flexibility. Hugo shortcodes allow for both beauty and flexibility.
|
||||
copy: We love the beautiful simplicity of Markdown’s syntax, but there are times when we want more flexibility. Hugo shortcodes allow for both beauty and flexibility.
|
||||
|
||||
- heading: Built-in Templates
|
||||
image_path: /images/icon-built-in-templates.svg
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
title: About Hugo
|
||||
linkTitle: Overview
|
||||
description: Hugo's features, roadmap, license, and motivation.
|
||||
linkTitle: In this section
|
||||
description: Learn about Hugo and its features, security model, and privacy protections.
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
identifier: about-hugo-overview
|
||||
identifier: about-hugo-in-this-section
|
||||
parent: about
|
||||
weight: 10
|
||||
weight: 10
|
||||
aliases: [/about-hugo/,/docs/]
|
||||
---
|
||||
|
||||
Hugo is not your average static site generator.
|
||||
Learn about Hugo and its features, privacy protections, and security model.
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
title: Benefits of static site generators
|
||||
linkTitle: Static site generators
|
||||
description: Improved performance, security and ease of use are just a few of the reasons static site generators are so appealing.
|
||||
categories: [about]
|
||||
keywords: [ssg,static,performance,security]
|
||||
menu:
|
||||
docs:
|
||||
parent: about
|
||||
weight: 40
|
||||
weight: 40
|
||||
---
|
||||
|
||||
The purpose of website generators is to render content into HTML files. Most are "dynamic site generators." That means the HTTP server---i.e., the program that sends files to the browser to be viewed---runs the generator to create a new HTML file every time an end user requests a page.
|
||||
|
||||
Over time, dynamic site generators were programmed to cache their HTML files to prevent unnecessary delays in delivering pages to end users. A cached page is a static version of a web page.
|
||||
|
||||
Hugo takes caching a step further and all HTML files are rendered on your computer. You can review the files locally before copying them to the computer hosting the HTTP server. Since the HTML files aren't generated dynamically, we say that Hugo is a *static site generator*.
|
||||
|
||||
This has many benefits. The most noticeable is performance. HTTP servers are *very* good at sending files---so good, in fact, that you can effectively serve the same number of pages with a fraction of the memory and CPU needed for a dynamic site.
|
||||
|
||||
## More on static site generators
|
||||
|
||||
* ["An Introduction to Static Site Generators", David Walsh]
|
||||
* ["Hugo vs. WordPress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
|
||||
* ["Static Site Generators", O'Reilly]
|
||||
* [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]
|
||||
* ["Top 10 Static Website Generators", Netlify blog]
|
||||
* ["The Resurgence of Static", dotCMS][dotcms]
|
||||
|
||||
["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators
|
||||
["Static Site Generators", O'Reilly]: https://github.com/gohugoio/hugoDocs/files/1242701/static-site-generators.pdf
|
||||
["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/
|
||||
[hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/
|
||||
[StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/
|
||||
[dotcms]: https://dotcms.com/blog/post/the-resurgence-of-static
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Hugo features
|
||||
description: Hugo boasts blistering speed, robust content management, and a powerful templating language making it a great fit for all kinds of static websites.
|
||||
title: Features
|
||||
description: Hugo's rich and powerful feature set provides the framework and tools to create static sites that build in seconds, often less.
|
||||
categories: [about]
|
||||
keywords: []
|
||||
menu:
|
||||
|
@ -11,70 +11,126 @@ weight: 30
|
|||
toc: true
|
||||
---
|
||||
|
||||
## General
|
||||
## Framework
|
||||
|
||||
* [Extremely fast] build times (< 1 ms per page)
|
||||
* Completely cross platform, with [easy installation][install] on macOS, Linux, Windows, and more
|
||||
* Renders changes on the fly with [LiveReload] as you develop
|
||||
* [Powerful theming]
|
||||
* [Host your site anywhere][hostanywhere]
|
||||
[Multiplatform]
|
||||
: Install Hugo's single executable on Linux, macOS, Windows, and more.
|
||||
|
||||
## Organization
|
||||
[Multilingual]
|
||||
: Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo's multilingual framework supports single-host and multihost configurations.
|
||||
|
||||
* Straightforward [organization for your projects], including website sections
|
||||
* Customizable [URLs]
|
||||
* Support for configurable [taxonomies], including categories and tags
|
||||
* [Sort content] as you desire through powerful template [functions]
|
||||
* Automatic [table of contents] generation
|
||||
* [Dynamic menu] creation
|
||||
* [Pretty URLs] support
|
||||
* [Permalink] pattern support
|
||||
* Redirects via [aliases]
|
||||
[Output formats]
|
||||
: Render each page of your site to one or more output formats, with granular control by page kind, section, and path. While HTML is the default output format, you can add JSON, RSS, CSV, and more. For example, create a REST API to access content.
|
||||
|
||||
## Content
|
||||
[Templates]
|
||||
: Create templates usings variables, functions, and methods to transform your content, resources, and data into a published page. While HTML templates are the most common, you can create templates for any output format.
|
||||
|
||||
* Native Markdown and Emacs Org-Mode support, as well as other languages via *external helpers* (see [supported formats])
|
||||
* TOML, YAML, and JSON metadata support in [front matter]
|
||||
* Customizable [homepage]
|
||||
* Multiple [content types]
|
||||
* Automatic and user defined [content summaries]
|
||||
* [Shortcodes] to enable rich content inside of Markdown
|
||||
* ["Minutes to Read"][pagevars] functionality
|
||||
* ["WordCount"][pagevars] functionality
|
||||
[Themes]
|
||||
: Reduce development time and cost by using one of the hundreds of themes contributed by the Hugo community. Themes are available for corporate sites, documentation projects, image portfolios, landing pages, personal and professional blogs, resumes, CVs, and more.
|
||||
|
||||
## Additional features
|
||||
[Modules]
|
||||
: Reduce development time and cost by creating or importing packaged combinations of archetypes, assets, content, data, templates, translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site.
|
||||
|
||||
* Integrated [Disqus] comment support
|
||||
* Integrated [Google Analytics] support
|
||||
* Automatic [RSS] creation
|
||||
* Support for [Go] HTML templates
|
||||
* [Syntax highlighting] powered by [Chroma]
|
||||
[Privacy]
|
||||
: Configure the behavior of Hugo's embedded templates and shortcodes to facilitate compliance with regional privacy regulations, including the [GDPR] and [CCPA].
|
||||
|
||||
[aliases]: /content-management/urls/#aliases
|
||||
[Chroma]: https://github.com/alecthomas/chroma
|
||||
[content summaries]: /content-management/summaries/
|
||||
[content types]: /content-management/types/
|
||||
[Disqus]: https://disqus.com/
|
||||
[Dynamic menu]: /templates/menu-templates/
|
||||
[Extremely fast]: https://github.com/bep/hugo-benchmark
|
||||
[front matter]: /content-management/front-matter/
|
||||
[functions]: /functions/
|
||||
[Go]: https://pkg.go.dev/html/template
|
||||
[Google Analytics]: https://google-analytics.com/
|
||||
[homepage]: /templates/homepage/
|
||||
[hostanywhere]: /hosting-and-deployment/
|
||||
[install]: /installation/
|
||||
[LiveReload]: /getting-started/usage/
|
||||
[organization for your projects]: /getting-started/directory-structure/
|
||||
[pagevars]: /variables/page/
|
||||
[Permalink]: /content-management/urls/#permalinks
|
||||
[Powerful theming]: /hugo-modules/theme-components/
|
||||
[Pretty URLs]: /content-management/urls/
|
||||
[RSS]: /templates/rss/
|
||||
[Security]
|
||||
: Hugo's security model is based on the premise that template and configuration authors are trusted, but content authors are not. This model enables generation of HTML output safe against code injection. Other protections prevent "shelling out" to arbitrary applications, limit access to specific environment variables, prevent connections to arbitrary remote data sources, and more.
|
||||
|
||||
## Content authoring
|
||||
|
||||
[Content formats]
|
||||
: Create your content using Markdown, HTML, AsciiDoc, Emacs Org Mode, Pandoc, or reStructuredText. Markdown is the default content format, conforming to the [CommonMark] and [GitHub Flavored Markdown] specifications.
|
||||
|
||||
[Markdown attributes]
|
||||
: Apply HTML attributes such as `class` and `id` to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
|
||||
|
||||
[Markdown extensions]
|
||||
: Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more.
|
||||
|
||||
[Markdown render hooks]
|
||||
: Override the conversion of Markdown to HTML when rendering fenced code blocks, headings, images, and links. For example, render every standalone image as an HTML `figure` element.
|
||||
|
||||
[Diagrams]
|
||||
: Use fenced code blocks and Markdown render hooks to include diagrams in your content.
|
||||
|
||||
[Mathematics]
|
||||
: Include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax.
|
||||
|
||||
[Syntax highlighting]
|
||||
: Syntactically highlight code examples using Hugo's embedded syntax highlighter, enabled by default for fenced code blocks in Markdown. The syntax highlighter supports hundreds of code languages and dozens of styles.
|
||||
|
||||
[Shortcodes]
|
||||
: Use Hugo's embedded shortcodes, or create your own, to insert complex content. For example, use shortcodes to include `audio` and `video` elements, render tables from local or remote data sources, insert snippets from other pages, and more.
|
||||
|
||||
## Content management
|
||||
|
||||
[Content adapters]
|
||||
: Create content adapters to dynamically add content when building your site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML.
|
||||
|
||||
[Taxonomies]
|
||||
: Classify content to establish simple or complex logical relationships between pages. For example, create an authors taxonomy, and assign one or more authors to each page. Among other uses, the taxonomy system provides an inverted, weighted index to render a list of related pages, ordered by relevance.
|
||||
|
||||
[Data]
|
||||
: Augment your content using local or remote data sources including CSV, JSON, TOML, YAML, and XML. For example, create a shortcode to render an HTML table from a remote CSV file.
|
||||
|
||||
[Menus]
|
||||
: Provide rapid access to content via Hugo's menu system, configured automatically, globally, or on a page-by-page basis. The menu system is a key component of Hugo's multilingual architecture.
|
||||
|
||||
[URL management]
|
||||
: Serve any page from any path via global configuration or on a page-by-page basis.
|
||||
|
||||
|
||||
## Asset pipelines
|
||||
|
||||
[CSS bundling]
|
||||
: Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS.
|
||||
|
||||
[JavaScript bundling]
|
||||
: Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing.
|
||||
|
||||
[Image processing]
|
||||
: Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data.
|
||||
|
||||
## Performance
|
||||
|
||||
[Caching]
|
||||
: Reduce build time and cost by rendering a partial template once then cache the result, either globally or within a given context. For example, cache the result of an asset pipeline to prevent reprocessing on every rendered page.
|
||||
|
||||
[Segmentation]
|
||||
: Reduce build time and cost by partitioning your sites into segments. For example, render the home page and the "news section" every hour, and render the entire site once a week.
|
||||
|
||||
[Minification]
|
||||
: Minify HTML, CSS, and JavaScript to reduce file size, bandwidth consumption, and loading times.
|
||||
|
||||
[CCPA]: https://en.wikipedia.org/wiki/California_Consumer_Privacy_Act
|
||||
[CSS bundling]: /functions/resources/tocss/
|
||||
[Caching]: /functions/partials/includecached/
|
||||
[CommonMark]: https://spec.commonmark.org/current/
|
||||
[Content adapters]: /content-management/content-adapters/
|
||||
[Content formats]: /content-management/formats/
|
||||
[Data]: /content-management/data-sources/
|
||||
[Diagrams]: /content-management/diagrams/
|
||||
[GDPR]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
|
||||
[GitHub Flavored Markdown]: https://github.github.com/gfm/
|
||||
[Image processing]: /content-management/image-processing/
|
||||
[JavaScript bundling]: /functions/js/build/
|
||||
[Markdown attributes]: /content-management/markdown-attributes/
|
||||
[Markdown extensions]: /getting-started/configuration-markup/#goldmark-extensions
|
||||
[Markdown render hooks]: /render-hooks/introduction/
|
||||
[Mathematics]: /content-management/mathematics/
|
||||
[Menus]: /content-management/menus/
|
||||
[Minification]: /getting-started/configuration/#configure-minify
|
||||
[Modules]: https://gohugo.io/hugo-modules/
|
||||
[Multilingual]: /content-management/multilingual/
|
||||
[Multiplatform]: /installation/
|
||||
[Output formats]: /templates/output-formats/
|
||||
[Privacy]: /about/privacy/
|
||||
[Security]: /about/security/
|
||||
[Segmentation]: /getting-started/configuration/#configure-segments
|
||||
[Shortcodes]: /content-management/shortcodes/
|
||||
[sort content]: /templates/
|
||||
[supported formats]: /content-management/formats/
|
||||
[Syntax highlighting]: /content-management/syntax-highlighting/
|
||||
[table of contents]: /content-management/toc/
|
||||
[taxonomies]: /content-management/taxonomies/
|
||||
[URLs]: /content-management/urls/
|
||||
[Taxonomies]: /content-management/taxonomies/
|
||||
[Templates]: templates/introduction/
|
||||
[Themes]: https://themes.gohugo.io/
|
||||
[URL management]: /content-management/urls/
|
||||
|
|
39
content/en/about/introduction.md
Normal file
39
content/en/about/introduction.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: Introduction
|
||||
description: Hugo is a static site generator written in Go, optimized for speed and designed for flexibility.
|
||||
categories: [about]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
identifier: about-introduction
|
||||
parent: about
|
||||
weight: 20
|
||||
weight: 20
|
||||
aliases: [/about/what-is-hugo/,/about/benefits/]
|
||||
---
|
||||
|
||||
Hugo is a [static site generator] written in [Go], optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less.
|
||||
|
||||
Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is widely used to create:
|
||||
|
||||
- Corporate, government, nonprofit, education, news, event, and project sites
|
||||
- Documentation sites
|
||||
- Image portfolios
|
||||
- Landing pages
|
||||
- Business, professional, and personal blogs
|
||||
- Resumes and CVs
|
||||
|
||||
Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. Then deploy the site to your host, or push changes to your Git provider for automated builds and deployment.
|
||||
|
||||
And with [Hugo Modules], you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories.
|
||||
|
||||
Learn more about Hugo's [features], [privacy protections], and [security model].
|
||||
|
||||
[Go]: https://go.dev
|
||||
[Hugo Modules]: /hugo-modules/
|
||||
[static site generator]: https://en.wikipedia.org/wiki/Static_site_generator
|
||||
[features]: /about/features
|
||||
[security model]: /about/security
|
||||
[privacy protections]: /about/privacy
|
||||
|
||||
{{< youtube 0RKpf3rK57I >}}
|
|
@ -2,12 +2,12 @@
|
|||
title: License
|
||||
description: Hugo is released under the Apache 2.0 license.
|
||||
categories: [about]
|
||||
keywords: [license,apache]
|
||||
keywords: [apache]
|
||||
menu:
|
||||
docs:
|
||||
parent: about
|
||||
weight: 70
|
||||
weight: 70
|
||||
weight: 60
|
||||
weight: 60
|
||||
---
|
||||
|
||||
## Apache License
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
title: Hugo and the General Data Protection Regulation
|
||||
linkTitle: Hugo and the GDPR
|
||||
description: About how to configure your Hugo site to meet the new regulations.
|
||||
title: Privacy
|
||||
linkTitle: Privacy
|
||||
description: Configure your site to facilitate compliance with regional privacy regulations.
|
||||
categories: [about]
|
||||
keywords: ["GDPR", "Privacy", "Data Protection"]
|
||||
menu:
|
||||
docs:
|
||||
parent: about
|
||||
weight: 60
|
||||
weight: 60
|
||||
weight: 40
|
||||
weight: 40
|
||||
toc: true
|
||||
aliases: [/privacy/,/gdpr/]
|
||||
aliases: [/gdpr/,/about/hugo-and-gdpr/]
|
||||
---
|
||||
|
||||
General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.
|
||||
|
@ -22,7 +22,7 @@ aliases: [/privacy/,/gdpr/]
|
|||
Note that:
|
||||
|
||||
* These settings have their defaults setting set to _off_, i.e. how it worked before Hugo `0.41`. You must do your own evaluation of your site and apply the appropriate settings.
|
||||
* These settings work with the [internal templates](/templates/internal/). Some theme may contain custom templates for embedding services like Google Analytics. In that case these options have no effect.
|
||||
* These settings work with the [embedded templates](/templates/embedded/). Some theme may contain custom templates for embedding services like Google Analytics. In that case these options have no effect.
|
||||
* We will continue this work and improve this further in future Hugo versions.
|
||||
|
||||
## All privacy settings
|
||||
|
@ -36,8 +36,6 @@ disable = false
|
|||
[privacy.googleAnalytics]
|
||||
disable = false
|
||||
respectDoNotTrack = false
|
||||
anonymizeIP = false
|
||||
useSessionStorage = false
|
||||
[privacy.instagram]
|
||||
disable = false
|
||||
simple = false
|
||||
|
@ -78,19 +76,9 @@ disable = true
|
|||
|
||||
### GoogleAnalytics
|
||||
|
||||
anonymizeIP
|
||||
: Enabling this will make it so the users' IP addresses are anonymized within Google Analytics.
|
||||
|
||||
respectDoNotTrack
|
||||
: Enabling this will make the GA templates respect the "Do Not Track" HTTP header.
|
||||
|
||||
useSessionStorage
|
||||
: Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.
|
||||
|
||||
{{% note %}}
|
||||
`useSessionStorage` is not supported when using Google Analytics v4 (gtag.js).
|
||||
{{% /note %}}
|
||||
|
||||
### Instagram
|
||||
|
||||
simple
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Hugo's security model
|
||||
title: Security model
|
||||
linkTitle: Security
|
||||
description: A summary of Hugo's security model.
|
||||
categories: [about]
|
||||
keywords: [security,privacy]
|
||||
|
@ -9,7 +10,7 @@ menu:
|
|||
weight: 50
|
||||
weight: 50
|
||||
toc: true
|
||||
aliases: [/security/]
|
||||
aliases: [/about/security-model/]
|
||||
---
|
||||
|
||||
## Runtime security
|
||||
|
@ -21,9 +22,8 @@ But when developing and building your site, the runtime is the `hugo` executable
|
|||
**Hugo's main approach is that of sandboxing and a security policy with strict defaults:**
|
||||
|
||||
* Hugo has a virtual file system and only the main project (not third-party components) is allowed to mount directories or files outside the project root.
|
||||
* Only the main project can walk symbolic links.
|
||||
* User-defined components have read-only access to the filesystem.
|
||||
* We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#list-of-content-formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns.
|
||||
* We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns.
|
||||
|
||||
## Security policy
|
||||
|
||||
|
@ -33,7 +33,16 @@ The default configuration is listed below. Any build using features not in the a
|
|||
|
||||
{{< code-toggle config=security />}}
|
||||
|
||||
Note that these and other configuration settings in Hugo can be overridden by the OS environment. If you want to block all remote HTTP fetching of data:
|
||||
By default, Hugo permits the [`resources.GetRemote`] function to download files with media types corresponding to an internal allow list. To add media types to the allow list:
|
||||
|
||||
[`resources.GetRemote`]: /functions/resources/getremote
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[security.http]
|
||||
mediaTypes = ['^image/avif$']
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Note that these and other configuration settings in Hugo can be overridden by the OS environment. For example, if you want to block all remote HTTP fetching of data:
|
||||
|
||||
```txt
|
||||
HUGO_SECURITY_HTTP_URLS=none hugo
|
|
@ -1,57 +0,0 @@
|
|||
---
|
||||
title: What is Hugo
|
||||
description: Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again.
|
||||
categories: [about]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: about
|
||||
weight: 20
|
||||
weight: 20
|
||||
toc: true
|
||||
aliases: [/overview/introduction/,/about/why-i-built-hugo/]
|
||||
---
|
||||
|
||||
Hugo is a general-purpose website framework. Technically speaking, Hugo is a [static site generator]. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website's end users and an ideal writing experience for website authors.
|
||||
|
||||
Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including [Netlify], [Heroku], [GoDaddy], [DreamHost], [GitHub Pages], [GitLab Pages], [Surge], [Firebase], [Google Cloud Storage], [Amazon S3], [Rackspace], [Azure], and [CloudFront] and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
|
||||
|
||||
We think of Hugo as the ideal website creation tool with nearly instant build times, able to rebuild whenever a change is made.
|
||||
|
||||
## How fast is Hugo?
|
||||
|
||||
{{< youtube "CdiDYZ51a2o" >}}
|
||||
|
||||
## What does Hugo do?
|
||||
|
||||
In technical terms, Hugo takes a source directory of files and templates and uses these as input to create a complete website.
|
||||
|
||||
## Who should use Hugo?
|
||||
|
||||
Hugo is for people that prefer writing in a text editor over a browser.
|
||||
|
||||
Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
|
||||
|
||||
Hugo is for people building a blog, a company site, a portfolio site, documentation, a single landing page, or a website with thousands of pages.
|
||||
|
||||
[@spf13]: https://twitter.com/spf13
|
||||
[Amazon S3]: https://aws.amazon.com/s3/
|
||||
[Azure]: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
|
||||
[CloudFront]: https://aws.amazon.com/cloudfront/
|
||||
[DreamHost]: https://www.dreamhost.com/
|
||||
[Firebase]: https://firebase.google.com/docs/hosting/
|
||||
[GitHub Pages]: https://pages.github.com/
|
||||
[GitLab Pages]: https://about.gitlab.com/features/pages/
|
||||
[Go language]: https://go.dev/
|
||||
[GoDaddy]: https://www.godaddy.com/
|
||||
[Google Cloud Storage]: https://cloud.google.com/storage/
|
||||
[Heroku]: https://www.heroku.com/
|
||||
[Jekyll]: https://jekyllrb.com/
|
||||
[Middleman]: https://middlemanapp.com/
|
||||
[Nanoc]: https://nanoc.ws/
|
||||
[Netlify]: https://netlify.com
|
||||
[Rackspace]: https://www.rackspace.com/cloud/files
|
||||
[Surge]: https://surge.sh
|
||||
[contributing to it]: https://github.com/gohugoio/hugo
|
||||
[rackspace]: https://www.rackspace.com/openstack/public/files
|
||||
[static site generator]: /about/benefits/
|
|
@ -56,7 +56,8 @@ hugo [flags]
|
|||
--printPathWarnings print warnings on duplicate target paths etc.
|
||||
--printUnusedTemplates print warnings on unused templates.
|
||||
--quiet build in quiet mode
|
||||
--renderToMemory render to memory (only useful for benchmark testing)
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--templateMetrics display metrics about template executions
|
||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||
|
|
|
@ -31,6 +31,7 @@ See each sub-command's help for details on how to use the generated script.
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -54,6 +54,7 @@ hugo completion bash
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -45,6 +45,7 @@ hugo completion fish [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -42,6 +42,7 @@ hugo completion powershell [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -56,6 +56,7 @@ hugo completion zsh [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -18,13 +18,14 @@ hugo config [command] [flags]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--format string preferred file format (toml, yaml or json) (default "toml")
|
||||
-h, --help help for config
|
||||
--lang string the language to display config for. Defaults to the first language defined.
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--format string preferred file format (toml, yaml or json) (default "toml")
|
||||
-h, --help help for config
|
||||
--lang string the language to display config for. Defaults to the first language defined.
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -39,6 +40,7 @@ hugo config [command] [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -14,11 +14,12 @@ hugo config mounts [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for mounts
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for mounts
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -33,6 +34,7 @@ hugo config mounts [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -33,6 +33,7 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -35,6 +35,7 @@ hugo convert toJSON [flags] [args]
|
|||
--logLevel string log level (debug|info|warn|error)
|
||||
-o, --output string filesystem path to write files to
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
--unsafe enable less safe operations, please backup first
|
||||
|
|
|
@ -35,6 +35,7 @@ hugo convert toTOML [flags] [args]
|
|||
--logLevel string log level (debug|info|warn|error)
|
||||
-o, --output string filesystem path to write files to
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
--unsafe enable less safe operations, please backup first
|
||||
|
|
|
@ -35,6 +35,7 @@ hugo convert toYAML [flags] [args]
|
|||
--logLevel string log level (debug|info|warn|error)
|
||||
-o, --output string filesystem path to write files to
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
--unsafe enable less safe operations, please backup first
|
||||
|
|
|
@ -44,6 +44,7 @@ hugo deploy [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -33,6 +33,7 @@ hugo env [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -25,6 +25,7 @@ A collection of several useful generators.
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -20,10 +20,11 @@ hugo gen chromastyles [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for chromastyles
|
||||
--highlightStyle string style used for highlighting lines (see https://github.com/alecthomas/chroma)
|
||||
--linesStyle string style used for line numbers (see https://github.com/alecthomas/chroma)
|
||||
--style string highlighter style (see https://xyproto.github.io/splash/docs/) (default "friendly")
|
||||
-h, --help help for chromastyles
|
||||
--highlightStyle string foreground and background colors for highlighted lines, e.g. --highlightStyle "#fff000 bg:#000fff"
|
||||
--lineNumbersInlineStyle string foreground and background colors for inline line numbers, e.g. --lineNumbersInlineStyle "#fff000 bg:#000fff"
|
||||
--lineNumbersTableStyle string foreground and background colors for table line numbers, e.g. --lineNumbersTableStyle "#fff000 bg:#000fff"
|
||||
--style string highlighter style (see https://xyproto.github.io/splash/docs/) (default "friendly")
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -38,6 +39,7 @@ hugo gen chromastyles [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -39,6 +39,7 @@ hugo gen doc [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -36,6 +36,7 @@ hugo gen man [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -31,6 +31,7 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -36,6 +36,7 @@ hugo import jekyll [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -31,6 +31,7 @@ List requires a subcommand, e.g. hugo list drafts
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
@ -39,8 +40,9 @@ List requires a subcommand, e.g. hugo list drafts
|
|||
### SEE ALSO
|
||||
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
* [hugo list all](/commands/hugo_list_all/) - List all posts
|
||||
* [hugo list drafts](/commands/hugo_list_drafts/) - List all drafts
|
||||
* [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired
|
||||
* [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future
|
||||
* [hugo list all](/commands/hugo_list_all/) - List all content
|
||||
* [hugo list drafts](/commands/hugo_list_drafts/) - List draft content
|
||||
* [hugo list expired](/commands/hugo_list_expired/) - List expired content
|
||||
* [hugo list future](/commands/hugo_list_future/) - List future content
|
||||
* [hugo list published](/commands/hugo_list_published/) - List published content
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ url: /commands/hugo_list_all/
|
|||
---
|
||||
## hugo list all
|
||||
|
||||
List all posts
|
||||
List all content
|
||||
|
||||
### Synopsis
|
||||
|
||||
List all of the posts in your content directory, include drafts, future and expired pages.
|
||||
List all content including draft, future, and expired.
|
||||
|
||||
```
|
||||
hugo list all [flags] [args]
|
||||
|
@ -33,6 +33,7 @@ hugo list all [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -5,11 +5,11 @@ url: /commands/hugo_list_drafts/
|
|||
---
|
||||
## hugo list drafts
|
||||
|
||||
List all drafts
|
||||
List draft content
|
||||
|
||||
### Synopsis
|
||||
|
||||
List all of the drafts in your content directory.
|
||||
List draft content.
|
||||
|
||||
```
|
||||
hugo list drafts [flags] [args]
|
||||
|
@ -33,6 +33,7 @@ hugo list drafts [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -5,11 +5,11 @@ url: /commands/hugo_list_expired/
|
|||
---
|
||||
## hugo list expired
|
||||
|
||||
List all posts already expired
|
||||
List expired content
|
||||
|
||||
### Synopsis
|
||||
|
||||
List all of the posts in your content directory which has already expired.
|
||||
List content with a past expiration date.
|
||||
|
||||
```
|
||||
hugo list expired [flags] [args]
|
||||
|
@ -33,6 +33,7 @@ hugo list expired [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -5,11 +5,11 @@ url: /commands/hugo_list_future/
|
|||
---
|
||||
## hugo list future
|
||||
|
||||
List all posts dated in the future
|
||||
List future content
|
||||
|
||||
### Synopsis
|
||||
|
||||
List all of the posts in your content directory which will be posted in the future.
|
||||
List content with a future publication date.
|
||||
|
||||
```
|
||||
hugo list future [flags] [args]
|
||||
|
@ -33,6 +33,7 @@ hugo list future [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
45
content/en/commands/hugo_list_published.md
Normal file
45
content/en/commands/hugo_list_published.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
title: "hugo list published"
|
||||
slug: hugo_list_published
|
||||
url: /commands/hugo_list_published/
|
||||
---
|
||||
## hugo list published
|
||||
|
||||
List published content
|
||||
|
||||
### Synopsis
|
||||
|
||||
List content that is not draft, future, or expired.
|
||||
|
||||
```
|
||||
hugo list published [flags] [args]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for published
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
|
||||
--config string config file (default is hugo.yaml|json|toml)
|
||||
--configDir string config dir (default "config")
|
||||
--debug debug output
|
||||
-d, --destination string filesystem path to write files to
|
||||
-e, --environment string build environment
|
||||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
||||
|
|
@ -40,6 +40,7 @@ See https://gohugo.io/hugo-modules/ for more information.
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -18,13 +18,14 @@ hugo mod clean [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
--all clean entire module cache
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for clean
|
||||
--pattern string pattern matching module paths to clean (all if not set), e.g. "**hugo*"
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
--all clean entire module cache
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for clean
|
||||
--pattern string pattern matching module paths to clean (all if not set), e.g. "**hugo*"
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -39,6 +40,7 @@ hugo mod clean [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -64,6 +64,7 @@ hugo mod get [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -20,12 +20,13 @@ hugo mod graph [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
--clean delete module cache for dependencies that fail verification
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for graph
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
--clean delete module cache for dependencies that fail verification
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for graph
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -40,6 +41,7 @@ hugo mod graph [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -25,11 +25,12 @@ hugo mod init [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for init
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for init
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -44,6 +45,7 @@ hugo mod init [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -33,6 +33,7 @@ hugo mod npm [command] [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -28,11 +28,12 @@ hugo mod npm pack [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for pack
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for pack
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -47,6 +48,7 @@ hugo mod npm pack [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -14,11 +14,12 @@ hugo mod tidy [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for tidy
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for tidy
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -33,6 +34,7 @@ hugo mod tidy [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -20,11 +20,12 @@ hugo mod vendor [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for vendor
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for vendor
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -39,6 +40,7 @@ hugo mod vendor [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -18,12 +18,13 @@ hugo mod verify [flags] [args]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
--clean delete module cache for dependencies that fail verification
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for verify
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
--clean delete module cache for dependencies that fail verification
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
-h, --help help for verify
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -38,6 +39,7 @@ hugo mod verify [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -36,6 +36,7 @@ Ensure you run this within the root directory of your site.
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -25,14 +25,15 @@ hugo new content [path] [flags]
|
|||
### Options
|
||||
|
||||
```
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--editor string edit new content with this editor, if provided
|
||||
-f, --force overwrite file if it already exists
|
||||
-h, --help help for content
|
||||
-k, --kind string content type to create
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--cacheDir string filesystem path to cache directory
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--editor string edit new content with this editor, if provided
|
||||
-f, --force overwrite file if it already exists
|
||||
-h, --help help for content
|
||||
-k, --kind string content type to create
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -47,6 +48,7 @@ hugo new content [path] [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -37,6 +37,7 @@ hugo new site [path] [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -36,6 +36,7 @@ hugo new theme [name] [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -12,8 +12,9 @@ A high performance webserver
|
|||
Hugo provides its own webserver which builds and serves the site.
|
||||
While hugo server is high performance, it is a webserver with limited options.
|
||||
|
||||
'hugo server' will avoid writing the rendered and served content to disk,
|
||||
preferring to store it in memory.
|
||||
The `hugo server` command will by default write and serve files from disk, but
|
||||
you can render to memory by using the `--renderToMemory` flag. This can be
|
||||
faster in some cases, but it will consume more memory.
|
||||
|
||||
By default hugo will also watch your files for any changes you make and
|
||||
automatically rebuild the site. It will then live reload any open browser pages
|
||||
|
@ -27,51 +28,50 @@ hugo server [command] [flags]
|
|||
### Options
|
||||
|
||||
```
|
||||
--appendPort append port to baseURL (default true)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--bind string interface to which the server will bind (default "127.0.0.1")
|
||||
-D, --buildDrafts include content marked as draft
|
||||
-E, --buildExpired include expired content
|
||||
-F, --buildFuture include content with publishdate in the future
|
||||
--cacheDir string filesystem path to cache directory
|
||||
--cleanDestinationDir remove files from destination not found in static directories
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--disableBrowserError do not show build errors in the browser
|
||||
--disableFastRender enables full re-renders on changes
|
||||
--disableKinds strings disable different kind of pages (home, RSS etc.)
|
||||
--disableLiveReload watch without enabling live browser reload on rebuild
|
||||
--enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
|
||||
--forceSyncStatic copy all files when static is changed.
|
||||
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
||||
-h, --help help for server
|
||||
--ignoreCache ignores the cache directory
|
||||
-l, --layoutDir string filesystem path to layout directory
|
||||
--liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
|
||||
--meminterval string interval to poll memory usage (requires --memstats), valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default "100ms")
|
||||
--memstats string log memory usage to this file
|
||||
--minify minify any supported output format (HTML, XML etc.)
|
||||
--navigateToChanged navigate to changed content file on live browser reload
|
||||
--noBuildLock don't create .hugo_build.lock file
|
||||
--noChmod don't sync permission mode of files
|
||||
--noHTTPCache prevent HTTP caching
|
||||
--noTimes don't sync modification time of files
|
||||
--panicOnWarning panic on first WARNING log
|
||||
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||
-p, --port int port on which the server will listen (default 1313)
|
||||
--printI18nWarnings print missing translations
|
||||
--printMemoryUsage print memory usage to screen at intervals
|
||||
--printPathWarnings print warnings on duplicate target paths etc.
|
||||
--printUnusedTemplates print warnings on unused templates.
|
||||
--renderStaticToDisk serve static files from disk and dynamic files from memory
|
||||
--renderToDisk serve all files from disk (default is from memory)
|
||||
--templateMetrics display metrics about template executions
|
||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
--tlsAuto generate and use locally-trusted certificates.
|
||||
--tlsCertFile string path to TLS certificate file
|
||||
--tlsKeyFile string path to TLS key file
|
||||
--trace file write trace to file (not useful in general)
|
||||
-w, --watch watch filesystem for changes and recreate as needed (default true)
|
||||
--appendPort append port to baseURL (default true)
|
||||
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||
--bind string interface to which the server will bind (default "127.0.0.1")
|
||||
-D, --buildDrafts include content marked as draft
|
||||
-E, --buildExpired include expired content
|
||||
-F, --buildFuture include content with publishdate in the future
|
||||
--cacheDir string filesystem path to cache directory
|
||||
--cleanDestinationDir remove files from destination not found in static directories
|
||||
-c, --contentDir string filesystem path to content directory
|
||||
--disableBrowserError do not show build errors in the browser
|
||||
--disableFastRender enables full re-renders on changes
|
||||
--disableKinds strings disable different kind of pages (home, RSS etc.)
|
||||
--disableLiveReload watch without enabling live browser reload on rebuild
|
||||
--enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
|
||||
--forceSyncStatic copy all files when static is changed.
|
||||
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
||||
-h, --help help for server
|
||||
--ignoreCache ignores the cache directory
|
||||
-l, --layoutDir string filesystem path to layout directory
|
||||
--liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
|
||||
--minify minify any supported output format (HTML, XML etc.)
|
||||
-N, --navigateToChanged navigate to changed content file on live browser reload
|
||||
--noBuildLock don't create .hugo_build.lock file
|
||||
--noChmod don't sync permission mode of files
|
||||
--noHTTPCache prevent HTTP caching
|
||||
--noTimes don't sync modification time of files
|
||||
--panicOnWarning panic on first WARNING log
|
||||
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||
-p, --port int port on which the server will listen (default 1313)
|
||||
--pprof enable the pprof server (port 8080)
|
||||
--printI18nWarnings print missing translations
|
||||
--printMemoryUsage print memory usage to screen at intervals
|
||||
--printPathWarnings print warnings on duplicate target paths etc.
|
||||
--printUnusedTemplates print warnings on unused templates.
|
||||
--renderSegments strings named segments to render (configured in the segments config)
|
||||
--renderStaticToDisk serve static files from disk and dynamic files from memory
|
||||
--templateMetrics display metrics about template executions
|
||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||
--tlsAuto generate and use locally-trusted certificates.
|
||||
--tlsCertFile string path to TLS certificate file
|
||||
--tlsKeyFile string path to TLS key file
|
||||
--trace file write trace to file (not useful in general)
|
||||
-w, --watch watch filesystem for changes and recreate as needed (default true)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
@ -86,6 +86,7 @@ hugo server [command] [flags]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -30,6 +30,7 @@ hugo server trust [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -33,6 +33,7 @@ hugo version [flags] [args]
|
|||
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||
--logLevel string log level (debug|info|warn|error)
|
||||
--quiet build in quiet mode
|
||||
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||
-s, --source string filesystem path to read files relative from
|
||||
--themesDir string filesystem path to themes directory
|
||||
-v, --verbose verbose output
|
||||
|
|
|
@ -7,7 +7,7 @@ cascade:
|
|||
---
|
||||
|
||||
<!--
|
||||
Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
|
||||
Files within this headless branch bundle are Markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
|
||||
|
||||
Include the rendered content using the "include" shortcode.
|
||||
-->
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: Content management
|
||||
linkTitle: Overview
|
||||
linkTitle: In this section
|
||||
description: Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more.
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
identifier: content-management-overview
|
||||
identifier: content-management-in-this-section
|
||||
parent: content-management
|
||||
weight: 10
|
||||
weight: 10
|
||||
|
|
|
@ -15,7 +15,7 @@ aliases: [/content/archetypes/]
|
|||
|
||||
## Overview
|
||||
|
||||
A content file consists of [front matter] and markup. The markup is typically markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
|
||||
A content file consists of [front matter] and markup. The markup is typically Markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
|
||||
|
||||
The `hugo new content` command creates a new file in the `content` directory, using an archetype as a template. This is the default archetype:
|
||||
|
||||
|
@ -70,14 +70,33 @@ If none of these exists, Hugo uses a built-in default archetype.
|
|||
|
||||
You can use any [template function] within an archetype. As shown above, the default archetype uses the [`replace`](/functions/strings/replace) function to replace hyphens with spaces when populating the title in front matter.
|
||||
|
||||
Archetypes receive the following objects and values in [context]:
|
||||
Archetypes receive the following [context]:
|
||||
|
||||
- `.Date`
|
||||
- `.Type`
|
||||
- `.Site` (see [details](/variables/site/))
|
||||
- `.File` (see [details](/variables/file/))
|
||||
Date
|
||||
: (`string`) The current date and time, formatted in compliance with RFC3339.
|
||||
|
||||
As shown above, the default archetype passes `.File.ContentBaseName` as the argument to the `replace` function when populating the title in front matter.
|
||||
File
|
||||
: (`hugolib.fileInfo`) Returns file information for the current page. See [details](/methods/page/file).
|
||||
|
||||
Type
|
||||
: (`string`) The [content type] inferred from the top-level directory name, or as specified by the `--kind` flag passed to the `hugo new content` command.
|
||||
|
||||
[content type]: /getting-started/glossary#content-type
|
||||
|
||||
Site
|
||||
: (`page.Site`) The current site object. See [details](/methods/site/).
|
||||
|
||||
## Alternate date format
|
||||
|
||||
To insert date and time with an alternate format, use the [`time.Now`] function:
|
||||
|
||||
[`time.Now`]: /functions/time/now/
|
||||
|
||||
{{< code-toggle file=archetypes/default.md fm=true >}}
|
||||
title = '{{ replace .File.ContentBaseName `-` ` ` | title }}'
|
||||
date = '{{ time.Now.Format "2006-01-02" }}'
|
||||
draft = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## Include content
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@ toc: true
|
|||
aliases: [/content/build-options/]
|
||||
---
|
||||
|
||||
Build options are stored in a reserved front matter object named `_build` with these defaults:
|
||||
Build options are stored in a reserved front matter object named `build` with these defaults:
|
||||
|
||||
{{< code-toggle file=content/example/index.md fm=true >}}
|
||||
[_build]
|
||||
[build]
|
||||
list = 'always'
|
||||
publishResources = true
|
||||
render = 'always'
|
||||
|
@ -55,17 +55,17 @@ render
|
|||
- `never`
|
||||
: Never render the page to disk, and exclude it from all page collections.
|
||||
|
||||
[page bundles]: content-management/page-bundles
|
||||
[page resources]: /content-management/page-resources
|
||||
[`Permalink`]: /methods/resource/permalink
|
||||
[`RelPermalink`]: /methods/resource/relpermalink
|
||||
[`Publish`]: /methods/resource/publish
|
||||
[page bundles]: /content-management/page-bundles/
|
||||
[page resources]: /content-management/page-resources/
|
||||
[`Permalink`]: /methods/resource/permalink/
|
||||
[`RelPermalink`]: /methods/resource/relpermalink/
|
||||
[`Publish`]: /methods/resource/publish/
|
||||
|
||||
{{% note %}}
|
||||
Any page, regardless of its build options, will always be available by using the [`.Page.GetPage`] or [`.Site.GetPage`] method.
|
||||
|
||||
[`.Page.GetPage`]: /methods/page/getpage
|
||||
[`.Site.GetPage`]: /methods/site/getpage
|
||||
[`.Page.GetPage`]: /methods/page/getpage/
|
||||
[`.Site.GetPage`]: /methods/site/getpage/
|
||||
{{% /note %}}
|
||||
|
||||
## Example -- headless page
|
||||
|
@ -85,7 +85,7 @@ Set the build options in front matter:
|
|||
|
||||
{{< code-toggle file=content/headless/index.md fm=true >}}
|
||||
title = 'Headless page'
|
||||
[_build]
|
||||
[build]
|
||||
list = 'never'
|
||||
publishResources = false
|
||||
render = 'never'
|
||||
|
@ -121,7 +121,7 @@ In the example above, note that:
|
|||
|
||||
Create a unpublished section whose content and resources can be included in other pages.
|
||||
|
||||
[branch bundle]: /content-management/page-bundles
|
||||
[branch bundle]: /content-management/page-bundles/
|
||||
|
||||
```text
|
||||
content/
|
||||
|
@ -143,7 +143,7 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
|
|||
{{< code-toggle file=content/headless/_index.md fm=true >}}
|
||||
title = 'Headless section'
|
||||
[[cascade]]
|
||||
[cascade._build]
|
||||
[cascade.build]
|
||||
list = 'local'
|
||||
publishResources = false
|
||||
render = 'never'
|
||||
|
@ -201,10 +201,10 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
|
|||
|
||||
{{< code-toggle file=content/glossary/_index.md fm=true >}}
|
||||
title = 'Glossary'
|
||||
[_build]
|
||||
[build]
|
||||
render = 'always'
|
||||
[[cascade]]
|
||||
[cascade._build]
|
||||
[cascade.build]
|
||||
list = 'local'
|
||||
publishResources = false
|
||||
render = 'never'
|
||||
|
@ -247,7 +247,7 @@ Set the build options in front matter:
|
|||
|
||||
{{< code-toggle file=content/books/_index.md fm=true >}}
|
||||
title = 'Books'
|
||||
[_build]
|
||||
[build]
|
||||
render = 'never'
|
||||
list = 'never'
|
||||
{{< /code-toggle >}}
|
||||
|
@ -294,7 +294,7 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
|
|||
{{< code-toggle file=content/internal/_index.md >}}
|
||||
title = 'Internal'
|
||||
[[cascade]]
|
||||
[cascade._build]
|
||||
[cascade.build]
|
||||
render = 'never'
|
||||
list = 'never'
|
||||
[cascade._target]
|
||||
|
|
|
@ -37,7 +37,7 @@ For many websites, this is enough configuration. However, you also have the opti
|
|||
|
||||
### Render Hugo's built-in Disqus partial template
|
||||
|
||||
Disqus has its own [internal template](/templates/internal/#disqus) available, to render it add the following code where you want comments to appear:
|
||||
Disqus has its own [internal template](/templates/embedded/#disqus) available, to render it add the following code where you want comments to appear:
|
||||
|
||||
```go-html-template
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
@ -45,25 +45,30 @@ Disqus has its own [internal template](/templates/internal/#disqus) available, t
|
|||
|
||||
## Alternatives
|
||||
|
||||
These are some alternatives to Disqus:
|
||||
Commercial commenting systems:
|
||||
|
||||
* [Cactus Comments](https://cactus.chat/docs/integrations/hugo/) (Open Source, Matrix appservice, Docker install)
|
||||
* [Comentario](https://gitlab.com/comentario/comentario) (Open Source, self-hosted, Go/Angular, run locally, in Docker or Kubernetes)
|
||||
* [Commento](https://commento.io/) (Open Source, available as a service, local install, or docker image)
|
||||
* [Giscus](https://giscus.app/) (Open source, comments system powered by GitHub Discussions)
|
||||
* [Graph Comment](https://graphcomment.com/)
|
||||
* [Hyvor Talk](https://talk.hyvor.com/) (Available as a service)
|
||||
* [IntenseDebate](https://intensedebate.com/)
|
||||
* [Isso](https://isso-comments.de/) (Self-hosted, Python) ([tutorial][issotutorial])
|
||||
* [Muut](https://muut.com/)
|
||||
* [Remark42](https://remark42.com/) (Open source, Golang, Easy to run docker)
|
||||
* [ReplyBox](https://getreplybox.com/)
|
||||
* [Staticman](https://staticman.net/)
|
||||
* [Talkyard](https://blog-comments.talkyard.io/) (Open source, & serverless hosting)
|
||||
* [Utterances](https://utteranc.es/) (Open source, GitHub comments widget built on GitHub issues)
|
||||
- [Emote](https://emote.com/)
|
||||
- [Graph Comment](https://graphcomment.com/)
|
||||
- [Hyvor Talk](https://talk.hyvor.com/)
|
||||
- [IntenseDebate](https://intensedebate.com/)
|
||||
- [ReplyBox](https://getreplybox.com/)
|
||||
|
||||
Open-source commenting systems:
|
||||
|
||||
- [Cactus Comments](https://cactus.chat/docs/integrations/hugo/)
|
||||
- [Comentario](https://gitlab.com/comentario/comentario/)
|
||||
- [Comma](https://github.com/Dieterbe/comma/)
|
||||
- [Commento](https://commento.io/)
|
||||
- [Discourse](https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963)
|
||||
- [Giscus](https://giscus.app/)
|
||||
- [Isso](https://isso-comments.de/)
|
||||
- [Remark42](https://remark42.com/)
|
||||
- [Staticman](https://staticman.net/)
|
||||
- [Talkyard](https://blog-comments.talkyard.io/)
|
||||
- [Utterances](https://utteranc.es/)
|
||||
|
||||
[configuration]: /getting-started/configuration/
|
||||
[disquspartial]: /templates/internal/#disqus
|
||||
[disquspartial]: /templates/embedded/#disqus
|
||||
[disqussetup]: https://disqus.com/profile/signup/
|
||||
[forum]: https://discourse.gohugo.io
|
||||
[front matter]: /content-management/front-matter/
|
||||
|
@ -71,4 +76,3 @@ These are some alternatives to Disqus:
|
|||
[issotutorial]: https://stiobhart.net/2017-02-24-isso-comments/
|
||||
[partials]: /templates/partials/
|
||||
[MongoDB]: https://www.mongodb.com/
|
||||
[tweet]: https://twitter.com/spf13
|
||||
|
|
355
content/en/content-management/content-adapters.md
Normal file
355
content/en/content-management/content-adapters.md
Normal file
|
@ -0,0 +1,355 @@
|
|||
---
|
||||
title: Content adapters
|
||||
description: Create content adapters to dynamically add content when building your site.
|
||||
categories: [content management]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 290
|
||||
weight: 290
|
||||
toc: true
|
||||
---
|
||||
|
||||
{{< new-in 0.126.0 >}}
|
||||
|
||||
## Overview
|
||||
|
||||
A content adapter is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML.
|
||||
|
||||
Unlike templates that reside in the layouts directory, content adapters reside in the content directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path] will be relative to the content adapter.
|
||||
|
||||
```text
|
||||
content/
|
||||
├── articles/
|
||||
│ ├── _index.md
|
||||
│ ├── article-1.md
|
||||
│ └── article-2.md
|
||||
├── books/
|
||||
│ ├── _content.gotmpl <-- content adapter
|
||||
│ └── _index.md
|
||||
└── films/
|
||||
├── _content.gotmpl <-- content adapter
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
Each content adapter is named _content.gotmpl and uses the same [syntax] as templates in the layouts directory. You can use any of the [template functions] within a content adapter, as well as the methods described below.
|
||||
|
||||
## Methods
|
||||
|
||||
Use these methods within a content adapter.
|
||||
|
||||
###### AddPage
|
||||
|
||||
Adds a page to the site.
|
||||
|
||||
{{< code file=content/books/_content.gotmpl >}}
|
||||
{{ $content := dict
|
||||
"mediaType" "text/markdown"
|
||||
"value" "The _Hunchback of Notre Dame_ was written by Victor Hugo."
|
||||
}}
|
||||
{{ $page := dict
|
||||
"content" $content
|
||||
"kind" "page"
|
||||
"path" "the-hunchback-of-notre-dame"
|
||||
"title" "The Hunchback of Notre Dame"
|
||||
}}
|
||||
{{ .AddPage $page }}
|
||||
{{< /code >}}
|
||||
|
||||
###### AddResource
|
||||
|
||||
Adds a page resource to the site.
|
||||
|
||||
{{< code file=content/books/_content.gotmpl >}}
|
||||
{{ with resources.Get "images/a.jpg" }}
|
||||
{{ $content := dict
|
||||
"mediaType" .MediaType.Type
|
||||
"value" .
|
||||
}}
|
||||
{{ $resource := dict
|
||||
"content" $content
|
||||
"path" "the-hunchback-of-notre-dame/cover.jpg"
|
||||
}}
|
||||
{{ $.AddResource $resource }}
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
Then retrieve the new page resource with something like:
|
||||
|
||||
{{< code file=layouts/_default/single.html >}}
|
||||
{{ with .Resources.Get "cover.jpg" }}
|
||||
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
###### Site
|
||||
|
||||
Returns the `Site` to which the pages will be added.
|
||||
|
||||
{{< code file=content/books/_content.gotmpl >}}
|
||||
{{ .Site.Title }}
|
||||
{{< /code >}}
|
||||
|
||||
###### Store
|
||||
|
||||
Returns a persistent “scratch pad” to store and manipulate data. The main use case for this is to transfer values between executions when [EnableAllLanguages](#enablealllanguages) is set. See [examples](/methods/page/store/).
|
||||
|
||||
{{< code file=content/books/_content.gotmpl >}}
|
||||
{{ .Store.Set "key" "value" }}
|
||||
{{ .Store.Get "key" }}
|
||||
{{< /code >}}
|
||||
|
||||
###### EnableAllLanguages
|
||||
|
||||
By default, Hugo executes the content adapter for the language defined by the _content.gotmpl file . Use this method to activate the content adapter for all languages.
|
||||
|
||||
{{< code file=content/books/_content.gotmpl >}}
|
||||
{{ .EnableAllLanguages }}
|
||||
{{ $content := dict
|
||||
"mediaType" "text/markdown"
|
||||
"value" "The _Hunchback of Notre Dame_ was written by Victor Hugo."
|
||||
}}
|
||||
{{ $page := dict
|
||||
"content" $content
|
||||
"kind" "page"
|
||||
"path" "the-hunchback-of-notre-dame"
|
||||
"title" "The Hunchback of Notre Dame"
|
||||
}}
|
||||
{{ .AddPage $page }}
|
||||
{{< /code >}}
|
||||
|
||||
## Page map
|
||||
|
||||
Set any [front matter field] in the map passed to the [`AddPage`](#addpage) method, excluding `markup`. Instead of setting the `markup` field, specify the `content.mediaType` as described below.
|
||||
|
||||
This table describes the fields most commonly passed to the `AddPage` method.
|
||||
|
||||
Key|Descripion|Required
|
||||
:--|:--|:-:
|
||||
`content.mediaType`|The content [media type]. Default is `text/markdown`. See [content formats] for examples.|
|
||||
`content.value`|The content value as a string.|
|
||||
`dates.date`|The page creation date as a `time.Time` value.|
|
||||
`dates.expiryDate`|The page expiry date as a `time.Time` value.|
|
||||
`dates.lastmod`|The page last modification date as a `time.Time` value.|
|
||||
`dates.publishDate`|The page publication date as a `time.Time` value.|
|
||||
`kind`|The [page kind]. Default is `page`.|
|
||||
`params`|A map of page parameters.|
|
||||
`path`|The page's [logical path] relative to the content adapter. Do not include a leading slash or file extension.|:heavy_check_mark:
|
||||
`title`|The page title.|
|
||||
|
||||
{{% note %}}
|
||||
While `path` is the only required field, we recommend setting `title` as well.
|
||||
|
||||
When setting the `path`, Hugo transforms the given string to a logical path. For example, setting `path` to `A B C` produces a logical path of `/section/a-b-c`.
|
||||
{{% /note %}}
|
||||
|
||||
## Resource map
|
||||
|
||||
Construct the map passed to the [`AddResource`](#addresource) method using the fields below.
|
||||
|
||||
Key|Descripion|Required
|
||||
:--|:--|:-:
|
||||
`content.mediaType`|The content [media type].|:heavy_check_mark:
|
||||
`content.value`|The content value as a string or resource.|:heavy_check_mark:
|
||||
`name`|The resource name.|
|
||||
`params`|A map of resource parameters.|
|
||||
`path`|The resources's [logical path] relative to the content adapter. Do not include a leading slash.|:heavy_check_mark:
|
||||
`title`|The resource title.|
|
||||
|
||||
{{% note %}}
|
||||
If the `content.value` is a string Hugo creates a new resource. If the `content.value` is a resource, Hugo obtains the value from the existing resource.
|
||||
|
||||
When setting the `path`, Hugo transforms the given string to a logical path. For example, setting `path` to `A B C/cover.jpg` produces a logical path of `/section/a-b-c/cover.jpg`.
|
||||
{{% /note %}}
|
||||
|
||||
## Example
|
||||
|
||||
Create pages from remote data, where each page represents a book review.
|
||||
|
||||
Step 1
|
||||
: Create the content structure.
|
||||
|
||||
```text
|
||||
content/
|
||||
└── books/
|
||||
├── _content.gotmpl <-- content adapter
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
Step 2
|
||||
: Inspect the remote data to determine how to map key-value pairs to front matter fields.
|
||||
|
||||
: <https://gohugo.io/shared/examples/data/books.json>
|
||||
|
||||
Step 3
|
||||
: Create the content adapter.
|
||||
|
||||
{{< code file=content/books/_content.gotmpl copy=true >}}
|
||||
{{/* Get remote data. */}}
|
||||
{{ $data := dict }}
|
||||
{{ $url := "https://gohugo.io/shared/examples/data/books.json" }}
|
||||
{{ with resources.GetRemote $url }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Unable to get remote resource %s: %s" $url . }}
|
||||
{{ else }}
|
||||
{{ $data = . | transform.Unmarshal }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get remote resource %s" $url }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Add pages and page resources. */}}
|
||||
{{ range $data }}
|
||||
|
||||
{{/* Add page. */}}
|
||||
{{ $content := dict "mediaType" "text/markdown" "value" .summary }}
|
||||
{{ $dates := dict "date" (time.AsTime .date) }}
|
||||
{{ $params := dict "author" .author "isbn" .isbn "rating" .rating "tags" .tags }}
|
||||
{{ $page := dict
|
||||
"content" $content
|
||||
"dates" $dates
|
||||
"kind" "page"
|
||||
"params" $params
|
||||
"path" .title
|
||||
"title" .title
|
||||
}}
|
||||
{{ $.AddPage $page }}
|
||||
|
||||
{{/* Add page resource. */}}
|
||||
{{ $item := . }}
|
||||
{{ with $url := $item.cover }}
|
||||
{{ with resources.GetRemote $url }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "Unable to get remote resource %s: %s" $url . }}
|
||||
{{ else }}
|
||||
{{ $content := dict "mediaType" .MediaType.Type "value" .Content }}
|
||||
{{ $params := dict "alt" $item.title }}
|
||||
{{ $resource := dict
|
||||
"content" $content
|
||||
"params" $params
|
||||
"path" (printf "%s/cover.%s" $item.title .MediaType.SubType)
|
||||
}}
|
||||
{{ $.AddResource $resource }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get remote resource %s" $url }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
Step 4
|
||||
: Create a single page template to render each book review.
|
||||
|
||||
{{< code file=layouts/books/single.html copy=true >}}
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ with .Resources.GetMatch "cover.*" }}
|
||||
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="{{ .Params.alt }}">
|
||||
{{ end }}
|
||||
|
||||
<p>Author: {{ .Params.author }}</p>
|
||||
|
||||
<p>
|
||||
ISBN: {{ .Params.isbn }}<br>
|
||||
Rating: {{ .Params.rating }}<br>
|
||||
Review date: {{ .Date | time.Format ":date_long" }}
|
||||
</p>
|
||||
|
||||
{{ with .GetTerms "tags" }}
|
||||
<p>Tags:</p>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
## Multilingual sites
|
||||
|
||||
With multilingual sites you can:
|
||||
|
||||
1. Create one content adapter for all languages using the [`EnableAllLanguages`](#enablealllanguages) method as described above.
|
||||
2. Create content adapters unique to each language. See the examples below.
|
||||
|
||||
### Translations by file name
|
||||
|
||||
With this site configuration:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[languages.en]
|
||||
weight = 1
|
||||
|
||||
[languages.de]
|
||||
weight = 2
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Include a language designator in the content adapter's file name.
|
||||
|
||||
```text
|
||||
content/
|
||||
└── books/
|
||||
├── _content.de.gotmpl
|
||||
├── _content.en.gotmpl
|
||||
├── _index.de.md
|
||||
└── _index.en.md
|
||||
```
|
||||
|
||||
### Translations by content directory
|
||||
|
||||
With this site configuration:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[languages.en]
|
||||
contentDir = 'content/en'
|
||||
weight = 1
|
||||
|
||||
[languages.de]
|
||||
contentDir = 'content/de'
|
||||
weight = 2
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Create a single content adapter in each directory:
|
||||
|
||||
```text
|
||||
content/
|
||||
├── de/
|
||||
│ └── books/
|
||||
│ ├── _content.gotmpl
|
||||
│ └── _index.md
|
||||
└── en/
|
||||
└── books/
|
||||
├── _content.gotmpl
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
## Page collisions
|
||||
|
||||
Two or more pages collide when they have the same publication path. Due to concurrency, the content of the published page is indeterminate. Consider this example:
|
||||
|
||||
```text
|
||||
content/
|
||||
└── books/
|
||||
├── _content.gotmpl <-- content adapter
|
||||
├── _index.md
|
||||
└── the-hunchback-of-notre-dame.md
|
||||
```
|
||||
|
||||
If the content adapter also creates books/the-hunchback-of-notre-dame, the content of the published page is indeterminate. You can not define the processing order.
|
||||
|
||||
To detect page collisions, use the `--printPathWarnings` flag when building your site.
|
||||
|
||||
[content formats]: /content-management/formats/#classification
|
||||
[front matter field]: /content-management/front-matter/#fields
|
||||
[logical path]: /getting-started/glossary/#logical-path
|
||||
[media type]: https://en.wikipedia.org/wiki/Media_type
|
||||
[page kind]: /getting-started/glossary/#page-kind
|
||||
[syntax]: /templates/introduction/
|
||||
[template functions]: /functions/
|
|
@ -16,7 +16,7 @@ The `ref` and `relref` shortcodes display the absolute and relative permalinks t
|
|||
|
||||
## Use of `ref` and `relref`
|
||||
|
||||
The `ref` and `relref` shortcodes require a single parameter: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site.
|
||||
The `ref` and `relref` shortcodes require a single argument: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site.
|
||||
|
||||
```text
|
||||
.
|
||||
|
@ -60,7 +60,7 @@ index.md can be reference either by its path or by its containing folder without
|
|||
{{</* ref "/products/index" */>}} // <- References /products/index.md
|
||||
```
|
||||
|
||||
To generate a hyperlink using `ref` or `relref` in markdown:
|
||||
To generate a hyperlink using `ref` or `relref` in Markdown:
|
||||
|
||||
```text
|
||||
[About]({{</* ref "/about" */>}} "About Us")
|
||||
|
@ -70,9 +70,11 @@ Hugo emits an error or warning if a document cannot be uniquely resolved. The er
|
|||
|
||||
### Link to another language version
|
||||
|
||||
Using `ref` or `relref` without specifying a language, will make the reference resolve to the language of the current content page.
|
||||
|
||||
To link to another language version of a document, use this syntax:
|
||||
|
||||
```go-html-template
|
||||
```text
|
||||
{{</* relref path="document.md" lang="ja" */>}}
|
||||
```
|
||||
|
||||
|
@ -80,7 +82,7 @@ To link to another language version of a document, use this syntax:
|
|||
|
||||
To link to another Output Format of a document, use this syntax:
|
||||
|
||||
```go-html-template
|
||||
```text
|
||||
{{</* relref path="document.md" outputFormat="rss" */>}}
|
||||
```
|
||||
|
||||
|
@ -88,7 +90,7 @@ To link to another Output Format of a document, use this syntax:
|
|||
|
||||
When using Markdown document types, Hugo generates element IDs for every heading on a page. For example:
|
||||
|
||||
```md
|
||||
```text
|
||||
## Reference
|
||||
```
|
||||
|
||||
|
@ -100,14 +102,14 @@ produces this HTML:
|
|||
|
||||
Get the permalink to a heading by appending the ID to the path when using the `ref` or `relref` shortcodes:
|
||||
|
||||
```go-html-template
|
||||
```text
|
||||
{{</* ref "document.md#reference" */>}}
|
||||
{{</* relref "document.md#reference" */>}}
|
||||
```
|
||||
|
||||
Generate a custom heading ID by including an attribute. For example:
|
||||
|
||||
```md
|
||||
```text
|
||||
## Reference A {#foo}
|
||||
## Reference B {id="bar"}
|
||||
```
|
||||
|
@ -121,7 +123,7 @@ produces this HTML:
|
|||
|
||||
Hugo will generate unique element IDs if the same heading appears more than once on a page. For example:
|
||||
|
||||
```md
|
||||
```text
|
||||
## Reference
|
||||
## Reference
|
||||
## Reference
|
||||
|
|
126
content/en/content-management/data-sources.md
Normal file
126
content/en/content-management/data-sources.md
Normal file
|
@ -0,0 +1,126 @@
|
|||
---
|
||||
title: Data sources
|
||||
description: Use local and remote data sources to augment or create content.
|
||||
categories: [content management]
|
||||
keywords: [data,json,toml,yaml,xml]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 280
|
||||
weight: 280
|
||||
toc: true
|
||||
aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/,/templates/data-templates/]
|
||||
---
|
||||
|
||||
Hugo can access and [unmarshal] local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content.
|
||||
|
||||
[unmarshal]: /getting-started/glossary/#unmarshal
|
||||
|
||||
A data source might be a file in the data directory, a [global resource], a [page resource], or a [remote resource].
|
||||
|
||||
[global resource]: /getting-started/glossary/#global-resource
|
||||
[page resource]: /getting-started/glossary/#page-resource
|
||||
[remote resource]: /getting-started/glossary/#remote-resource
|
||||
|
||||
## Data directory
|
||||
|
||||
The data directory in the root of your project may contain one or more data files, in either a flat or nested tree. Hugo merges the data files to create a single data structure, accessible with the `Data` method on a `Site` object.
|
||||
|
||||
Hugo also merges data directories from themes and modules into this single data structure, where the data directory in the root of your project takes precedence.
|
||||
|
||||
{{% note %}}
|
||||
Hugo reads the combined data structure into memory and keeps it there for the entire build. For data that is infrequently accessed, use global or page resources instead.
|
||||
{{% /note %}}
|
||||
|
||||
Theme and module authors may wish to namespace their data files to prevent collisions. For example:
|
||||
|
||||
```text
|
||||
project/
|
||||
└── data/
|
||||
└── mytheme/
|
||||
└── foo.json
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
Do not place CSV files in the data directory. Access CSV files as page, global, or remote resources.
|
||||
{{% /note %}}
|
||||
|
||||
See the documentation for the [`Data`] method on `Page` object for details and examples.
|
||||
|
||||
[`Data`]: /methods/site/data/
|
||||
|
||||
## Global resources
|
||||
|
||||
Use the `resources.Get` and `transform.Unmarshal` functions to access data files that exist as global resources.
|
||||
|
||||
See the [`transform.Unmarshal`](/functions/transform/unmarshal/#global-resource) documentation for details and examples.
|
||||
|
||||
## Page resources
|
||||
|
||||
Use the `Resources.Get` method on a `Page` object combined with the `transform.Unmarshal` function to access data files that exist as page resources.
|
||||
|
||||
See the [`transform.Unmarshal`](/functions/transform/unmarshal/#page-resource) documentation for details and examples.
|
||||
|
||||
## Remote resources
|
||||
|
||||
Use the `resources.GetRemote` and `transform.Unmarshal` functions to access remote data.
|
||||
|
||||
See the [`transform.Unmarshal`](/functions/transform/unmarshal/#remote-resource) documentation for details and examples.
|
||||
|
||||
## Augment existing content
|
||||
|
||||
Use data sources to augment existing content. For example, create a shortcode to render an HTML table from a global CSV resource.
|
||||
|
||||
{{< code file=assets/pets.csv >}}
|
||||
"name","type","breed","age"
|
||||
"Spot","dog","Collie","3"
|
||||
"Felix","cat","Malicious","7"
|
||||
{{< /code >}}
|
||||
|
||||
{{< code file=content/example.md lang=text >}}
|
||||
{{</* csv-to-table "pets.csv" */>}}
|
||||
{{< /code >}}
|
||||
|
||||
{{< code file=layouts/shortcodes/csv-to-table.html >}}
|
||||
{{ with $file := .Get 0 }}
|
||||
{{ with resources.Get $file }}
|
||||
{{ with . | transform.Unmarshal }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{{ range index . 0 }}
|
||||
<th>{{ . }}</th>
|
||||
{{ end }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range after 1 . }}
|
||||
<tr>
|
||||
{{ range . }}
|
||||
<td>{{ . }}</td>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "The %q shortcode was unable to find %s. See %s" $.Name $file $.Position }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "The %q shortcode requires one positional argument, the path to the CSV file relative to the assets directory. See %s" .Name .Position }}
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
Hugo renders this to:
|
||||
|
||||
name|type|breed|age
|
||||
:--|:--|:--|:--
|
||||
Spot|dog|Collie|3
|
||||
Felix|cat|Malicious|7
|
||||
|
||||
## Create new content
|
||||
|
||||
Use [content adapters] to create new content.
|
||||
|
||||
[content adapters]: /content-management/content-adapters/
|
|
@ -1,20 +1,22 @@
|
|||
---
|
||||
title: Diagrams
|
||||
description: Use fenced code blocks and markdown render hooks to display diagrams.
|
||||
description: Use fenced code blocks and Markdown render hooks to include diagrams in your content.
|
||||
categories: [content management]
|
||||
keywords: [diagrams,drawing]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 50
|
||||
weight: 50
|
||||
weight: 260
|
||||
weight: 260
|
||||
toc: true
|
||||
---
|
||||
{{< new-in 0.93.0 >}}
|
||||
|
||||
## GoAT diagrams (ASCII)
|
||||
|
||||
Hugo supports [GoAT](https://github.com/bep/goat) natively. This means that this code block:
|
||||
Hugo natively supports [GoAT] diagrams with an [embedded code block render hook]. This means that this code block:
|
||||
|
||||
[GoAT]: https://github.com/bep/goat
|
||||
[embedded code block render hook]: {{% eturl render-codeblock-goat %}}
|
||||
|
||||
````txt
|
||||
```goat
|
||||
|
@ -44,19 +46,21 @@ Will be rendered as:
|
|||
|
||||
## Mermaid diagrams
|
||||
|
||||
Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create `layouts/_default/_markup/render-codeblock-mermaid.html`:
|
||||
Hugo does not provide a built-in template for Mermaid diagrams. Create your own using a [code block render hook]:
|
||||
|
||||
```go-html-template
|
||||
[code block render hook]: /render-hooks/code-blocks/
|
||||
|
||||
{{< code file=layouts/_default/_markup/render-codeblock-mermaid.html >}}
|
||||
<pre class="mermaid">
|
||||
{{- .Inner | safeHTML }}
|
||||
</pre>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
||||
```
|
||||
{{< /code >}}
|
||||
|
||||
And then include this snippet at the bottom of the content template (**Note**: below `.Content` as the render hook is not processed until `.Content` is executed):
|
||||
And then include this snippet at the bottom of the content template:
|
||||
|
||||
```go-html-template
|
||||
{{ if .Page.Store.Get "hasMermaid" }}
|
||||
{{ if .Store.Get "hasMermaid" }}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Content formats
|
||||
description: Both HTML and Markdown are supported content formats.
|
||||
description: Create your content using Markdown, HTML, Emacs Org Mode, AsciiDoc, Pandoc, or reStructuredText.
|
||||
categories: [content management]
|
||||
keywords: [markdown,asciidoc,pandoc,content format]
|
||||
menu:
|
||||
|
@ -12,82 +12,126 @@ toc: true
|
|||
aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/]
|
||||
---
|
||||
|
||||
You can put any file type into your `/content` directories, but Hugo uses the `markup` front matter value if set or the file extension (see `Markup identifiers` in the table below) to determine if the markup needs to be processed, e.g.:
|
||||
## Introduction
|
||||
|
||||
* Markdown converted to HTML
|
||||
* [Shortcodes](/content-management/shortcodes/) processed
|
||||
* Layout applied
|
||||
You may mix content formats throughout your site. For example:
|
||||
|
||||
## List of content formats
|
||||
```text
|
||||
content/
|
||||
└── posts/
|
||||
├── post-1.md
|
||||
├── post-2.adoc
|
||||
├── post-3.org
|
||||
├── post-4.pandoc
|
||||
├── post-5.rst
|
||||
└── post-6.html
|
||||
```
|
||||
|
||||
The current list of content formats in Hugo:
|
||||
Regardless of content format, all content must have [front matter], preferably including both `title` and `date`.
|
||||
|
||||
| Name | Markup identifiers | Comment |
|
||||
| ------------- | ------------- |-------------|
|
||||
| Goldmark | `markdown`, `goldmark` |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).|
|
||||
|Emacs Org-Mode|`org`|See [go-org](https://github.com/niklasfasching/go-org).|
|
||||
|AsciiDoc|`asciidocext`, `adoc`, `ad`|Needs [Asciidoctor][ascii] installed.|
|
||||
|RST|`rst`|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
|
||||
|Pandoc|`pandoc`, `pdc`|Needs [Pandoc](https://www.pandoc.org/) installed.|
|
||||
|HTML|`html`, `htm`|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|
|
||||
Hugo selects the content renderer based on the `markup` identifier in front matter, falling back to the file extension. See the [classification](#classification) table below for a list of markup identifiers and recognized file extensions.
|
||||
|
||||
The `markup identifier` is fetched from either the `markup` variable in front matter or from the file extension. For markup-related configuration, see [Configure Markup](/getting-started/configuration-markup/).
|
||||
## Formats
|
||||
|
||||
## External helpers
|
||||
### Markdown
|
||||
|
||||
Some of the formats in the table above need external helpers installed on your PC. For example, for AsciiDoc files,
|
||||
Hugo will try to call the `asciidoctor` command. This means that you will have to install the associated
|
||||
tool on your machine to be able to use these formats.
|
||||
Create your content in [Markdown] preceded by front matter.
|
||||
|
||||
Hugo passes reasonable default arguments to these external helpers by default:
|
||||
Markdown is Hugo's default content format. Hugo natively renders Markdown to HTML using [Goldmark]. Goldmark is fast and conforms to the [CommonMark] and [GitHub Flavored Markdown] specifications. You can [configure Goldmark] in your site configuration.
|
||||
|
||||
- `asciidoctor`: `--no-header-footer -`
|
||||
- `rst2html`: `--leave-comments --initial-header-level=2`
|
||||
- `pandoc`: `--mathjax`
|
||||
Hugo provides custom Markdown features including:
|
||||
|
||||
{{% note %}}
|
||||
Because additional formats are external commands, generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome.
|
||||
{{% /note %}}
|
||||
[Attributes]
|
||||
: Apply HTML attributes such as `class` and `id` to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
|
||||
|
||||
### Asciidoctor
|
||||
[Extensions]
|
||||
: Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more.
|
||||
|
||||
The Asciidoctor community offers a wide set of tools for the AsciiDoc format that can be installed additionally to Hugo.
|
||||
[See the Asciidoctor docs for installation instructions](https://asciidoctor.org/docs/install-toolchain/). Make sure that also all
|
||||
optional extensions like `asciidoctor-diagram` or `asciidoctor-html5s` are installed if required.
|
||||
[Mathematics]
|
||||
: Include mathematical equations and expressions in Markdown using LaTeX or TeX typesetting syntax.
|
||||
|
||||
{{% note %}}
|
||||
External `asciidoctor` command requires Hugo rendering to _disk_ to a specific destination directory. It is required to run Hugo with the command option `--destination`.
|
||||
{{% /note %}}
|
||||
[Render hooks]
|
||||
: Override the conversion of Markdown to HTML when rendering fenced code blocks, headings, images, and links. For example, render every standalone image as an HTML `figure` element.
|
||||
|
||||
Some Asciidoctor parameters can be customized in Hugo. See [details].
|
||||
### HTML
|
||||
|
||||
[details]: /getting-started/configuration-markup/#asciidoc
|
||||
Create your content in [HTML] preceded by front matter. The content is typically what you would place within an HTML document's `body` or `main` element.
|
||||
|
||||
## Learn markdown
|
||||
### Emacs Org Mode
|
||||
|
||||
Markdown syntax is simple enough to learn in a single sitting. The following are excellent resources to get you up and running:
|
||||
Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details](/content-management/front-matter/#emacs-org-mode)).
|
||||
|
||||
* [Daring Fireball: Markdown, John Gruber (Creator of Markdown)][fireball]
|
||||
* [Markdown Cheatsheet, Adam Pritchard][mdcheatsheet]
|
||||
* [Markdown Tutorial (Interactive), Garen Torikian][mdtutorial]
|
||||
* [The Markdown Guide, Matt Cone][mdguide]
|
||||
### AsciiDoc
|
||||
|
||||
[ascii]: https://asciidoctor.org/
|
||||
[config]: /getting-started/configuration/
|
||||
[developer tools]: /tools/
|
||||
[fireball]: https://daringfireball.net/projects/markdown/
|
||||
[gfmtasks]: https://guides.github.com/features/mastering-markdown/#syntax
|
||||
[helperssource]: https://github.com/gohugoio/hugo/blob/77c60a3440806067109347d04eb5368b65ea0fe8/helpers/general.go#L65
|
||||
[hl]: /content-management/syntax-highlighting/
|
||||
[hlsc]: /content-management/shortcodes/#highlight
|
||||
[hugocss]: /css/style.css
|
||||
[ietf]: https://tools.ietf.org/html/
|
||||
[mathjaxdocs]: https://docs.mathjax.org/en/latest/
|
||||
[mdcheatsheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
|
||||
[mdguide]: https://www.markdownguide.org/
|
||||
[mdtutorial]: https://www.markdowntutorial.com/
|
||||
[org]: https://orgmode.org/
|
||||
[pandoc]: https://www.pandoc.org/
|
||||
[rest]: https://docutils.sourceforge.io/rst.html
|
||||
[sc]: /content-management/shortcodes/
|
||||
[sct]: /templates/shortcode-templates/
|
||||
Create your content in the [AsciiDoc] format preceded by front matter. Hugo renders AsciiDoc content to HTML using the Asciidoctor executable. You must install Asciidoctor and its dependencies (Ruby) to use the AsciiDoc content format.
|
||||
|
||||
You can [configure the AsciiDoc renderer] in your site configuration.
|
||||
|
||||
In its default configuration, Hugo passes these CLI flags when calling the Asciidoctor executable:
|
||||
|
||||
```text
|
||||
--no-header-footer
|
||||
```
|
||||
|
||||
The CLI flags passed to the Asciidoctor executable depend on configuration. You may inspect the flags when building your site:
|
||||
|
||||
```text
|
||||
hugo --logLevel info
|
||||
```
|
||||
|
||||
### Pandoc
|
||||
|
||||
Create your content in the [Pandoc] format preceded by front matter. Hugo renders Pandoc content to HTML using the Pandoc executable. You must install Pandoc to use the Pandoc content format.
|
||||
|
||||
Hugo passes these CLI flags when calling the Pandoc executable:
|
||||
|
||||
```text
|
||||
--mathjax
|
||||
```
|
||||
|
||||
### reStructuredText
|
||||
|
||||
Create your content in the [reStructuredText] format preceded by front matter. Hugo renders reStructuredText content to HTML using [Docutils], specifically rst2html. You must install Docutils and its dependencies (Python) to use the reStructuredText content format.
|
||||
|
||||
Hugo passes these CLI flags when calling the rst2html executable:
|
||||
|
||||
```text
|
||||
--leave-comments --initial-header-level=2
|
||||
```
|
||||
|
||||
## Classification
|
||||
|
||||
Content format|Media type|Identifier|File extensions
|
||||
:--|:--|:--|:--
|
||||
Markdown|`text/markdown`|`markdown`|`markdown`,`md`, `mdown`
|
||||
HTML|`text/html`|`html`|`htm`, `html`
|
||||
Emacs Org Mode|`text/org`|`org`|`org`
|
||||
AsciiDoc|`text/asciidoc`|`asciidoc`|`ad`, `adoc`, `asciidoc`
|
||||
Pandoc|`text/pandoc`|`pandoc`|`pandoc`, `pdc`
|
||||
reStructuredText|`text/rst`|`rst`|`rst`
|
||||
|
||||
When converting content to HTML, Hugo uses:
|
||||
|
||||
- Native renderers for Markdown, HTML, and Emacs Org mode
|
||||
- External renderers for AsciiDoc, Pandoc, and reStructuredText
|
||||
|
||||
Native renderers are faster than external renderers.
|
||||
|
||||
[AsciiDoc]: https://asciidoc.org/
|
||||
[Asciidoctor]: https://asciidoctor.org/
|
||||
[Attributes]: /content-management/markdown-attributes/
|
||||
[CommonMark]: https://spec.commonmark.org/current/
|
||||
[Docutils]: https://docutils.sourceforge.io/
|
||||
[Emacs Org Mode]: https://orgmode.org/
|
||||
[Extensions]: /getting-started/configuration-markup/#goldmark-extensions
|
||||
[GitHub Flavored Markdown]: https://github.github.com/gfm/
|
||||
[Goldmark]: https://github.com/yuin/goldmark
|
||||
[HTML]: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
|
||||
[Markdown]: https://daringfireball.net/projects/markdown/
|
||||
[Mathematics]: /content-management/mathematics/
|
||||
[Pandoc]: https://pandoc.org/
|
||||
[Render hooks]: https://gohugo.io/render-hooks/introduction/
|
||||
[configure Goldmark]: /getting-started/configuration-markup/#goldmark
|
||||
[configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc
|
||||
[front matter]: /content-management/front-matter/
|
||||
[reStructuredText]: https://docutils.sourceforge.io/rst.html
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Front matter
|
||||
description: Hugo allows you to add front matter in yaml, toml, or json to your content files.
|
||||
description: Use front matter to add metadata to your content.
|
||||
categories: [content management]
|
||||
keywords: [front matter,yaml,toml,json,metadata,archetypes]
|
||||
menu:
|
||||
|
@ -12,230 +12,419 @@ toc: true
|
|||
aliases: [/content/front-matter/]
|
||||
---
|
||||
|
||||
**Front matter** allows you to keep metadata attached to an instance of a [content type]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength.
|
||||
## Overview
|
||||
|
||||
{{< youtube Yh2xKRJGff4 >}}
|
||||
The front matter at the top of each content file is metadata that:
|
||||
|
||||
## Front matter formats
|
||||
- Describes the content
|
||||
- Augments the content
|
||||
- Establishes relationships with other content
|
||||
- Controls the published structure of your site
|
||||
- Determines template selection
|
||||
|
||||
Hugo supports four formats for front matter, each with their own identifying tokens.
|
||||
Provide front matter using a serialization format, one of [JSON], [TOML], or [YAML]. Hugo determines the front matter format by examining the delimiters that separate the front matter from the page content.
|
||||
|
||||
TOML
|
||||
: identified by opening and closing `+++`.
|
||||
[json]: https://www.json.org/
|
||||
[toml]: https://toml.io/
|
||||
[yaml]: https://yaml.org/
|
||||
|
||||
YAML
|
||||
: identified by opening and closing `---`.
|
||||
See examples of front matter delimiters by toggling between the serialization formats below.
|
||||
|
||||
JSON
|
||||
: a single JSON object surrounded by '`{`' and '`}`', followed by a new line.
|
||||
|
||||
ORG
|
||||
: a group of Org mode keywords in the format '`#+KEY: VALUE`'. Any line that does not start with `#+` ends the front matter section.
|
||||
Array values can either be separated into multiple lines (`#+KEY: VALUE_1` and `#+KEY: VALUE_2`) or a whitespace separated list of strings (`#+KEY[]: VALUE_1 VALUE_2`).
|
||||
|
||||
### Example
|
||||
|
||||
{{< code-toggle >}}
|
||||
title = "spf13-vim 3.0 release and new website"
|
||||
description = "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
|
||||
tags = [ ".vimrc", "plugins", "spf13-vim", "vim" ]
|
||||
date = "2012-04-06"
|
||||
categories = [
|
||||
"Development",
|
||||
"VIM"
|
||||
]
|
||||
slug = "spf13-vim-3-0-release-and-new-website"
|
||||
{{< code-toggle file=content/example.md fm=true >}}
|
||||
title = 'Example'
|
||||
date = 2024-02-02T04:14:54-08:00
|
||||
draft = false
|
||||
weight = 10
|
||||
[params]
|
||||
author = 'John Smith'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## Front matter variables
|
||||
Front matter fields may be [scalar], [arrays], or [maps] containing [boolean], [integer], [float], or [string] values. Note that the TOML format also supports date/time values using unquoted strings.
|
||||
|
||||
### Predefined
|
||||
[scalar]: /getting-started/glossary/#scalar
|
||||
[arrays]: /getting-started/glossary/#array
|
||||
[maps]: /getting-started/glossary/#map
|
||||
[boolean]: /getting-started/glossary/#boolean
|
||||
[integer]: /getting-started/glossary/#integer
|
||||
[float]: /getting-started/glossary/#float
|
||||
[string]: /getting-started/glossary/#string
|
||||
|
||||
There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates.
|
||||
## Fields
|
||||
|
||||
aliases
|
||||
: An array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details.
|
||||
|
||||
audio
|
||||
: An array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.
|
||||
|
||||
cascade
|
||||
: A map of front matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details.
|
||||
|
||||
date
|
||||
: The datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable.
|
||||
|
||||
description
|
||||
: The description for the content.
|
||||
|
||||
draft
|
||||
: If `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command.
|
||||
|
||||
expiryDate
|
||||
: The datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command.
|
||||
|
||||
headless
|
||||
: If `true`, sets a leaf bundle to be [headless][headless-bundle].
|
||||
|
||||
images
|
||||
: An array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`.
|
||||
|
||||
isCJKLanguage
|
||||
: If `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages.
|
||||
|
||||
keywords
|
||||
: The meta keywords for the content.
|
||||
|
||||
layout
|
||||
: The layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type].
|
||||
|
||||
lastmod
|
||||
: The datetime at which the content was last modified.
|
||||
|
||||
linkTitle
|
||||
: Used for creating links to content; if set, Hugo defaults to using the `linkTitle` before the `title`.
|
||||
|
||||
markup
|
||||
: **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown.
|
||||
|
||||
outputs
|
||||
: Allows you to specify output formats specific to the content. See [output formats][outputs].
|
||||
|
||||
publishDate
|
||||
: If in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`.
|
||||
|
||||
resources
|
||||
: Used for configuring page bundle resources. See [Page Resources][page-resources].
|
||||
|
||||
series
|
||||
: An array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`.
|
||||
|
||||
slug
|
||||
: Overrides the last segment of the URL path. Not applicable to section pages. See [URL Management](/content-management/urls/#slug) for details.
|
||||
|
||||
summary
|
||||
: Text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section.
|
||||
|
||||
title
|
||||
: The title for the content.
|
||||
|
||||
type
|
||||
: The type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter.
|
||||
|
||||
url
|
||||
: Overrides the entire URL path. Applicable to regular pages and section pages. See [URL Management](/content-management/urls/#url) for details.
|
||||
|
||||
videos
|
||||
: An array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`.
|
||||
|
||||
weight
|
||||
: used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight.
|
||||
The most common front matter fields are `date`, `draft`, `title`, and `weight`, but you can specify metadata using any of fields below.
|
||||
|
||||
{{% note %}}
|
||||
If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site configuration file](/content-management/urls/#permalinks), Hugo will use the file name of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors.
|
||||
The field names below are reserved. For example, you cannot create a custom field named `type`. Create custom fields under the `params` key. See the [parameters] section for details.
|
||||
|
||||
[parameters]: #parameters
|
||||
{{% /note %}}
|
||||
|
||||
### User-defined
|
||||
###### aliases
|
||||
|
||||
You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates.
|
||||
(`string array`) An array of one or more aliases, where each alias is a relative URL that will redirect the browser to the current location. Access these values from a template using the [`Aliases`] method on a `Page` object. See the [aliases] section for details.
|
||||
|
||||
The following fields can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables] section provides more information on using Hugo's page- and site-level variables in your templates.
|
||||
[`aliases`]: /methods/page/aliases/
|
||||
[aliases]: /content-management/urls/#aliases
|
||||
|
||||
{{< code-toggle >}}
|
||||
include_toc: true
|
||||
show_comments: false
|
||||
{{</ code-toggle >}}
|
||||
###### build
|
||||
|
||||
## Front matter cascade
|
||||
(`map`) A map of [build options].
|
||||
|
||||
Any node or section can pass down to descendants a set of front matter values as long as defined underneath the reserved `cascade` front matter key.
|
||||
[build options]: /content-management/build-options/
|
||||
|
||||
###### cascade {#cascade-field}
|
||||
|
||||
(`map`) A map of front matter keys whose values are passed down to the page’s descendants unless overwritten by self or a closer ancestor’s cascade. See the [cascade] section for details.
|
||||
|
||||
[cascade]: #cascade
|
||||
|
||||
###### date
|
||||
|
||||
(`string`) The date associated with the page, typically the creation date. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`Date`] method on a `Page` object.
|
||||
|
||||
[`date`]: /methods/page/date/
|
||||
|
||||
###### description
|
||||
|
||||
(`string`) Conceptually different than the page `summary`, the description is typically rendered within a `meta` element within the `head` element of the published HTML file. Access this value from a template using the [`Description`] method on a `Page` object.
|
||||
|
||||
[`description`]: /methods/page/description/
|
||||
|
||||
###### draft
|
||||
|
||||
(`bool`)
|
||||
If `true`, the page will not be rendered unless you pass the `--buildDrafts` flag to the `hugo` command. Access this value from a template using the [`Draft`] method on a `Page` object.
|
||||
|
||||
[`draft`]: /methods/page/draft/
|
||||
|
||||
###### expiryDate
|
||||
|
||||
(`string`) The page expiration date. On or after the expiration date, the page will not be rendered unless you pass the `--buildExpired` flag to the `hugo` command. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`ExpiryDate`] method on a `Page` object.
|
||||
|
||||
[`expirydate`]: /methods/page/expirydate/
|
||||
|
||||
###### headless
|
||||
|
||||
(`bool`) Applicable to [leaf bundles], if `true` this value sets the `render` and `list` [build options] to `never`, creating a headless bundle of [page resources].
|
||||
|
||||
[leaf bundles]: /content-management/page-bundles/#leaf-bundles
|
||||
[page resources]: /content-management/page-resources/
|
||||
|
||||
###### isCJKLanguage
|
||||
|
||||
(`bool`) Set to `true` if the content language is in the [CJK] family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`], [`FuzzyWordCount`], [`ReadingTime`], and [`Summary`] methods on a `Page` object.
|
||||
|
||||
[`fuzzywordcount`]: /methods/page/wordcount/
|
||||
[`readingtime`]: /methods/page/readingtime/
|
||||
[`summary`]: /methods/page/summary/
|
||||
[`wordcount`]: /methods/page/wordcount/
|
||||
[cjk]: /getting-started/glossary/#cjk
|
||||
|
||||
###### keywords
|
||||
|
||||
(`string array`) An array of keywords, typically rendered within a `meta` element within the `head` element of the published HTML file, or used as a [taxonomy] to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object.
|
||||
|
||||
[`keywords`]: /methods/page/keywords/
|
||||
[taxonomy]: /getting-started/glossary/#taxonomy
|
||||
|
||||
<!-- Added in v0.123.0 but purposefully omitted from documentation. -->
|
||||
<!--
|
||||
kind
|
||||
: The kind of page, e.g. "page", "section", "home" etc. This is usually derived from the content path.
|
||||
-->
|
||||
|
||||
<!-- Added in v0.123.0 but purposefully omitted from documentation. -->
|
||||
<!--
|
||||
lang
|
||||
: The language code for this page. This is usually derived from the module mount or filename.
|
||||
-->
|
||||
|
||||
###### lastmod
|
||||
|
||||
(`string`) The date that the page was last modified. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`Lastmod`] method on a `Page` object.
|
||||
|
||||
[`lastmod`]: /methods/page/date/
|
||||
|
||||
###### layout
|
||||
|
||||
(`string`) Provide a template name to [target a specific template], overriding the default [template lookup order]. Set the value to the base file name of the template, excluding its extension. Access this value from a template using the [`Layout`] method on a `Page` object.
|
||||
|
||||
[`layout`]: /methods/page/layout/
|
||||
[template lookup order]: /templates/lookup-order/
|
||||
[target a specific template]: templates/lookup-order/#target-a-template
|
||||
|
||||
###### linkTitle
|
||||
|
||||
(`string`) Typically a shorter version of the `title`. Access this value from a template using the [`LinkTitle`] method on a `Page` object.
|
||||
|
||||
[`linktitle`]: /methods/page/linktitle/
|
||||
|
||||
###### markup
|
||||
|
||||
(`string`) An identifier corresponding to one of the supported [content formats]. If not provided, Hugo determines the content renderer based on the file extension.
|
||||
|
||||
[content formats]: /content-management/formats/#classification
|
||||
|
||||
###### menus
|
||||
|
||||
(`string`,`string array`, or `map`) If set, Hugo adds the page to the given menu or menus. See the [menus] page for details.
|
||||
|
||||
[menus]: /content-management/menus/#define-in-front-matter
|
||||
|
||||
###### outputs
|
||||
|
||||
(`string array`) The [output formats] to render.
|
||||
|
||||
[output formats]: /templates/output-formats/
|
||||
|
||||
<!-- Added in v0.123.0 but purposefully omitted from documentation. -->
|
||||
<!--
|
||||
path
|
||||
: The canonical page path.
|
||||
-->
|
||||
|
||||
###### params
|
||||
|
||||
{{< new-in 0.123.0 >}}
|
||||
|
||||
(`map`) A map of custom [page parameters].
|
||||
|
||||
[page parameters]: #parameters
|
||||
|
||||
###### publishDate
|
||||
|
||||
(`string`) The page publication date. Before the publication date, the page will not be rendered unless you pass the `--buildFuture` flag to the `hugo` command. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`PublishDate`] method on a `Page` object.
|
||||
|
||||
[`publishdate`]: /methods/page/publishdate/
|
||||
|
||||
###### resources
|
||||
|
||||
(`map array`) An array of maps to provide metadata for [page resources].
|
||||
|
||||
[page-resources]: /content-management/page-resources/#page-resources-metadata
|
||||
|
||||
###### sitemap
|
||||
|
||||
(`map`) A map of sitemap options. See the [sitemap templates] page for details. Access these values from a template using the [`Sitemap`] method on a `Page` object.
|
||||
|
||||
[sitemap templates]: /templates/sitemap-template/
|
||||
[`sitemap`]: /methods/page/sitemap/
|
||||
|
||||
###### slug
|
||||
|
||||
(`string`) Overrides the last segment of the URL path. Not applicable to section pages. See the [URL management] page for details. Access this value from a template using the [`Slug`] method on a `Page` object.
|
||||
|
||||
[`slug`]: /methods/page/slug/
|
||||
[URL management]: /content-management/urls/#slug
|
||||
|
||||
###### summary
|
||||
|
||||
(`string`) Conceptually different than the page `description`, the summary either summarizes the content or serves as a teaser to encourage readers to visit the page. Access this value from a template using the [`Summary`] method on a `Page` object.
|
||||
|
||||
[`Summary`]: /methods/page/summary/
|
||||
|
||||
###### title
|
||||
|
||||
(`string`) The page title. Access this value from a template using the [`Title`] method on a `Page` object.
|
||||
|
||||
[`title`]: /methods/page/title/
|
||||
|
||||
###### translationKey
|
||||
|
||||
(`string`) An arbitrary value used to relate two or more translations of the same page, useful when the translated pages do not share a common path. Access this value from a template using the [`TranslationKey`] method on a `Page` object.
|
||||
|
||||
[`translationkey`]: /methods/page/translationkey/
|
||||
|
||||
###### type
|
||||
|
||||
(`string`) The [content type], overriding the value derived from the top level section in which the page resides. Access this value from a template using the [`Type`] method on a `Page` object.
|
||||
|
||||
[content type]: /getting-started/glossary/#content-type
|
||||
[`type`]: /methods/page/type/
|
||||
|
||||
###### url
|
||||
|
||||
(`string`) Overrides the entire URL path. Applicable to regular pages and section pages. See the [URL management] page for details.
|
||||
|
||||
###### weight
|
||||
(`int`) The page [weight], used to order the page within a [page collection]. Access this value from a template using the [`Weight`] method on a `Page` object.
|
||||
|
||||
[page collection]: /getting-started/glossary/#page-collection
|
||||
[weight]: /getting-started/glossary/#weight
|
||||
[`weight`]: /methods/page/weight/
|
||||
|
||||
## Parameters
|
||||
|
||||
{{< new-in 0.123.0 >}}
|
||||
|
||||
Specify custom page parameters under the `params` key in front matter:
|
||||
|
||||
{{< code-toggle file=content/example.md fm=true >}}
|
||||
title = 'Example'
|
||||
date = 2024-02-02T04:14:54-08:00
|
||||
draft = false
|
||||
weight = 10
|
||||
[params]
|
||||
author = 'John Smith'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Access these values from a template using the [`Params`] or [`Param`] method on a `Page` object.
|
||||
|
||||
[`param`]: /methods/page/param/
|
||||
[`params`]: /methods/page/params/
|
||||
|
||||
Hugo provides [embedded templates] to optionally insert meta data within the `head` element of your rendered pages. These embedded templates expect the following front matter parameters:
|
||||
|
||||
Parameter|Data type|Used by these embedded templates
|
||||
:--|:--|:--
|
||||
`audio`|`[]string`|[`opengraph.html`]
|
||||
`images`|`[]string`|[`opengraph.html`], [`schema.html`], [`twitter_cards.html`]
|
||||
`videos`|`[]string`|[`opengraph.html`]
|
||||
|
||||
The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected.
|
||||
|
||||
[`opengraph.html`]: {{% eturl opengraph %}}
|
||||
[`schema.html`]: {{% eturl schema %}}
|
||||
[`twitter_cards.html`]: {{% eturl twitter_cards %}}
|
||||
[embedded templates]: /templates/embedded/
|
||||
|
||||
## Taxonomies
|
||||
|
||||
Classify content by adding taxonomy terms to front matter. For example, with this site configuration:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[taxonomies]
|
||||
tag = 'tags'
|
||||
genre = 'genres'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Add taxonomy terms as shown below:
|
||||
|
||||
{{< code-toggle file=content/example.md fm=true >}}
|
||||
title = 'Example'
|
||||
date = 2024-02-02T04:14:54-08:00
|
||||
draft = false
|
||||
weight = 10
|
||||
tags = ['red','blue']
|
||||
genres = ['mystery','romance']
|
||||
[params]
|
||||
author = 'John Smith'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
You can add taxonomy terms to the front matter of any these [page kinds]:
|
||||
|
||||
- `home`
|
||||
- `page`
|
||||
- `section`
|
||||
- `taxonomy`
|
||||
- `term`
|
||||
|
||||
[page kinds]: /getting-started/glossary/#page-kind
|
||||
|
||||
Access taxonomy terms from a template using the [`Params`] or [`GetTerms`] method on a `Page` object. For example:
|
||||
|
||||
{{< code file=layouts/_default/single.html >}}
|
||||
{{ with .GetTerms "tags" }}
|
||||
<p>Tags</p>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
[`Params`]: /methods/page/params/
|
||||
[`GetTerms`]: /methods/page/getterms/
|
||||
|
||||
## Cascade
|
||||
|
||||
Any [node] can pass down to its descendants a set of front matter values.
|
||||
|
||||
[node]: /getting-started/glossary/#node
|
||||
|
||||
### Target specific pages
|
||||
|
||||
The `cascade` block can be a slice with a optional `_target` keyword, allowing for multiple `cascade` values targeting different page sets.
|
||||
The `cascade` block can be an array with an optional `_target` keyword, allowing you to target different page sets while cascading values.
|
||||
|
||||
{{< code-toggle >}}
|
||||
title ="Blog"
|
||||
{{< code-toggle file=content/_index.md fm=true >}}
|
||||
title ="Home"
|
||||
[[cascade]]
|
||||
[cascade.params]
|
||||
background = "yosemite.jpg"
|
||||
[cascade._target]
|
||||
path="/blog/**"
|
||||
path="/articles/**"
|
||||
lang="en"
|
||||
kind="page"
|
||||
[[cascade]]
|
||||
[cascade.params]
|
||||
background = "goldenbridge.jpg"
|
||||
[cascade._target]
|
||||
kind="section"
|
||||
{{</ code-toggle >}}
|
||||
|
||||
Keywords available for `_target`:
|
||||
Use any combination of these keywords to target a set of pages:
|
||||
|
||||
path
|
||||
: A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching supports double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down.
|
||||
###### path {#cascade-path}
|
||||
|
||||
kind
|
||||
: A Glob pattern matching the Page's Kind(s), e.g. "{home,section}".
|
||||
(`string`) A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching supports double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down.
|
||||
|
||||
lang
|
||||
: A Glob pattern matching the Page's language, e.g. "{en,sv}".
|
||||
###### kind {#cascade-kind}
|
||||
|
||||
environment
|
||||
: A Glob pattern matching the build environment, e.g. "{production,development}"
|
||||
(`string`) A Glob pattern matching the Page's Kind(s), e.g. "{home,section}".
|
||||
|
||||
###### lang {#cascade-lang}
|
||||
|
||||
(`string`) A Glob pattern matching the Page's language, e.g. "{en,sv}".
|
||||
|
||||
###### environment {#cascade-environment}
|
||||
|
||||
(`string`) A Glob pattern matching the build environment, e.g. "{production,development}"
|
||||
|
||||
Any of the above can be omitted.
|
||||
|
||||
{{% note %}}
|
||||
When making a site that supports multiple languages, defining a `[[cascade]]` is recommended to be done in [Site Config](../../getting-started/configuration/#cascade) to prevent duplication.
|
||||
With a multilingual site it may be more efficient to define the `cascade` values in your site configuration to avoid duplicating the `cascade` values on the section, taxonomy, or term page for each language.
|
||||
|
||||
If you instead define a `[[cascade]]` in front matter for multiple languages, an `content/XX/foo/_index.md` file needs to be made on a per-language basis, with `XX` the glob pattern matching the Page's language. In this case, the **lang** keyword is ignored.
|
||||
With a multilingual site, if you choose to define the `cascade` values in front matter, you must create a section, taxonomy, or term page for each language; the `lang` keyword is ignored.
|
||||
{{% /note %}}
|
||||
|
||||
### Example
|
||||
|
||||
In `content/blog/_index.md`
|
||||
|
||||
{{< code-toggle >}}
|
||||
title: Blog
|
||||
cascade:
|
||||
banner: images/typewriter.jpg
|
||||
{{< code-toggle file=content/posts/_index.md fm=true >}}
|
||||
date = 2024-02-01T21:25:36-08:00
|
||||
title = 'Posts'
|
||||
[cascade]
|
||||
[cascade.params]
|
||||
banner = 'images/typewriter.jpg'
|
||||
{{</ code-toggle >}}
|
||||
|
||||
With the above example the Blog section page and its descendants will return `images/typewriter.jpg` when `.Params.banner` is invoked unless:
|
||||
With the above example the posts section page and its descendants will return `images/typewriter.jpg` when `.Params.banner` is invoked unless:
|
||||
|
||||
- Said descendant has its own `banner` value set
|
||||
- Or a closer ancestor node has its own `cascade.banner` value set.
|
||||
|
||||
## Order content through front matter
|
||||
## Emacs Org Mode
|
||||
|
||||
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views.
|
||||
If your [content format] is [Emacs Org Mode], you may provide front matter using Org Mode keywords. For example:
|
||||
|
||||
## Override global markdown configuration
|
||||
{{< code file=content/example.org lang=text >}}
|
||||
#+TITLE: Example
|
||||
#+DATE: 2024-02-02T04:14:54-08:00
|
||||
#+DRAFT: false
|
||||
#+AUTHOR: John Smith
|
||||
#+GENRES: mystery
|
||||
#+GENRES: romance
|
||||
#+TAGS: red
|
||||
#+TAGS: blue
|
||||
#+WEIGHT: 10
|
||||
{{< /code >}}
|
||||
|
||||
It's possible to set some options for Markdown rendering in a content's front matter as an override to the [rendering options set in your project configuration][config].
|
||||
Note that you can also specify array elements on a single line:
|
||||
|
||||
## Front matter format specs
|
||||
{{< code file=content/example.org lang=text >}}
|
||||
#+TAGS[]: red blue
|
||||
{{< /code >}}
|
||||
|
||||
- [TOML Spec][toml]
|
||||
- [YAML Spec][yaml]
|
||||
- [JSON Spec][json]
|
||||
|
||||
[variables]: /variables/
|
||||
[aliases]: /content-management/urls/#aliases
|
||||
[archetype]: /content-management/archetypes/
|
||||
[config]: /getting-started/configuration/
|
||||
[content type]: /content-management/types/
|
||||
[contentorg]: /content-management/organization/
|
||||
[headless-bundle]: /content-management/page-bundles/#headless-bundle
|
||||
[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
|
||||
[lists]: /templates/lists/#sort-content
|
||||
[lookup]: /templates/lookup-order/
|
||||
[ordering]: /templates/lists/
|
||||
[outputs]: /templates/output-formats/
|
||||
[page-resources]: /content-management/page-resources/
|
||||
[pagevars]: /variables/page/
|
||||
[section]: /content-management/sections/
|
||||
[taxweight]: /content-management/taxonomies/
|
||||
[toml]: https://toml.io/
|
||||
[urls]: /content-management/urls/
|
||||
[variables]: /variables/
|
||||
[yaml]: https://yaml.org/spec/
|
||||
[content format]: /content-management/formats/
|
||||
[emacs org mode]: https://orgmode.org/
|
||||
|
|
|
@ -249,19 +249,21 @@ You may also access EXIF fields individually, using the [`lang.FormatNumber`] fu
|
|||
{{ end }}
|
||||
```
|
||||
|
||||
#### EXIF variables
|
||||
#### EXIF methods
|
||||
|
||||
.Date
|
||||
: Image creation date/time. Format with the [time.Format] function.
|
||||
Date
|
||||
: (`time.Time`) Returns the image creation date/time. Format with the [`time.Format`]function.
|
||||
|
||||
.Lat
|
||||
: GPS latitude in degrees.
|
||||
[time.Format]: /functions/time/format/
|
||||
|
||||
.Long
|
||||
: GPS longitude in degrees.
|
||||
Lat
|
||||
: (`float64`) Returns the GPS latitude in degrees.
|
||||
|
||||
.Tags
|
||||
: A collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data).
|
||||
Long
|
||||
: (`float64`) Returns the GPS longitude in degrees.
|
||||
|
||||
Tags
|
||||
: (`exif.Tags`) Returns a collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration].
|
||||
|
||||
## Image processing options
|
||||
|
||||
|
@ -500,11 +502,11 @@ If you change image processing methods or options, or if you rename or remove im
|
|||
hugo --gc
|
||||
```
|
||||
|
||||
[time.Format]: /functions/time/format
|
||||
|
||||
[`anchor`]: /content-management/image-processing#anchor
|
||||
[mounted]: /hugo-modules/configuration#module-configuration-mounts
|
||||
[page bundle]: /content-management/page-bundles
|
||||
[`lang.FormatNumber`]: /functions/lang/formatnumber
|
||||
[page bundle]: /content-management/page-bundles/
|
||||
[`lang.FormatNumber`]: /functions/lang/formatnumber/
|
||||
[filters]: /functions/images/filter/#image-filters
|
||||
[github.com/disintegration/imaging]: <https://github.com/disintegration/imaging#image-resizing>
|
||||
[Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop>
|
||||
|
|
115
content/en/content-management/markdown-attributes.md
Normal file
115
content/en/content-management/markdown-attributes.md
Normal file
|
@ -0,0 +1,115 @@
|
|||
---
|
||||
title: Markdown attributes
|
||||
description: Use Markdown attributes to add HTML attributes when rendering Markdown to HTML.
|
||||
categories: [content management]
|
||||
keywords: [goldmark,markdown]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 240
|
||||
weight: 240
|
||||
toc: true
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Hugo supports Markdown attributes on images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
|
||||
|
||||
For example:
|
||||
|
||||
```text
|
||||
This is a paragraph.
|
||||
{class="foo bar" id="baz"}
|
||||
```
|
||||
|
||||
With `class` and `id` you can use shorthand notation:
|
||||
|
||||
```text
|
||||
This is a paragraph.
|
||||
{.foo .bar #baz}
|
||||
```
|
||||
|
||||
Hugo renders both of these to:
|
||||
|
||||
```html
|
||||
<p class="foo bar" id="baz">This is a paragraph.</p>
|
||||
```
|
||||
|
||||
## Block elements
|
||||
|
||||
Update your site configuration to enable Markdown attributes for block-level elements.
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[markup.goldmark.parser.attribute]
|
||||
title = true # default is true
|
||||
block = true # default is false
|
||||
{{< /code-toggle >}}
|
||||
|
||||
|
||||
## Standalone images
|
||||
|
||||
By default, when the [Goldmark] Markdown renderer encounters a standalone image element (no other elements or text on the same line), it wraps the image element within a paragraph element per the [CommonMark specification].
|
||||
|
||||
[CommonMark specification]: https://spec.commonmark.org/current/
|
||||
[Goldmark]: https://github.com/yuin/goldmark
|
||||
|
||||
If you were to place an attribute list beneath an image element, Hugo would apply the attributes to the surrounding paragraph, not the image.
|
||||
|
||||
To apply attributes to a standalone image element, you must disable the default wrapping behavior:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[markup.goldmark.parser]
|
||||
wrapStandAloneImageWithinParagraph = false # default is true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## Usage
|
||||
|
||||
You may add [global HTML attributes], or HTML attributes specific to the current element type. Consistent with its content security model, Hugo removes HTML event attributes such as `onclick` and `onmouseover`.
|
||||
|
||||
[global HTML attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
|
||||
|
||||
The attribute list consists of one or more key-value pairs, separated by spaces or commas, wrapped by braces. You must quote string values that contain spaces. Unlike HTML, boolean attributes must have both key and value.
|
||||
|
||||
For example:
|
||||
|
||||
```text
|
||||
> This is a blockquote.
|
||||
{class="foo bar" hidden=hidden}
|
||||
```
|
||||
|
||||
Hugo renders this to:
|
||||
|
||||
```html
|
||||
<blockquote class="foo bar" hidden="hidden">
|
||||
<p>This is a blockquote.</p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
In most cases, place the attribute list beneath the markup element. For headings and fenced code blocks, place the attribute list on the right.
|
||||
|
||||
Element|Position of attribute list
|
||||
:--|:--
|
||||
blockquote | bottom
|
||||
fenced code block | right
|
||||
heading | right
|
||||
horizontal rule | bottom
|
||||
image | bottom
|
||||
list | bottom
|
||||
paragraph | bottom
|
||||
table | bottom
|
||||
|
||||
For example:
|
||||
|
||||
````text
|
||||
## Section 1 {class=foo}
|
||||
|
||||
```bash {class=foo linenos=inline}
|
||||
declare a=1
|
||||
echo "${a}"
|
||||
```
|
||||
|
||||
This is a paragraph.
|
||||
{class=foo}
|
||||
````
|
||||
|
||||
As shown above, the attribute list for fenced code blocks is not limited to HTML attributes. You can also configure syntax highlighting by passing one or more of [these options](/functions/transform/highlight/#options).
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
title: Mathematics in markdown
|
||||
title: Mathematics in Markdown
|
||||
linkTitle: Mathematics
|
||||
description: Include mathematical equations and expressions in your markdown using LaTeX or TeX typesetting syntax.
|
||||
description: Include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax.
|
||||
categories: [content management]
|
||||
keywords: [chemical,chemistry,latex,math,mathjax,tex,typesetting]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 250
|
||||
weight: 250
|
||||
weight: 270
|
||||
weight: 270
|
||||
toc: true
|
||||
math: true
|
||||
---
|
||||
|
@ -45,11 +45,11 @@ The approach described below avoids reliance on platform-specific features like
|
|||
|
||||
## Setup
|
||||
|
||||
Follow these instructions to include mathematical equations and expressions in your markdown using LaTeX or TeX typesetting syntax.
|
||||
Follow these instructions to include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax.
|
||||
|
||||
###### Step 1
|
||||
|
||||
Enable and configure the Goldmark [passthrough extension] in your site configuration. The passthrough extension preserves raw markdown within delimited snippets of text, including the delimiters themselves.
|
||||
Enable and configure the Goldmark [passthrough extension] in your site configuration. The passthrough extension preserves raw Markdown within delimited snippets of text, including the delimiters themselves.
|
||||
|
||||
{{< code-toggle file=hugo copy=true >}}
|
||||
[markup.goldmark.extensions.passthrough]
|
||||
|
@ -122,7 +122,7 @@ The example above loads the partial template if you have set the `math` paramete
|
|||
|
||||
###### Step 4
|
||||
|
||||
Include mathematical equations and expressions in your markdown using LaTeX or TeX typesetting syntax.
|
||||
Include mathematical equations and expressions in your Markdown using LaTeX or TeX typesetting syntax.
|
||||
|
||||
{{< code file=content/math-examples.md copy=true >}}
|
||||
This is an inline \(a^*=x-b^*\) equation.
|
||||
|
@ -152,8 +152,9 @@ If you set the `math` parameter to `false` in your site configuration, you must
|
|||
|
||||
{{< code-toggle file=content/math-examples.md fm=true >}}
|
||||
title = 'Math examples'
|
||||
math = true
|
||||
date = 2024-01-24T18:09:49-08:00
|
||||
[params]
|
||||
math = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## Inline delimiters
|
||||
|
|
|
@ -34,7 +34,7 @@ Although you can use these methods in combination when defining a menu, the menu
|
|||
|
||||
## Define automatically
|
||||
|
||||
To automatically define menu entries for each top-level section of your site, enable the section pages menu in your site configuration.
|
||||
To automatically define a menu entry for each top-level [section] of your site, enable the section pages menu in your site configuration.
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
sectionPagesMenu = "main"
|
||||
|
@ -167,7 +167,7 @@ Each menu entry defined in site configuration requires two or more properties:
|
|||
- Specify `name` and `url` for external links
|
||||
|
||||
pageRef
|
||||
: (`string`) The file path of the target page, relative to the `content` directory. Omit language code and file extension. Required for *internal* links.
|
||||
: (`string`) The logical path of the target page, relative to the `content` directory. Omit language code and file extension. Required for *internal* links.
|
||||
|
||||
Kind|pageRef
|
||||
:--|:--
|
||||
|
@ -229,4 +229,5 @@ See [menu templates].
|
|||
[localize]: /content-management/multilingual/#menus
|
||||
[menu templates]: /templates/menu-templates/
|
||||
[multilingual]: /content-management/multilingual/#menus
|
||||
[section]: /getting-started/glossary/#section
|
||||
[template]: /templates/menu-templates/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Multilingual mode
|
||||
linkTitle: Multilingual
|
||||
description: Hugo supports the creation of websites with multiple languages side by side.
|
||||
description: Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo's multilingual framework supports single-host and multihost configurations.
|
||||
categories: [content management]
|
||||
keywords: [multilingual,i18n,internationalization]
|
||||
menu:
|
||||
|
@ -13,16 +13,24 @@ toc: true
|
|||
aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
|
||||
---
|
||||
|
||||
You should define the available languages in a `languages` section in your site configuration.
|
||||
|
||||
Also See [Hugo Multilingual Part 1: Content translation].
|
||||
|
||||
## Configure languages
|
||||
|
||||
This is the default language configuration:
|
||||
|
||||
{{< code-toggle config=languages />}}
|
||||
|
||||
In the above, `en` is the language key.
|
||||
|
||||
{{% note %}}
|
||||
Each language key must conform to the syntax described in [RFC 5646]. You must use hyphens to separate subtags. For example:
|
||||
|
||||
- `en`
|
||||
- `en-GB`
|
||||
- `pt-BR`
|
||||
|
||||
[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
|
||||
{{% /note %}}
|
||||
|
||||
This is an example of a site configuration for a multilingual project. Any key not defined in a `languages` object will fall back to the global value in the root of your site configuration.
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
|
@ -55,11 +63,11 @@ subtitle = 'Reference, Tutorials, and Explanations'
|
|||
{{< /code-toggle >}}
|
||||
|
||||
defaultContentLanguage
|
||||
: (`string`) The project's default language tag as defined by [RFC 5646]. Must be lower case, and must match one of the defined language keys. Default is `en`. Examples:
|
||||
: (`string`) The project's default language key, conforming to the syntax described in [RFC 5646]. This value must match one of the defined language keys. Examples:
|
||||
|
||||
- `en`
|
||||
- `en-gb`
|
||||
- `pt-br`
|
||||
- `en-GB`
|
||||
- `pt-BR`
|
||||
|
||||
defaultContentLanguageInSubdir
|
||||
: (`bool`) If `true`, Hugo renders the default language site in a subdirectory matching the `defaultContentLanguage`. Default is `false`.
|
||||
|
@ -71,7 +79,7 @@ disabled
|
|||
: (`bool`) If `true`, Hugo will not render content for this language. Default is `false`.
|
||||
|
||||
languageCode
|
||||
: (`string`) The language tag as defined by [RFC 5646]. This value may include upper and lower case characters, hyphens, or underscores, and does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples:
|
||||
: (`string`) The language tag as described in [RFC 5646]. This value does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples:
|
||||
|
||||
- `en`
|
||||
- `en-GB`
|
||||
|
@ -84,7 +92,7 @@ languageName
|
|||
: (`string`) The language name, typically used when rendering a language switcher.
|
||||
|
||||
title
|
||||
: (`string`) The language title. When set, this overrides the site title for this language.
|
||||
: (`string`) The site title for this langauge (optional).
|
||||
|
||||
weight
|
||||
: (`int`) The language weight. When set to a non-zero value, this is the primary sort criteria for this language.
|
||||
|
@ -92,7 +100,7 @@ weight
|
|||
[`dir`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
|
||||
[built-in RSS template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml
|
||||
[built-in alias template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html
|
||||
[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
|
||||
[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
|
||||
[translating by file name]: #translation-by-file-name
|
||||
|
||||
### Changes in Hugo 0.112.0
|
||||
|
@ -150,9 +158,8 @@ Note that you cannot disable the default content language.
|
|||
|
||||
### Configure multilingual multihost
|
||||
|
||||
From **Hugo 0.31** we support multiple languages in a multihost configuration. See [this issue](https://github.com/gohugoio/hugo/issues/4027) for details.
|
||||
|
||||
This means that you can now configure a `baseURL` per `language`:
|
||||
Hugo supports multiple languages in a multihost configuration. This means you can configure a `baseURL` per `language`.
|
||||
|
||||
{{% note %}}
|
||||
If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different.
|
||||
|
@ -162,17 +169,16 @@ Example:
|
|||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[languages]
|
||||
[languages.fr]
|
||||
baseURL = "https://example.fr"
|
||||
languageName = "Français"
|
||||
weight = 1
|
||||
title = "En Français"
|
||||
|
||||
[languages.en]
|
||||
baseURL = "https://example.org/"
|
||||
languageName = "English"
|
||||
weight = 2
|
||||
title = "In English"
|
||||
[languages.en]
|
||||
baseURL = 'https://en.example.org/'
|
||||
languageName = 'English'
|
||||
title = 'In English'
|
||||
weight = 2
|
||||
[languages.fr]
|
||||
baseURL = 'https://fr.example.org'
|
||||
languageName = 'Français'
|
||||
title = 'En Français'
|
||||
weight = 1
|
||||
{{</ code-toggle >}}
|
||||
|
||||
With the above, the two sites will be generated into `public` with their own root:
|
||||
|
@ -309,7 +315,7 @@ To create a list of links to translated content, use a template similar to the f
|
|||
<ul>
|
||||
{{ range .Translations }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .Lang }}: {{ .LinkTitle }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
|
||||
<a href="{{ .RelPermalink }}">{{ .Language.Lang }}: {{ .LinkTitle }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
@ -334,96 +340,9 @@ The above also uses the [`i18n` function][i18func] described in the next section
|
|||
|
||||
## Translation of strings
|
||||
|
||||
Hugo uses [go-i18n] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.
|
||||
See the [`lang.Translate`] template function.
|
||||
|
||||
Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646] with names such as `en-US.toml`, `fr.toml`, etc.
|
||||
|
||||
Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7](https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7) are also supported. You may omit the `art-x-` prefix for brevity. For example:
|
||||
|
||||
```text
|
||||
art-x-hugolang
|
||||
hugolang
|
||||
```
|
||||
|
||||
Private use subtags must not exceed 8 alphanumeric characters.
|
||||
|
||||
### Query basic translation
|
||||
|
||||
From within your templates, use the [`i18n`] function like this:
|
||||
|
||||
[`i18n`]: /functions/lang/translate
|
||||
|
||||
```go-html-template
|
||||
{{ i18n "home" }}
|
||||
```
|
||||
|
||||
The function will search for the `"home"` id:
|
||||
|
||||
{{< code-toggle file=i18n/en-US >}}
|
||||
[home]
|
||||
other = "Home"
|
||||
{{< /code-toggle >}}
|
||||
|
||||
The result will be
|
||||
|
||||
```text
|
||||
Home
|
||||
```
|
||||
|
||||
### Query a flexible translation with variables
|
||||
|
||||
Often you will want to use the page variables in the translation strings. To do so, pass the `.` context when calling `i18n`:
|
||||
|
||||
```go-html-template
|
||||
{{ i18n "wordCount" . }}
|
||||
```
|
||||
|
||||
The function will pass the `.` context to the `"wordCount"` id:
|
||||
|
||||
{{< code-toggle file=i18n/en-US >}}
|
||||
[wordCount]
|
||||
other = "This article has {{ .WordCount }} words."
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Assume `.WordCount` in the context has value is 101. The result will be:
|
||||
|
||||
```text
|
||||
This article has 101 words.
|
||||
```
|
||||
|
||||
### Query a singular/plural translation
|
||||
|
||||
To enable pluralization when translating, pass a map with a numeric `.Count` property to the `i18n` function. The example below uses `.ReadingTime` variable which has a built-in `.Count` property.
|
||||
|
||||
```go-html-template
|
||||
{{ i18n "readingTime" .ReadingTime }}
|
||||
```
|
||||
|
||||
The function will read `.Count` from `.ReadingTime` and evaluate whether the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id in `i18n/en-US.toml` file:
|
||||
|
||||
{{< code-toggle file=i18n/en-US >}}
|
||||
[readingTime]
|
||||
one = "One minute to read"
|
||||
other = "{{ .Count }} minutes to read"
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Assuming `.ReadingTime.Count` in the context has value is 525600. The result will be:
|
||||
|
||||
```text
|
||||
525600 minutes to read
|
||||
```
|
||||
|
||||
If `.ReadingTime.Count` in the context has value is 1. The result is:
|
||||
|
||||
```text
|
||||
One minute to read
|
||||
```
|
||||
|
||||
In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is minimum requirement)
|
||||
|
||||
```go-html-template
|
||||
{{ i18n "readingTime" (dict "Count" 25 "FirstArgument" true "SecondArgument" false "Etc" "so on, so far") }}
|
||||
```
|
||||
[`lang.Translate`]: /functions/lang/translate
|
||||
|
||||
## Localization
|
||||
|
||||
|
@ -676,7 +595,7 @@ To support Multilingual mode in your themes, some considerations must be taken f
|
|||
* Come from the built-in `.Permalink` or `.RelPermalink`
|
||||
* Be constructed with the [`relLangURL`] or [`absLangURL`] template function, or be prefixed with `{{ .LanguagePrefix }}`
|
||||
|
||||
If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
|
||||
If there is more than one language defined, the `LanguagePrefix` method will return `/en` (or whatever the current language is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
|
||||
|
||||
## Generate multilingual content with `hugo new content`
|
||||
|
||||
|
@ -694,23 +613,22 @@ hugo new content content/en/post/test.md
|
|||
hugo new content content/de/post/test.md
|
||||
```
|
||||
|
||||
[`abslangurl`]: /functions/urls/abslangurl
|
||||
[`abslangurl`]: /functions/urls/abslangurl/
|
||||
[config]: /getting-started/configuration/
|
||||
[contenttemplate]: /templates/single-page-templates/
|
||||
[go-i18n-source]: https://github.com/nicksnyder/go-i18n
|
||||
[go-i18n]: https://github.com/nicksnyder/go-i18n
|
||||
[homepage]: /templates/homepage/
|
||||
[Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/
|
||||
[i18func]: /functions/lang/translate
|
||||
[lang.FormatAccounting]: /functions/lang/formataccounting
|
||||
[lang.FormatCurrency]: /functions/lang/formatcurrency
|
||||
[lang.FormatNumber]: /functions/lang/formatnumber
|
||||
[lang.FormatNumberCustom]: /functions/lang/formatnumbercustom
|
||||
[lang.FormatPercent]: /functions/lang/formatpercent
|
||||
[i18func]: /functions/lang/translate/
|
||||
[lang.FormatAccounting]: /functions/lang/formataccounting/
|
||||
[lang.FormatCurrency]: /functions/lang/formatcurrency/
|
||||
[lang.FormatNumber]: /functions/lang/formatnumber/
|
||||
[lang.FormatNumberCustom]: /functions/lang/formatnumbercustom/
|
||||
[lang.FormatPercent]: /functions/lang/formatpercent/
|
||||
[lang.Merge]: /functions/lang/merge/
|
||||
[menus]: /content-management/menus/
|
||||
[OS environment]: /getting-started/configuration/#configure-with-environment-variables
|
||||
[`rellangurl`]: /functions/urls/rellangurl
|
||||
[RFC 5646]: https://tools.ietf.org/html/rfc5646
|
||||
[`rellangurl`]: /functions/urls/rellangurl/
|
||||
[single page templates]: /templates/single-page-templates/
|
||||
[`time.Format`]: /functions/time/format
|
||||
[`time.Format`]: /functions/time/format/
|
||||
|
|
|
@ -19,13 +19,28 @@ Hugo `0.32` announced page-relative images and other resources packaged into `Pa
|
|||
|
||||
These terms are connected, and you also need to read about [Page Resources](/content-management/page-resources) and [Image Processing](/content-management/image-processing) to get the full picture.
|
||||
|
||||
{{< imgproc "1-featured-content-bundles.png" "resize 300x" >}}
|
||||
The illustration shows three bundles. Note that the home page bundle cannot contain other content pages, although other files (images etc.) are allowed.
|
||||
{{< /imgproc >}}
|
||||
```text
|
||||
content/
|
||||
├── blog/
|
||||
│ ├── hugo-is-cool/
|
||||
│ │ ├── images/
|
||||
│ │ │ ├── funnier-cat.jpg
|
||||
│ │ │ └── funny-cat.jpg
|
||||
│ │ ├── cats-info.md
|
||||
│ │ └── index.md
|
||||
│ ├── posts/
|
||||
│ │ ├── post1.md
|
||||
│ │ └── post2.md
|
||||
│ ├── 1-landscape.jpg
|
||||
│ ├── 2-sunset.jpg
|
||||
│ ├── _index.md
|
||||
│ ├── content-1.md
|
||||
│ └── content-2.md
|
||||
├── 1-logo.png
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
The bundle documentation is a **work in progress**. We will publish more comprehensive docs about this soon.
|
||||
{{% /note %}}
|
||||
The file tree above shows three bundles. Note that the home page bundle cannot contain other content pages, although other files (images etc.) are allowed.
|
||||
|
||||
## Organization of content source
|
||||
|
||||
|
@ -52,7 +67,7 @@ Without any additional configuration, the following will automatically work:
|
|||
|
||||
## Path breakdown in Hugo
|
||||
|
||||
The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.org"` in your [site's configuration file][config].
|
||||
The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.org/"` in your [site's configuration file][config].
|
||||
|
||||
### Index pages: `_index.md`
|
||||
|
||||
|
@ -69,7 +84,7 @@ You can create one `_index.md` for your homepage and one in each of your content
|
|||
. ⊢--^-⊣
|
||||
. path slug
|
||||
. ⊢--^-⊣⊢---^---⊣
|
||||
. filepath
|
||||
. file path
|
||||
. ⊢------^------⊣
|
||||
content/posts/_index.md
|
||||
```
|
||||
|
@ -140,7 +155,7 @@ The `url` is the entire URL path, defined by the file path and optionally overri
|
|||
[config]: /getting-started/configuration/
|
||||
[formats]: /content-management/formats/
|
||||
[front matter]: /content-management/front-matter/
|
||||
[getpage]: /methods/page/getpage
|
||||
[getpage]: /methods/page/getpage/
|
||||
[homepage template]: /templates/homepage/
|
||||
[homepage]: /templates/homepage/
|
||||
[lists]: /templates/lists/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Page bundles
|
||||
description: Content organization using Page Bundles
|
||||
description: Use page bundles to logically associate one or more resources with content.
|
||||
categories: [content management]
|
||||
keywords: [page,bundle,leaf,branch]
|
||||
menu :
|
||||
|
@ -11,173 +11,147 @@ weight: 30
|
|||
toc: true
|
||||
---
|
||||
|
||||
Page Bundles are a way to group [Page Resources](/content-management/page-resources/).
|
||||
## Introduction
|
||||
|
||||
A Page Bundle can be one of:
|
||||
A page bundle is a directory that encapsulates both content and associated resources.
|
||||
|
||||
- Leaf Bundle (leaf means it has no children)
|
||||
- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
|
||||
By way of example, this site has an "about" page and a "privacy" page:
|
||||
|
||||
| | Leaf Bundle | Branch Bundle |
|
||||
|-------------------------------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) |
|
||||
| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] |
|
||||
| Allowed Resources | Page and non-page (like images, PDF, etc.) types | Only non-page (like images, PDF, etc.) types |
|
||||
| Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). |
|
||||
| Layout type | [`single`](/templates/single-page-templates/) | [`list`](/templates/lists) |
|
||||
| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it |
|
||||
| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` |
|
||||
| Content from non-index page files...| Accessed only as page resources | Accessed only as regular pages |
|
||||
```text
|
||||
content/
|
||||
├── about/
|
||||
│ ├── index.md
|
||||
│ └── welcome.jpg
|
||||
└── privacy.md
|
||||
```
|
||||
|
||||
The "about" page is a page bundle. It logically associates a resource with content by bundling them together. Resources within a page bundle are [page resources], accessible with the [`Resources`] method on the `Page` object.
|
||||
|
||||
Page bundles are either _leaf bundles_ or _branch bundles_.
|
||||
|
||||
leaf bundle
|
||||
: A _leaf bundle_ is a directory that contains an index.md file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
|
||||
|
||||
branch bundle
|
||||
: A _branch bundle_ is a directory that contains an _index.md file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page.
|
||||
|
||||
{{% note %}}
|
||||
In the definitions above and the examples below, the extension of the index file depends on the [content format]. For example, use index.md for Markdown content, index.html for HTML content, index.adoc for AsciiDoc content, etc.
|
||||
|
||||
[content format]: /getting-started/glossary/#content-format
|
||||
{{% /note %}}
|
||||
|
||||
## Comparison
|
||||
|
||||
Page bundle characteristics vary by bundle type.
|
||||
|
||||
| | Leaf bundle | Branch bundle |
|
||||
|---------------------|---------------------------------------------------------|---------------------------------------------------------|
|
||||
| Index file | index.md | _index.md |
|
||||
| Example | content/about/index.md | content/posts/_index.md |
|
||||
| [Page kinds] | `page` | `home`, `section`, `taxonomy`, or `term` |
|
||||
| Layout type | [single] | [list] |
|
||||
| Descendant pages | None | Zero or more |
|
||||
| Resource location | Adjacent to the index file or in a nested subdirectory | Same as a leaf bundles, but excludes descendant bundles |
|
||||
| [Resource types] | `page`, `image`, `video`, etc. | all but `page` |
|
||||
|
||||
Files with [resource type] `page` include content written in Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode. In a leaf bundle, excluding the index file, these files are only accessible as page resources. In a branch bundle, these files are only accessible as content pages.
|
||||
|
||||
## Leaf bundles
|
||||
|
||||
A _Leaf Bundle_ is a directory at any hierarchy within the `content/`
|
||||
directory, that contains an **`index.md`** file.
|
||||
|
||||
### Examples of leaf bundle organization {#examples-of-leaf-bundle-organization}
|
||||
A _leaf bundle_ is a directory that contains an index.md file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
|
||||
|
||||
```text
|
||||
content/
|
||||
├── about
|
||||
│ ├── index.md
|
||||
│ └── index.md
|
||||
├── posts
|
||||
│ ├── my-post
|
||||
│ │ ├── content1.md
|
||||
│ │ ├── content2.md
|
||||
│ │ ├── image1.jpg
|
||||
│ │ ├── image2.png
|
||||
│ │ ├── content-1.md
|
||||
│ │ ├── content-2.md
|
||||
│ │ ├── image-1.jpg
|
||||
│ │ ├── image-2.png
|
||||
│ │ └── index.md
|
||||
│ └── my-other-post
|
||||
│ └── index.md
|
||||
│
|
||||
└── another-section
|
||||
├── ..
|
||||
├── foo.md
|
||||
└── not-a-leaf-bundle
|
||||
├── ..
|
||||
├── bar.md
|
||||
└── another-leaf-bundle
|
||||
└── index.md
|
||||
```
|
||||
|
||||
In the above example `content/` directory, there are four leaf
|
||||
bundles:
|
||||
There are four leaf bundles in the example above:
|
||||
|
||||
about
|
||||
: This leaf bundle is at the root level (directly under
|
||||
`content` directory) and has only the `index.md`.
|
||||
: This leaf bundle does not contain any page resources.
|
||||
|
||||
my-post
|
||||
: This leaf bundle has the `index.md`, two other content
|
||||
Markdown files and two image files.
|
||||
: This leaf bundle contains an index file, two resources of [resource type] `page`, and two resources of resource type `image`.
|
||||
|
||||
- image1, image2:
|
||||
These images are page resources of `my-post`
|
||||
and only available in `my-post/index.md` resources.
|
||||
- content-1, content-2
|
||||
|
||||
- content1, content2:
|
||||
These content files are page resources of `my-post`
|
||||
and only available in `my-post/index.md` resources.
|
||||
They will **not** be rendered as individual pages.
|
||||
These are resources of resource type `page`, accessible via the [`Resources`] method on the `Page` object. Hugo will not render these as individual pages.
|
||||
|
||||
- image-1, image-2
|
||||
|
||||
These are resources of resource type `image`, accessible via the `Resources` method on the `Page` object
|
||||
|
||||
my-other-post
|
||||
: This leaf bundle has only the `index.md`.
|
||||
: This leaf bundle does not contain any page resources.
|
||||
|
||||
another-leaf-bundle
|
||||
: This leaf bundle is nested under couple of
|
||||
directories. This bundle also has only the `index.md`.
|
||||
: This leaf bundle does not contain any page resources.
|
||||
|
||||
{{% note %}}
|
||||
The hierarchy depth at which a leaf bundle is created does not matter,
|
||||
as long as it is not inside another **leaf** bundle.
|
||||
Create leaf bundles at any depth within the content directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
|
||||
{{% /note %}}
|
||||
|
||||
### Headless bundle
|
||||
|
||||
A headless bundle is a bundle that is configured to not get published
|
||||
anywhere:
|
||||
|
||||
- It will have no `Permalink` and no rendered HTML in `public/`.
|
||||
- It will not be part of `.Site.RegularPages`, etc.
|
||||
|
||||
But you can get it by `.Site.GetPage`. Here is an example:
|
||||
|
||||
```go-html-template
|
||||
{{ $headless := .Site.GetPage "/some-headless-bundle" }}
|
||||
{{ $reusablePages := $headless.Resources.Match "author*" }}
|
||||
<h2>Authors</h2>
|
||||
{{ range $reusablePages }}
|
||||
<h3>{{ .Title }}</h3>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
_In this example, we are assuming the `some-headless-bundle` to be a headless
|
||||
bundle containing one or more **page** resources whose `.Name` matches
|
||||
`"author*"`._
|
||||
|
||||
Explanation of the above example:
|
||||
|
||||
1. Get the `some-headless-bundle` Page "object".
|
||||
2. Collect a _slice_ of resources in this _Page Bundle_ that matches
|
||||
`"author*"` using `.Resources.Match`.
|
||||
3. Loop through that _slice_ of nested pages, and output their `.Title` and
|
||||
`.Content`.
|
||||
|
||||
---
|
||||
|
||||
A leaf bundle can be made headless by adding below in the front matter
|
||||
(in the `index.md`):
|
||||
|
||||
{{< code-toggle file=content/headless/index.md fm=true >}}
|
||||
headless = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
There are many use cases of such headless page bundles:
|
||||
|
||||
- Shared media galleries
|
||||
- Reusable page content "snippets"
|
||||
|
||||
## Branch bundles
|
||||
|
||||
A _Branch Bundle_ is any directory at any hierarchy within the
|
||||
`content/` directory, that contains at least an **`_index.md`** file.
|
||||
|
||||
This `_index.md` can also be directly under the `content/` directory.
|
||||
|
||||
{{% note %}}
|
||||
Here `md` (markdown) is used just as an example. You can use any file
|
||||
type as a content resource as long as it is a content type recognized by Hugo.
|
||||
{{% /note %}}
|
||||
|
||||
### Examples of branch bundle organization
|
||||
A _branch bundle_ is a directory that contains an _index.md file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page.
|
||||
|
||||
```text
|
||||
content/
|
||||
├── branch-bundle-1
|
||||
│ ├── branch-content1.md
|
||||
│ ├── branch-content2.md
|
||||
│ ├── image1.jpg
|
||||
│ ├── image2.png
|
||||
├── branch-bundle-1/
|
||||
│ ├── _index.md
|
||||
│ ├── content-1.md
|
||||
│ ├── content-2.md
|
||||
│ ├── image-1.jpg
|
||||
│ └── image-2.png
|
||||
├── branch-bundle-2/
|
||||
│ ├── a-leaf-bundle/
|
||||
│ │ └── index.md
|
||||
│ └── _index.md
|
||||
└── branch-bundle-2
|
||||
├── _index.md
|
||||
└── a-leaf-bundle
|
||||
└── index.md
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
In the above example `content/` directory, there are two branch
|
||||
bundles (and a leaf bundle):
|
||||
There are three branch bundles in the example above:
|
||||
|
||||
home page
|
||||
: This branch bundle contains an index file, two descendant branch bundles, and no resources.
|
||||
|
||||
branch-bundle-1
|
||||
: This branch bundle has the `_index.md`, two
|
||||
other content Markdown files and two image files.
|
||||
: This branch bundle contains an index file, two resources of [resource type] `page`, and two resources of resource type `image`.
|
||||
|
||||
branch-bundle-2
|
||||
: This branch bundle has the `_index.md` and a
|
||||
nested leaf bundle.
|
||||
: This branch bundle contains an index file and a leaf bundle.
|
||||
|
||||
{{% note %}}
|
||||
The hierarchy depth at which a branch bundle is created does not
|
||||
matter.
|
||||
Create branch bundles at any depth within the content directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
|
||||
{{% /note %}}
|
||||
|
||||
[^fn:1]: The `.md` extension is just an example. The extension can be `.html`, `.json` or any valid MIME type.
|
||||
|
||||
## Headless bundles
|
||||
|
||||
Use [build options] in front matter to create an unpublished leaf or branch bundle whose content and resources you can include in other pages.
|
||||
|
||||
[`Resources`]: /methods/page/resources/
|
||||
[build options]: content-management/build-options/
|
||||
[list]: /templates/lists/
|
||||
[page kinds]: /getting-started/glossary/#page-kind
|
||||
[page resources]: /content-management/page-resources/
|
||||
[resource type]: /getting-started/glossary/#resource-type
|
||||
[resource types]: /getting-started/glossary/#resource-type
|
||||
[single]: /templates/single-page-templates/
|
||||
|
|
|
@ -10,6 +10,7 @@ menu:
|
|||
weight: 80
|
||||
toc: true
|
||||
---
|
||||
|
||||
Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or
|
||||
`_index.md` files at their root. Page resources are only available to the
|
||||
page with which they are bundled.
|
||||
|
@ -114,7 +115,7 @@ GetMatch
|
|||
.Resources.Match "*sunset.jpg" 🚫
|
||||
```
|
||||
|
||||
## Page resources metadata
|
||||
## Metadata
|
||||
|
||||
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
|
||||
|
||||
|
@ -133,7 +134,7 @@ title
|
|||
: Sets the value returned in `Title`
|
||||
|
||||
params
|
||||
: A map of custom key/values.
|
||||
: A map of custom key-value pairs.
|
||||
|
||||
### Resources metadata example
|
||||
|
||||
|
@ -201,3 +202,108 @@ the `Name` and `Title` will be assigned to the resource files as follows:
|
|||
| guide.pdf | `"pdf-file-2.pdf` | `"guide.pdf"` |
|
||||
| other\_specs.pdf | `"pdf-file-3.pdf` | `"Specification #1"` |
|
||||
| photo\_specs.pdf | `"pdf-file-4.pdf` | `"Specification #2"` |
|
||||
|
||||
## Multilingual
|
||||
|
||||
{{< new-in 0.123.0 >}}
|
||||
|
||||
By default, with a multilingual single-host site, Hugo does not duplicate shared page resources when building the site.
|
||||
|
||||
{{% note %}}
|
||||
This behavior is limited to Markdown content. Shared page resources for other [content formats] are copied into each language bundle.
|
||||
|
||||
[content formats]: /content-management/formats/
|
||||
{{% /note %}}
|
||||
|
||||
Consider this site configuration:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
defaultContentLanguage = 'de'
|
||||
defaultContentLanguageInSubdir = true
|
||||
|
||||
[languages.de]
|
||||
languageCode = 'de-DE'
|
||||
languageName = 'Deutsch'
|
||||
weight = 1
|
||||
|
||||
[languages.en]
|
||||
languageCode = 'en-US'
|
||||
languageName = 'English'
|
||||
weight = 2
|
||||
{{< /code-toggle >}}
|
||||
|
||||
And this content:
|
||||
|
||||
```text
|
||||
content/
|
||||
└── my-bundle/
|
||||
├── a.jpg <-- shared page resource
|
||||
├── b.jpg <-- shared page resource
|
||||
├── c.de.jpg
|
||||
├── c.en.jpg
|
||||
├── index.de.md
|
||||
└── index.en.md
|
||||
```
|
||||
|
||||
With v0.122.0 and earlier, Hugo duplicated the shared page resources, creating copies for each language:
|
||||
|
||||
```text
|
||||
public/
|
||||
├── de/
|
||||
│ ├── my-bundle/
|
||||
│ │ ├── a.jpg <-- shared page resource
|
||||
│ │ ├── b.jpg <-- shared page resource
|
||||
│ │ ├── c.de.jpg
|
||||
│ │ └── index.html
|
||||
│ └── index.html
|
||||
├── en/
|
||||
│ ├── my-bundle/
|
||||
│ │ ├── a.jpg <-- shared page resource (duplicate)
|
||||
│ │ ├── b.jpg <-- shared page resource (duplicate)
|
||||
│ │ ├── c.en.jpg
|
||||
│ │ └── index.html
|
||||
│ └── index.html
|
||||
└── index.html
|
||||
|
||||
```
|
||||
|
||||
With v0.123.0 and later, Hugo places the shared resources in the page bundle for the default content language:
|
||||
|
||||
```text
|
||||
public/
|
||||
├── de/
|
||||
│ ├── my-bundle/
|
||||
│ │ ├── a.jpg <-- shared page resource
|
||||
│ │ ├── b.jpg <-- shared page resource
|
||||
│ │ ├── c.de.jpg
|
||||
│ │ └── index.html
|
||||
│ └── index.html
|
||||
├── en/
|
||||
│ ├── my-bundle/
|
||||
│ │ ├── c.en.jpg
|
||||
│ │ └── index.html
|
||||
│ └── index.html
|
||||
└── index.html
|
||||
```
|
||||
|
||||
This approach reduces build times, storage requirements, bandwidth consumption, and deployment times, ultimately reducing cost.
|
||||
|
||||
{{% note %}}
|
||||
To resolve Markdown link and image destinations to the correct location, you must use link and image render hooks that capture the page resource with the [`Resources.Get`] method, and then invoke its [`RelPermalink`] method.
|
||||
|
||||
By default, with multilingual single-host sites, Hugo enables its [embedded link render hook] and [embedded image render hook] to resolve Markdown link and image destinations.
|
||||
|
||||
You may override the embedded render hooks as needed, provided they capture the resource as described above.
|
||||
|
||||
[embedded link render hook]: /render-hooks/links/#default
|
||||
[embedded image render hook]: /render-hooks/images/#default
|
||||
[`Resources.Get`]: /methods/page/resources/#get
|
||||
[`RelPermalink`]: /methods/resource/relpermalink/
|
||||
{{% /note %}}
|
||||
|
||||
Although duplicating shared page resources is inefficient, you can enable this feature in your site configuration if desired:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[markup.goldmark]
|
||||
duplicateResourceFiles = true
|
||||
{{< /code-toggle >}}
|
||||
|
|
|
@ -150,7 +150,7 @@ weight
|
|||
: (`int`) An integer weight that indicates _how important_ this parameter is relative to the other parameters. It can be `0`, which has the effect of turning this index off, or even negative. Test with different values to see what fits your content best.
|
||||
|
||||
cardinalityThreshold {{< new-in 0.111.0 >}}
|
||||
: (`int`) A percentage (0-100) used to remove common keywords from the index. As an example, setting this to `50` will remove all keywords that are used in more than 50% of the documents in the index. Default is `0`.
|
||||
: (`int`) If between 1 and 100, this is a percentage. All keywords that are used in more than this percentage of documents are removed. For example, setting this to `60` will remove all keywords that are used in more than 60% of the documents in the index. If `0`, no keyword is removed from the index. Default is `0`.
|
||||
|
||||
pattern
|
||||
: (`string`) This is currently only relevant for dates. When listing related content, we may want to list content that is also close in time. Setting "2006" (default value for date indexes) as the pattern for a date index will add weight to pages published in the same year. For busier blogs, "200601" (year and month) may be a better default.
|
||||
|
|
|
@ -77,7 +77,10 @@ With the file structure from the [example above](#overview):
|
|||
|
||||
1. The articles/2022 and articles/2023 directories do not have list pages; they are not sections.
|
||||
|
||||
1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `.RegularPagesRecursive` collection instead of the `.Pages` collection in the list template. See [details](/variables/page/#page-collections).
|
||||
1. The list page for the products section, by default, includes product-1 and product-2, but not their descendant pages. To include descendant pages, use the `RegularPagesRecursive` method instead of the `Pages` method in the list template.
|
||||
|
||||
[`Pages`]: /methods/page/pages/
|
||||
[`RegularPagesRecursive`]: /methods/page/regularpagesrecursive/
|
||||
|
||||
1. All directories in the products section have list pages; each directory is a section.
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ In addition to cleaner Markdown, shortcodes can be updated any time to reflect n
|
|||
|
||||
{{< youtube 2xkNJL4gJ9E >}}
|
||||
|
||||
In your content files, a shortcode can be called by calling `{{%/* shortcodename parameters */%}}`. Shortcode parameters are space delimited, and parameters with internal spaces can be quoted.
|
||||
In your content files, a shortcode can be called by calling `{{%/* shortcodename arguments */%}}`. Shortcode arguments are space delimited, and arguments with internal spaces must be quoted.
|
||||
|
||||
The first word in the shortcode declaration is always the name of the shortcode. Parameters follow the name. Depending upon how the shortcode is defined, the parameters may be named, positional, or both, although you can't mix parameter types in a single call. The format for named parameters models that of HTML with the format `name="value"`.
|
||||
The first word in the shortcode declaration is always the name of the shortcode. Arguments follow the name. Depending upon how the shortcode is defined, the arguments may be named, positional, or both, although you can't mix argument types in a single call. The format for named arguments models that of HTML with the format `name="value"`.
|
||||
|
||||
Some shortcodes use or require closing shortcodes. Again like HTML, the opening and closing shortcodes match (name only) with the closing declaration, which is prepended with a slash.
|
||||
|
||||
|
@ -45,20 +45,20 @@ Here are two examples of paired shortcodes:
|
|||
|
||||
The examples above use two different delimiters, the difference being the `%` character in the first and the `<>` characters in the second.
|
||||
|
||||
### Shortcodes with raw string parameters
|
||||
### Shortcodes with raw string arguments
|
||||
|
||||
You can pass multiple lines as parameters to a shortcode by using raw string literals:
|
||||
You can pass multiple lines as arguments to a shortcode by using raw string literals:
|
||||
|
||||
```go-html-template
|
||||
{{</* myshortcode `This is some <b>HTML</b>,
|
||||
and a new line with a "quoted string".` */>}}
|
||||
```
|
||||
|
||||
### Shortcodes with markdown
|
||||
### Shortcodes with Markdown
|
||||
|
||||
Shortcodes using the `%` as the outer-most delimiter will be fully rendered when sent to the content renderer. This means that the rendered output from a shortcode can be part of the page's table of contents, footnotes, etc.
|
||||
|
||||
### Shortcodes without markdown
|
||||
### Shortcodes without Markdown
|
||||
|
||||
The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without Markdown include internal HTML:
|
||||
|
||||
|
@ -68,17 +68,21 @@ The `<` character indicates that the shortcode's inner content does *not* need f
|
|||
|
||||
### Nested shortcodes
|
||||
|
||||
You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` variable. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps].
|
||||
You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` method. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps].
|
||||
|
||||
## Use Hugo's built-in shortcodes
|
||||
## Embedded shortcodes
|
||||
|
||||
Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your Markdown content clean.
|
||||
Use these embedded shortcodes as needed.
|
||||
|
||||
### `figure`
|
||||
### figure
|
||||
|
||||
`figure` is an extension of the image syntax in Markdown, which does not provide a shorthand for the more semantic [HTML5 `<figure>` element][figureelement].
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `figure` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
The `figure` shortcode can use the following named parameters:
|
||||
[source code]: {{% eturl figure %}}
|
||||
{{% /note %}}
|
||||
|
||||
The `figure` shortcode can use the following named arguments:
|
||||
|
||||
src
|
||||
: URL of the image to be displayed.
|
||||
|
@ -87,10 +91,10 @@ link
|
|||
: If the image needs to be hyperlinked, URL of the destination.
|
||||
|
||||
target
|
||||
: Optional `target` attribute for the URL if `link` parameter is set.
|
||||
: Optional `target` attribute for the URL if `link` argument is set.
|
||||
|
||||
rel
|
||||
: Optional `rel` attribute for the URL if `link` parameter is set.
|
||||
: Optional `rel` attribute for the URL if `link` argument is set.
|
||||
|
||||
alt
|
||||
: Alternate text for the image if the image cannot be displayed.
|
||||
|
@ -119,13 +123,13 @@ attr
|
|||
attrlink
|
||||
: If the attribution text needs to be hyperlinked, URL of the destination.
|
||||
|
||||
#### Example `figure` input
|
||||
Example usage:
|
||||
|
||||
{{< code file=figure-input-example.md >}}
|
||||
```text
|
||||
{{</* figure src="elephant.jpg" title="An elephant at sunset" */>}}
|
||||
{{< /code >}}
|
||||
```
|
||||
|
||||
#### Example `figure` output
|
||||
Rendered:
|
||||
|
||||
```html
|
||||
<figure>
|
||||
|
@ -134,7 +138,13 @@ attrlink
|
|||
</figure>
|
||||
```
|
||||
|
||||
### `gist`
|
||||
### gist
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `gist` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
[source code]: {{% eturl gist %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display a GitHub [gist] with this URL:
|
||||
|
||||
|
@ -144,7 +154,7 @@ To display a GitHub [gist] with this URL:
|
|||
https://gist.github.com/user/50a7482715eac222e230d1e64dd9a89b
|
||||
```
|
||||
|
||||
Include this in your markdown:
|
||||
Include this in your Markdown:
|
||||
|
||||
```text
|
||||
{{</* gist user 50a7482715eac222e230d1e64dd9a89b */>}}
|
||||
|
@ -164,7 +174,13 @@ Rendered:
|
|||
|
||||
{{< gist jmooring 23932424365401ffa5e9d9810102a477 list.html >}}
|
||||
|
||||
### `highlight`
|
||||
### highlight
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `highlight` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
[source code]: {{% eturl highlight %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display a highlighted code sample:
|
||||
|
||||
|
@ -204,113 +220,148 @@ Rendered:
|
|||
{{ end }}
|
||||
{{< /highlight >}}
|
||||
|
||||
### `instagram`
|
||||
|
||||
The `instagram` shortcode uses Facebook's **oEmbed Read** feature. The Facebook [developer documentation] states:
|
||||
|
||||
- This permission or feature requires successful completion of the App Review process before your app can access live data. [Learn More]
|
||||
- This permission or feature is only available with business verification. You may also need to sign additional contracts before your app can access data. [Learn More Here]
|
||||
|
||||
[developer documentation]: https://developers.facebook.com/docs/features-reference/oembed-read
|
||||
[Learn More]: https://developers.facebook.com/docs/app-review
|
||||
[Learn More Here]: https://developers.facebook.com/docs/development/release/business-verification
|
||||
|
||||
You must obtain an Access Token to use the `instagram` shortcode.
|
||||
|
||||
If your site configuration is private:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
[services.instagram]
|
||||
accessToken = 'xxx'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
If your site configuration is _not_ private, set the Access Token with an environment variable:
|
||||
|
||||
```sh
|
||||
HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN=xxx hugo --gc --minify
|
||||
```
|
||||
### instagram
|
||||
|
||||
{{% note %}}
|
||||
If you are using a Client Access Token, you must combine the Access Token with your App ID using a pipe symbol (`APPID|ACCESSTOKEN`).
|
||||
To override Hugo's embedded `instagram` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
[source code]: {{% eturl instagram %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display an Instagram post with this URL:
|
||||
|
||||
```text
|
||||
https://www.instagram.com/p/BWNjjyYFxVx/
|
||||
https://www.instagram.com/p/CxOWiQNP2MO/
|
||||
```
|
||||
|
||||
Include this in your markdown:
|
||||
Include this in your Markdown:
|
||||
|
||||
```text
|
||||
{{</* instagram BWNjjyYFxVx */>}}
|
||||
```
|
||||
|
||||
### `param`
|
||||
|
||||
Gets a value from the current `Page's` parameters set in front matter, with a fallback to the site parameter value. It will log an `ERROR` if the parameter with the given key could not be found in either.
|
||||
|
||||
```sh
|
||||
{{</* param testparam */>}}
|
||||
```
|
||||
|
||||
Since `testparam` is a parameter defined in front matter of this page with the value `Hugo Rocks!`, the above will print:
|
||||
|
||||
{{< param testparam >}}
|
||||
|
||||
To access deeply nested parameters, use "dot syntax", e.g:
|
||||
|
||||
```sh
|
||||
{{</* param "my.nested.param" */>}}
|
||||
```
|
||||
|
||||
### `ref` and `relref`
|
||||
|
||||
These shortcodes will look up the pages by their relative path (e.g., `blog/post.md`) or their logical name (`post.md`) and return the permalink (`ref`) or relative permalink (`relref`) for the found page.
|
||||
|
||||
`ref` and `relref` also make it possible to make fragmentary links that work for the header links generated by Hugo.
|
||||
|
||||
{{% note %}}
|
||||
Read a more extensive description of `ref` and `relref` in the [cross references](/content-management/cross-references/) documentation.
|
||||
{{% /note %}}
|
||||
|
||||
`ref` and `relref` take exactly one required parameter of _reference_, quoted and in position `0`.
|
||||
|
||||
#### Example `ref` and `relref` input
|
||||
|
||||
```go-html-template
|
||||
[Neat]({{</* ref "blog/neat.md" */>}})
|
||||
[Who]({{</* relref "about.md#who" */>}})
|
||||
```
|
||||
|
||||
#### Example `ref` and `relref` output
|
||||
|
||||
Assuming that standard Hugo pretty URLs are turned on.
|
||||
|
||||
```html
|
||||
<a href="https://example.org/blog/neat">Neat</a>
|
||||
<a href="/about/#who">Who</a>
|
||||
```
|
||||
|
||||
### `tweet`
|
||||
|
||||
To display a Twitter post with this URL:
|
||||
|
||||
```txt
|
||||
https://twitter.com/SanDiegoZoo/status/1453110110599868418
|
||||
```
|
||||
|
||||
Include this in your markdown:
|
||||
|
||||
```text
|
||||
{{</* tweet user="SanDiegoZoo" id="1453110110599868418" */>}}
|
||||
{{</* instagram CxOWiQNP2MO */>}}
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}}
|
||||
{{< instagram CxOWiQNP2MO >}}
|
||||
|
||||
### `vimeo`
|
||||
### param
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `param` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
[source code]: {{% eturl param %}}
|
||||
{{% /note %}}
|
||||
|
||||
The `param` shortcode renders a parameter from the page's front matter, falling back to a site parameter of the same name. The shortcode throws an error if the parameter does not exist.
|
||||
|
||||
Example usage:
|
||||
|
||||
```text
|
||||
{{</* param testparam */>}}
|
||||
```
|
||||
|
||||
Access nested values by [chaining] the [identifiers]:
|
||||
|
||||
[chaining]: /getting-started/glossary/#chain
|
||||
[identifiers]: /getting-started/glossary/#identifier
|
||||
|
||||
```text
|
||||
{{</* param my.nested.param */>}}
|
||||
```
|
||||
|
||||
### ref
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `ref` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
Always use the `{{%/* */%}}` notation when calling this shortcode.
|
||||
|
||||
[source code]: {{% eturl ref %}}
|
||||
{{% /note %}}
|
||||
|
||||
The `ref` shortcode returns the permalink of the given page reference.
|
||||
|
||||
Example usage:
|
||||
|
||||
```text
|
||||
[Post 1]({{%/* ref "/posts/post-1" */%}})
|
||||
[Post 1]({{%/* ref "/posts/post-1.md" */%}})
|
||||
[Post 1]({{%/* ref "/posts/post-1#foo" */%}})
|
||||
[Post 1]({{%/* ref "/posts/post-1.md#foo" */%}})
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
```html
|
||||
<a href="http://example.org/posts/post-1/">Post 1</a>
|
||||
<a href="http://example.org/posts/post-1/">Post 1</a>
|
||||
<a href="http://example.org/posts/post-1/#foo">Post 1</a>
|
||||
<a href="http://example.org/posts/post-1/#foo">Post 1</a>
|
||||
```
|
||||
|
||||
### relref
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `relref` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
Always use the `{{%/* */%}}` notation when calling this shortcode.
|
||||
|
||||
[source code]: {{% eturl relref %}}
|
||||
{{% /note %}}
|
||||
|
||||
The `relref` shortcode returns the permalink of the given page reference.
|
||||
|
||||
Example usage:
|
||||
|
||||
```text
|
||||
[Post 1]({{%/* relref "/posts/post-1" */%}})
|
||||
[Post 1]({{%/* relref "/posts/post-1.md" */%}})
|
||||
[Post 1]({{%/* relref "/posts/post-1#foo" */%}})
|
||||
[Post 1]({{%/* relref "/posts/post-1.md#foo" */%}})
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
```html
|
||||
<a href="/posts/post-1/">Post 1</a>
|
||||
<a href="/posts/post-1/">Post 1</a>
|
||||
<a href="/posts/post-1/#foo">Post 1</a>
|
||||
<a href="/posts/post-1/#foo">Post 1</a>
|
||||
```
|
||||
|
||||
### twitter
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `twitter` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
You may call the `twitter` shortcode by using its `tweet` alias.
|
||||
|
||||
[source code]: {{% eturl twitter %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display a Twitter post with this URL:
|
||||
|
||||
```txt
|
||||
https://x.com/SanDiegoZoo/status/1453110110599868418
|
||||
```
|
||||
|
||||
Include this in your Markdown:
|
||||
|
||||
```text
|
||||
{{</* twitter user="SanDiegoZoo" id="1453110110599868418" */>}}
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
{{< twitter user="SanDiegoZoo" id="1453110110599868418" >}}
|
||||
|
||||
### vimeo
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `vimeo` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
[source code]: {{% eturl vimeo %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display a Vimeo video with this URL:
|
||||
|
||||
|
@ -318,7 +369,7 @@ To display a Vimeo video with this URL:
|
|||
https://vimeo.com/channels/staffpicks/55073825
|
||||
```
|
||||
|
||||
Include this in your markdown:
|
||||
Include this in your Markdown:
|
||||
|
||||
```text
|
||||
{{</* vimeo 55073825 */>}}
|
||||
|
@ -329,76 +380,98 @@ Rendered:
|
|||
{{< vimeo 55073825 >}}
|
||||
|
||||
{{% note %}}
|
||||
If you want to further customize the visual styling of the YouTube or Vimeo output, add a `class` named parameter when calling the shortcode. The new `class` will be added to the `<div>` that wraps the `<iframe>` *and* will remove the inline styles. Note that you will need to call the `id` as a named parameter as well. You can also give the vimeo video a descriptive title with `title`.
|
||||
If you want to further customize the visual styling, add a `class` argument when calling the shortcode. The new `class` will be added to the `<div>` that wraps the `<iframe>` *and* will remove the inline styles. Note that you will need to call the `id` as a named argument as well. You can also give the vimeo video a descriptive title with `title`.
|
||||
|
||||
```go
|
||||
{{</* vimeo id="146022717" class="my-vimeo-wrapper-class" title="My vimeo video" */>}}
|
||||
```
|
||||
{{% /note %}}
|
||||
|
||||
### `youtube`
|
||||
### youtube
|
||||
|
||||
The `youtube` shortcode embeds a responsive video player for [YouTube videos]. Only the ID of the video is required, e.g.:
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `youtube` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
```txt
|
||||
https://www.youtube.com/watch?v=w7Ft2ymGmfc
|
||||
[source code]: {{% eturl youtube %}}
|
||||
{{% /note %}}
|
||||
|
||||
To display a YouTube video with this URL:
|
||||
|
||||
```text
|
||||
https://www.youtube.com/watch?v=0RKpf3rK57I
|
||||
```
|
||||
|
||||
#### Example `youtube` input
|
||||
Include this in your Markdown:
|
||||
|
||||
Copy the YouTube video ID that follows `v=` in the video's URL and pass it to the `youtube` shortcode:
|
||||
```text
|
||||
{{</* youtube 0RKpf3rK57I */>}}
|
||||
```
|
||||
|
||||
{{< code file=example-youtube-input.md >}}
|
||||
{{</* youtube w7Ft2ymGmfc */>}}
|
||||
{{< /code >}}
|
||||
Rendered:
|
||||
|
||||
Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named and unnamed parameters, so you'll need to assign the yet unnamed video ID to the parameter `id`:
|
||||
{{< youtube 0RKpf3rK57I >}}
|
||||
|
||||
{{< code file=example-youtube-input-with-autoplay.md >}}
|
||||
{{</* youtube id="w7Ft2ymGmfc" autoplay="true" */>}}
|
||||
{{< /code >}}
|
||||
The youtube shortcode accepts these named arguments:
|
||||
|
||||
For [accessibility reasons](https://dequeuniversity.com/tips/provide-iframe-titles), it's best to provide a title for your YouTube video. You can do this using the shortcode by providing a `title` parameter. If no title is provided, a default of "YouTube Video" will be used.
|
||||
id
|
||||
: (`string`) The video `id`. Optional if the `id` is provided as a positional argument as shown in the example above.
|
||||
|
||||
{{< code file=example-youtube-input-with-title.md >}}
|
||||
{{</* youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" */>}}
|
||||
{{< /code >}}
|
||||
allowFullScreen
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`bool`) Whether the `iframe` element can activate full screen mode. Default is `true`.
|
||||
|
||||
#### Example `youtube` output
|
||||
autoplay
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`bool`) Whether to automatically play the video. Forces `mute` to `true`. Default is `false`.
|
||||
|
||||
Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup:
|
||||
class
|
||||
: (`string`) The `class` attribute of the wrapping `div` element. When specified, removes the `style` attributes from the `iframe` element and its wrapping `div` element.
|
||||
|
||||
{{< code file=example-youtube-output.html >}}
|
||||
{{< youtube id="w7Ft2ymGmfc" autoplay="true" >}}
|
||||
{{< /code >}}
|
||||
controls
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`bool`) Whether to display the video controls. Default is `true`.
|
||||
|
||||
#### Example `youtube` display
|
||||
end
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`int`) The time, measured in seconds from the start of the video, when the player should stop playing the video.
|
||||
|
||||
Using the preceding `youtube` example (without `autoplay="true"`), the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your style sheets and surrounding markup. The video is also include in the [Quick Start of the Hugo documentation][quickstart].
|
||||
loading
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`string`) The loading attribute of the `iframe` element, either `eager` or `lazy`. Default is `eager`.
|
||||
|
||||
{{< youtube w7Ft2ymGmfc >}}
|
||||
loop
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`bool`) Whether to indefinitely repeat the video. Ignores the `start` and `end` arguments after the first play. Default is `false`.
|
||||
|
||||
mute
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`bool`) Whether to mute the video. Always `true` when `autoplay` is `true`. Default is `false`.
|
||||
|
||||
start
|
||||
{{< new-in 0.125.0 >}}
|
||||
: (`int`) The time, measured in seconds from the start of the video, when the player should start playing the video.
|
||||
|
||||
title
|
||||
: (`string`) The `title` attribute of the `iframe` element. Defaults to "YouTube video".
|
||||
|
||||
Example using some of the above:
|
||||
|
||||
```text
|
||||
{{</* youtube id=0RKpf3rK57I start=30 end=60 loading=lazy */>}}
|
||||
```
|
||||
|
||||
## Privacy configuration
|
||||
|
||||
To learn how to configure your Hugo site to meet the new EU privacy regulation, see [Hugo and the GDPR].
|
||||
To learn how to configure your Hugo site to meet the new EU privacy regulation, see [privacy protections].
|
||||
|
||||
## Create custom shortcodes
|
||||
|
||||
To learn more about creating custom shortcodes, see the [shortcode template documentation].
|
||||
|
||||
[`figure` shortcode]: #figure
|
||||
[contentmanagementsection]: /content-management/formats/
|
||||
[examplegist]: https://gist.github.com/spf13/7896402
|
||||
[figureelement]: https://html5doctor.com/the-figure-figcaption-elements/
|
||||
[Hugo and the GDPR]: /about/hugo-and-gdpr/
|
||||
[Instagram]: https://www.instagram.com/
|
||||
[pagevariables]: /variables/page/
|
||||
[privacy protections]: /about/privacy/
|
||||
[partials]: /templates/partials/
|
||||
[quickstart]: /getting-started/quick-start/
|
||||
[sctemps]: /templates/shortcode-templates/
|
||||
[scvars]: /variables/shortcode/
|
||||
[shortcode template documentation]: /templates/shortcode-templates/
|
||||
[templatessection]: /templates/
|
||||
[Vimeo]: https://vimeo.com/
|
||||
[YouTube Videos]: https://www.youtube.com/
|
||||
[YouTube Input shortcode]: #youtube
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
---
|
||||
title: Static files
|
||||
description: Files that get served **statically** (as-is, no modification) on the site root.
|
||||
categories: [content management]
|
||||
keywords: [source, directories]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 200
|
||||
weight: 200
|
||||
toc: true
|
||||
aliases: [/static-files]
|
||||
---
|
||||
|
||||
By default, the `static/` directory in the site project is used for
|
||||
all **static files** (e.g. stylesheets, JavaScript, images). The static files are served on the site root path (eg. if you have the file `static/image.png` you can access it using `http://{server-url}/image.png`, to include it in a document you can use `![Example image](/image.png) )`.
|
||||
|
||||
Hugo can be configured to look into a different directory, or even
|
||||
**multiple directories** for such static files by configuring the
|
||||
`staticDir` parameter in the [site configuration]. All the files in all the
|
||||
static directories will form a union filesystem.
|
||||
|
||||
This union filesystem will be served from your site root. So a file
|
||||
`<SITE PROJECT>/static/me.png` will be accessible as
|
||||
`<MY_BASEURL>/me.png`.
|
||||
|
||||
Here's an example of setting `staticDir` and `staticDir2` for a
|
||||
multi-language site:
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
staticDir = ["static1", "static2"]
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
staticDir2 = "static_en"
|
||||
baseURL = "https://example.org/"
|
||||
languageName = "English"
|
||||
weight = 2
|
||||
title = "In English"
|
||||
[languages.no]
|
||||
staticDir = ["staticDir_override", "static_no"]
|
||||
baseURL = "https://example.no"
|
||||
languageName = "Norsk"
|
||||
weight = 1
|
||||
title = "På norsk"
|
||||
{{</ code-toggle >}}
|
||||
|
||||
In the above, with no theme used:
|
||||
|
||||
- The English site will get its static files as a union of "static1",
|
||||
"static2" and "static_en". On file duplicates, the right-most
|
||||
version will win.
|
||||
- The Norwegian site will get its static files as a union of
|
||||
"staticDir_override" and "static_no".
|
||||
|
||||
Note 1
|
||||
: The **2** (can be a number between 0 and 10) in `staticDir2` is
|
||||
added to tell Hugo that you want to **add** this directory to the
|
||||
global set of static directories defined using `staticDir`. Using
|
||||
`staticDir` on the language level would replace the global value (as
|
||||
can be seen in the Norwegian site case).
|
||||
|
||||
Note 2
|
||||
: The example above is a [multihost setup]. In a regular setup, all
|
||||
the static directories will be available to all sites.
|
||||
|
||||
[site configuration]: /getting-started/configuration/#all-configuration-settings
|
||||
[multihost setup]: /content-management/multilingual/#configure-multilingual-multihost
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Content summaries
|
||||
linkTitle: Summaries
|
||||
description: Hugo generates summaries of your content.
|
||||
description: Create and render content summaries.
|
||||
categories: [content management]
|
||||
keywords: [summaries,abstracts,read more]
|
||||
menu:
|
||||
|
@ -13,98 +13,105 @@ toc: true
|
|||
aliases: [/content/summaries/,/content-management/content-summaries/]
|
||||
---
|
||||
|
||||
<!-- Do not remove the manual summary divider below. -->
|
||||
<!-- If you do, you will break its first literal usage on this page. -->
|
||||
<!--more-->
|
||||
|
||||
With the use of the `.Summary` [page variable][pagevariables], Hugo generates summaries of content to use as a short version in summary views.
|
||||
You can define a content summary manually, in front matter, or automatically. A manual content summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary.
|
||||
|
||||
## Summary splitting options
|
||||
Review the [comparison table](#comparison) below to understand the characteristics of each summary type.
|
||||
|
||||
* Automatic Summary Split
|
||||
* Manual Summary Split
|
||||
* Front Matter Summary
|
||||
## Manual summary
|
||||
|
||||
It is natural to accompany the summary with links to the original content, and a common design pattern is to see this link in the form of a "Read More ..." button. See the `.RelPermalink`, `.Permalink`, and `.Truncated` [page variables][pagevariables].
|
||||
Use a `<!--more-->` divider to indicate the end of the content summary. Hugo will not render the summary divider itself.
|
||||
|
||||
### Automatic summary splitting
|
||||
{{< code file=content/sample.md >}}
|
||||
+++
|
||||
title: 'Example'
|
||||
date: 2024-05-26T09:10:33-07:00
|
||||
+++
|
||||
|
||||
By default, Hugo automatically takes the first 70 words of your content as its summary and stores it into the `.Summary` page variable for use in your templates. You may customize the summary length by setting `summaryLength` in your [site configuration](/getting-started/configuration/).
|
||||
Thénardier was not mistaken. The man was sitting there, and letting
|
||||
Cosette get somewhat rested.
|
||||
|
||||
{{% note %}}
|
||||
You can customize how HTML tags in the summary are loaded using functions such as `plainify` and `safeHTML`.
|
||||
{{% /note %}}
|
||||
<!--more-->
|
||||
|
||||
{{% note %}}
|
||||
The Hugo-defined summaries are set to use word count calculated by splitting the text by one or more consecutive whitespace characters. If you are creating content in a `CJK` language and want to use Hugo's automatic summary splitting, set `hasCJKLanguage` to `true` in your [site configuration](/getting-started/configuration/).
|
||||
{{% /note %}}
|
||||
|
||||
### Manual summary splitting
|
||||
|
||||
Alternatively, you may add the `<!--more-->` summary divider where you want to split the article.
|
||||
|
||||
For [Org mode content][org], use `# more` where you want to split the article.
|
||||
|
||||
Content that comes before the summary divider will be used as that content's summary and stored in the `.Summary` page variable with all HTML formatting intact.
|
||||
|
||||
{{% note %}}
|
||||
The concept of a *summary divider* is not unique to Hugo. It is also called the "more tag" or "excerpt separator" in other literature.
|
||||
{{% /note %}}
|
||||
|
||||
Pros
|
||||
: Freedom, precision, and improved rendering. All HTML tags and formatting are preserved.
|
||||
|
||||
Cons
|
||||
: Extra work for content authors, since they need to remember to type `<!--more-->` (or `# more` for [org content][org]) in each content file. This can be automated by adding the summary divider below the front matter of an [archetype](/content-management/archetypes/).
|
||||
|
||||
{{% note %}}
|
||||
Be careful to enter `<!--more-->` exactly; i.e., all lowercase and with no whitespace.
|
||||
{{% /note %}}
|
||||
|
||||
### Front matter summary
|
||||
|
||||
You might want your summary to be something other than the text that starts the article. In this case you can provide a separate summary in the `summary` variable of the article front matter.
|
||||
|
||||
Pros
|
||||
: Complete freedom of text independent of the content of the article. Markup can be used within the summary.
|
||||
|
||||
Cons
|
||||
: Extra work for content authors as they need to write an entirely separate piece of text as the summary of the article.
|
||||
|
||||
## Summary selection order
|
||||
|
||||
Because there are multiple ways in which a summary can be specified it is useful to understand the order of selection Hugo follows when deciding on the text to be returned by `.Summary`. It is as follows:
|
||||
|
||||
1. If there is a `<!--more-->` summary divider present in the article, the text up to the divider will be provided as per the manual summary split method
|
||||
2. If there is a `summary` variable in the article front matter the value of the variable will be provided as per the front matter summary method
|
||||
3. The text at the start of the article will be provided as per the automatic summary split method
|
||||
|
||||
{{% note %}}
|
||||
Hugo uses the _first_ of the above steps that returns text. So if, for example, your article has both `summary` variable in its front matter and a `<!--more-->` summary divider Hugo will use the manual summary split method.
|
||||
{{% /note %}}
|
||||
|
||||
## Example: first 10 articles with summaries
|
||||
|
||||
You can show content summaries with the following code. You could use the following snippet, for example, in a [section template].
|
||||
|
||||
{{< code file=page-list-with-summaries.html >}}
|
||||
{{ range first 10 .Pages }}
|
||||
<article>
|
||||
<!-- this <div> includes the title summary -->
|
||||
<div>
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
{{ if .Truncated }}
|
||||
<!-- This <div> includes a read more link, but only if the summary is truncated... -->
|
||||
<div>
|
||||
<a href="{{ .RelPermalink }}">Read More…</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
The inn-keeper walked round the brushwood and presented himself
|
||||
abruptly to the eyes of those whom he was in search of.
|
||||
{{< /code >}}
|
||||
|
||||
Note how the `.Truncated` boolean variable value may be used to hide the "Read More..." link when the content is not truncated; i.e., when the summary contains the entire article.
|
||||
When using the Emacs Org Mode [content format], use a `# more` divider to indicate the end of the content summary.
|
||||
|
||||
[org]: /content-management/formats/
|
||||
[pagevariables]: /variables/page/
|
||||
[section template]: /templates/section-templates/
|
||||
[content format]: /content-management/formats/
|
||||
|
||||
## Front matter summary
|
||||
|
||||
Use front matter to define a summary independent of content.
|
||||
|
||||
{{< code file=content/sample.md >}}
|
||||
+++
|
||||
title: 'Example'
|
||||
date: 2024-05-26T09:10:33-07:00
|
||||
summary: 'Learn more about _Les Misérables_ by Victor Hugo.'
|
||||
+++
|
||||
|
||||
Thénardier was not mistaken. The man was sitting there, and letting
|
||||
Cosette get somewhat rested. The inn-keeper walked round the
|
||||
brushwood and presented himself abruptly to the eyes of those whom
|
||||
he was in search of.
|
||||
{{< /code >}}
|
||||
|
||||
## Automatic summary
|
||||
|
||||
If you have not defined the summary manually or in front matter, Hugo automatically defines the summary based on the [`summaryLength`] in your site configuration.
|
||||
|
||||
[`summaryLength`]: /getting-started/configuration/#summarylength
|
||||
|
||||
{{< code file=content/sample.md >}}
|
||||
+++
|
||||
title: 'Example'
|
||||
date: 2024-05-26T09:10:33-07:00
|
||||
+++
|
||||
|
||||
Thénardier was not mistaken. The man was sitting there, and letting
|
||||
Cosette get somewhat rested. The inn-keeper walked round the
|
||||
brushwood and presented himself abruptly to the eyes of those whom
|
||||
he was in search of.
|
||||
{{< /code >}}
|
||||
|
||||
For example, with a `summaryLength` of 10, the automatic summary will be:
|
||||
|
||||
```text
|
||||
Thénardier was not mistaken. The man was sitting there, and letting
|
||||
Cosette get somewhat rested.
|
||||
```
|
||||
|
||||
Note that the `summaryLength` is an approximate number of words.
|
||||
|
||||
## Comparison
|
||||
|
||||
Each summary type has different characteristics:
|
||||
|
||||
Type|Precedence|Renders markdown|Renders shortcodes|Strips HTML tags|Wraps single lines with `<p>`
|
||||
:--|:-:|:-:|:-:|:-:|:-:
|
||||
Manual|1|:heavy_check_mark:|:heavy_check_mark:|:x:|:heavy_check_mark:
|
||||
Front matter|2|:heavy_check_mark:|:x:|:x:|:x:
|
||||
Automatic|3|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x:
|
||||
|
||||
## Rendering
|
||||
|
||||
Render the summary in a template by calling the [`Summary`] method on a `Page` object.
|
||||
|
||||
[`Summary`]: /methods/page/summary
|
||||
|
||||
```go-html-template
|
||||
{{ range site.RegularPages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
<div class="summary">
|
||||
{{ .Summary }}
|
||||
{{ if .Truncated }}
|
||||
<a href="{{ .RelPermalink }}">More ...</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
```
|
||||
|
|
|
@ -6,8 +6,8 @@ keywords: [highlighting,chroma,code blocks,syntax]
|
|||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 240
|
||||
weight: 240
|
||||
weight: 250
|
||||
weight: 250
|
||||
toc: true
|
||||
aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
|
||||
---
|
||||
|
@ -20,7 +20,7 @@ See [Configure Highlight](/getting-started/configuration-markup#highlight).
|
|||
|
||||
## Generate syntax highlighter CSS
|
||||
|
||||
If you run with `markup.highlight.noClasses=false` in your site configuration, you need a style sheet.
|
||||
If you run with `markup.highlight.noClasses=false` in your site configuration, you need a style sheet. The style sheet will override the style specified in [`markup.highlight.style`](/functions/transform/highlight/#options).
|
||||
|
||||
You can generate one with Hugo:
|
||||
|
||||
|
@ -32,7 +32,7 @@ Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/s
|
|||
|
||||
## Highlight shortcode
|
||||
|
||||
Highlighting is carried out via the built-in [`highlight` shortcode](/content-management/shortcodes/#highlight). It takes exactly one required parameter for the programming language to be highlighted and requires a closing shortcode.
|
||||
Highlighting is carried out via the built-in [`highlight` shortcode](/content-management/shortcodes/#highlight). It takes exactly one required argument for the programming language to be highlighted and requires a closing tag.
|
||||
|
||||
Options:
|
||||
|
||||
|
|
|
@ -130,26 +130,15 @@ If you want to disable all taxonomies altogether, see the use of `disableKinds`
|
|||
You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose.
|
||||
{{% /note %}}
|
||||
|
||||
## Add taxonomies to content
|
||||
## Assign terms to content
|
||||
|
||||
Once a taxonomy is defined at the site level, any piece of content can be assigned to it, regardless of [content type] or [content section].
|
||||
|
||||
Assigning content to a taxonomy is done in the [front matter]. Simply create a variable with the *plural* name of the taxonomy and assign all terms you want to apply to the instance of the content type.
|
||||
|
||||
{{% note %}}
|
||||
If you would like the ability to quickly generate content files with preconfigured taxonomies or terms, read the docs on [Hugo archetypes](/content-management/archetypes/).
|
||||
{{% /note %}}
|
||||
|
||||
### Example: front matter with taxonomies
|
||||
To assign one or more terms to a page, create a front matter field using the plural name of the taxonomy, then add terms to the corresponding array. For example:
|
||||
|
||||
{{< code-toggle file=content/example.md fm=true >}}
|
||||
title = "Hugo: A fast and flexible static site generator"
|
||||
tags = [ "Development", "Go", "fast", "Blogging" ]
|
||||
categories = [ "Development" ]
|
||||
series = [ "Go Web Dev" ]
|
||||
slug = "hugo"
|
||||
project_url = "https://github.com/gohugoio/hugo"
|
||||
{{</ code-toggle >}}
|
||||
title = 'Example'
|
||||
tags = ['Tag A','Tag B']
|
||||
categories = ['Category A','Category B']
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## Order taxonomies
|
||||
|
||||
|
@ -182,7 +171,7 @@ wikipedia: "https://en.wikipedia.org/wiki/Bruce_Willis"
|
|||
[content type]: /content-management/types/
|
||||
[documentation on archetypes]: /content-management/archetypes/
|
||||
[front matter]: /content-management/front-matter/
|
||||
[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-list-templates
|
||||
[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-templates
|
||||
[taxonomy templates]: /templates/taxonomy-templates/
|
||||
[terms within the taxonomy]: /templates/taxonomy-templates/#taxonomy-terms-templates
|
||||
[terms within the taxonomy]: /templates/taxonomy-templates/#term-templates
|
||||
[site configuration]: /getting-started/configuration/
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
---
|
||||
title: Table of contents
|
||||
description: Hugo can automatically parse Markdown content and create a Table of Contents you can use in your templates.
|
||||
categories: [content management]
|
||||
keywords: [table of contents, toc]
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 210
|
||||
weight: 210
|
||||
toc: true
|
||||
aliases: [/extras/toc/]
|
||||
---
|
||||
|
||||
{{% note %}}
|
||||
|
||||
Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` was going to start at `<h1>` when pulling from `{{ .Content }}`.
|
||||
|
||||
Hugo [v0.60.0](https://github.com/gohugoio/hugo/releases/tag/v0.60.0) made a switch to [Goldmark](https://github.com/yuin/goldmark/) as the default library for Markdown which has improved and configurable implementation of TOC. Take a look at [how to configure TOC](/getting-started/configuration-markup/#table-of-contents) for Goldmark renderer.
|
||||
|
||||
{{% /note %}}
|
||||
|
||||
## Usage
|
||||
|
||||
Create your Markdown the way you normally would with the appropriate headings. Here is some example content:
|
||||
|
||||
```md
|
||||
<!-- Your front matter up here -->
|
||||
|
||||
## Introduction
|
||||
|
||||
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
|
||||
|
||||
## My Heading
|
||||
|
||||
He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment.
|
||||
|
||||
### My Subheading
|
||||
|
||||
A collection of textile samples lay spread out on the table - Samsa was a traveling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
|
||||
```
|
||||
|
||||
Hugo will take this Markdown and create a table of contents from `## Introduction`, `## My Heading`, and `### My Subheading` and then store it in the [page variable][pagevars]`.TableOfContents`.
|
||||
|
||||
The built-in `.TableOfContents` variables outputs a `<nav id="TableOfContents">` element with a child `<ul>`, whose child `<li>` elements begin with appropriate HTML headings. See [the available settings](/getting-started/configuration-markup/#table-of-contents) to configure what heading levels you want to include in TOC.
|
||||
|
||||
## Template example: basic TOC
|
||||
|
||||
The following is an example of a very basic [single page template]:
|
||||
|
||||
{{< code file=layout/_default/single.html >}}
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
<aside>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
</main>
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
## Template example: TOC partial
|
||||
|
||||
The following is a [partial template][partials] that adds slightly more logic for page-level control over your table of contents. It assumes you are using a `toc` field in your content's [front matter] that, unless specifically set to `false`, will add a TOC to any page with a `.WordCount` (see [Page Variables][pagevars]) greater than 400. This example also demonstrates how to use [conditionals] in your templating:
|
||||
|
||||
{{< code file=layouts/partials/toc.html >}}
|
||||
{{ if and (gt .WordCount 400 ) (.Params.toc) }}
|
||||
<aside>
|
||||
<header>
|
||||
<h2>{{ .Title }}</h2>
|
||||
</header>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
{{< /code >}}
|
||||
|
||||
{{% note %}}
|
||||
With the preceding example, even pages with > 400 words *and* `toc` not set to `false` will not render a table of contents if there are no headings in the page for the `{{ .TableOfContents }}` variable to pull from.
|
||||
{{% /note %}}
|
||||
|
||||
## Usage with AsciiDoc
|
||||
|
||||
Hugo supports table of contents with AsciiDoc content format.
|
||||
|
||||
In the header of your content file, specify the AsciiDoc TOC directives necessary to ensure that the table of contents is generated. Hugo will use the generated TOC to populate the page variable `.TableOfContents` in the same way as described for Markdown. See example below:
|
||||
|
||||
```asciidoc
|
||||
// <!-- Your front matter up here -->
|
||||
:toc:
|
||||
// Set toclevels to be at least your hugo [markup.tableOfContents.endLevel] configuration key
|
||||
:toclevels: 4
|
||||
|
||||
== Introduction
|
||||
|
||||
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
|
||||
|
||||
== My Heading
|
||||
|
||||
He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment.
|
||||
|
||||
=== My Subheading
|
||||
|
||||
A collection of textile samples lay spread out on the table - Samsa was a traveling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame. It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops
|
||||
```
|
||||
|
||||
Hugo will take this AsciiDoc and create a table of contents store it in the page variable `.TableOfContents`, in the same as described for Markdown.
|
||||
|
||||
[conditionals]: /templates/introduction/#conditionals
|
||||
[front matter]: /content-management/front-matter/
|
||||
[pagevars]: /variables/page/
|
||||
[partials]: /templates/partials/
|
||||
[single page template]: /templates/single-page-templates/
|
|
@ -89,12 +89,10 @@ If you set both `slug` and `url` in front matter, the `url` value takes preceden
|
|||
|
||||
### Permalinks
|
||||
|
||||
In your site configuration, define a URL pattern for each top-level section. Each URL pattern can target a given language and/or [page kind].
|
||||
In your site configuration, define a URL pattern for each top-level section. Each URL pattern can target a given language and/or page kind.
|
||||
|
||||
Front matter `url` values override the URL patterns defined in the `permalinks` section of your site configuration.
|
||||
|
||||
[page kind]: /templates/section-templates/#page-kinds
|
||||
|
||||
#### Monolingual examples {#permalinks-monolingual-examples}
|
||||
|
||||
With this content structure:
|
||||
|
@ -235,46 +233,46 @@ public/
|
|||
|
||||
#### Tokens
|
||||
|
||||
Use these tokens when defining the URL pattern. The `date` field in front matter determines the value of time-related tokens.
|
||||
Use these tokens when defining the URL pattern.
|
||||
|
||||
`:year`
|
||||
: the 4-digit year
|
||||
: The 4-digit year as defined in the front matter `date` field.
|
||||
|
||||
`:month`
|
||||
: the 2-digit month
|
||||
: The 2-digit month as defined in the front matter `date` field.
|
||||
|
||||
`:monthname`
|
||||
: the name of the month
|
||||
: The name of the month as defined in the front matter `date` field.
|
||||
|
||||
`:day`
|
||||
: the 2-digit day
|
||||
: The 2-digit day as defined in the front matter `date` field.
|
||||
|
||||
`:weekday`
|
||||
: the 1-digit day of the week (Sunday = 0)
|
||||
: The 1-digit day of the week as defined in the front matter `date` field (Sunday = 0).
|
||||
|
||||
`:weekdayname`
|
||||
: the name of the day of the week
|
||||
: The name of the day of the week as defined in the front matter `date` field.
|
||||
|
||||
`:yearday`
|
||||
: the 1- to 3-digit day of the year
|
||||
: The 1- to 3-digit day of the year as defined in the front matter `date` field.
|
||||
|
||||
`:section`
|
||||
: the content's section
|
||||
: The content's section.
|
||||
|
||||
`:sections`
|
||||
: the content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact.
|
||||
: The content's sections hierarchy. You can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact.
|
||||
|
||||
`:title`
|
||||
: the content's title
|
||||
: The title as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file.
|
||||
|
||||
`:slug`
|
||||
: the content's slug (or title if no slug is provided in the front matter)
|
||||
|
||||
`:slugorfilename`
|
||||
: the content's slug (or file name if no slug is provided in the front matter)
|
||||
: The slug as defined in front matter, else the title as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file.
|
||||
|
||||
`:filename`
|
||||
: the content's file name (without extension)
|
||||
: The content's file name without extension, applicable to the `page` page kind.
|
||||
|
||||
`:slugorfilename`
|
||||
: The slug as defined in front matter, else the content's file name without extension, applicable to the `page` page kind.
|
||||
|
||||
For time-related values, you can also use the layout string components defined in Go's [time package]. For example:
|
||||
|
||||
|
@ -307,7 +305,7 @@ Hugo provides two mutually exclusive configuration options to alter URLs _after_
|
|||
#### Canonical URLs
|
||||
|
||||
{{% note %}}
|
||||
This is a legacy configuration option, superseded by template functions and markdown render hooks, and will likely be [removed in a future release].
|
||||
This is a legacy configuration option, superseded by template functions and Markdown render hooks, and will likely be [removed in a future release].
|
||||
|
||||
[removed in a future release]: https://github.com/gohugoio/hugo/issues/4733
|
||||
{{% /note %}}
|
||||
|
@ -423,10 +421,12 @@ Hugo renders alias files before rendering pages. A new page with the previous fi
|
|||
|
||||
### Customize
|
||||
|
||||
Create a new template (`layouts/alias.html`) to customize the content of the alias files. The template receives the following context:
|
||||
To override Hugo's embedded `alias` template, copy the [source code] to a file with the same name in the layouts directory. The template receives the following context:
|
||||
|
||||
Permalink
|
||||
: the link to the page being aliased
|
||||
: The link to the page being aliased.
|
||||
|
||||
Page
|
||||
: the Page data for the page being aliased
|
||||
: The Page data for the page being aliased.
|
||||
|
||||
[source code]: {{% eturl alias %}}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: Contribute to the Hugo project
|
||||
linkTitle: Overview
|
||||
linkTitle: In this section
|
||||
description: Contribute to Hugo development, documentation, and themes.
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
identifier: contribute-overview
|
||||
identifier: contribute-in-this-section
|
||||
parent: contribute
|
||||
weight: 10
|
||||
weight: 10
|
||||
|
|
|
@ -11,8 +11,6 @@ weight: 20
|
|||
toc: true
|
||||
---
|
||||
|
||||
|
||||
|
||||
## Introduction
|
||||
|
||||
You can contribute to the Hugo project by:
|
||||
|
@ -146,3 +144,31 @@ Step 9
|
|||
|
||||
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:
|
||||
|
||||
```sh
|
||||
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
|
||||
```
|
||||
|
||||
To build and install a specific release:
|
||||
|
||||
```sh
|
||||
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.126.0
|
||||
```
|
||||
|
||||
To build and install at the latest commit on the master branch:
|
||||
|
||||
```sh
|
||||
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@master
|
||||
```
|
||||
|
||||
To build and install at a specific commit:
|
||||
|
||||
```sh
|
||||
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@0851c17
|
||||
```
|
||||
|
|
|
@ -24,13 +24,13 @@ For documentation related to a new feature, please include the documentation cha
|
|||
|
||||
### Markdown
|
||||
|
||||
Please follow these markdown guidelines:
|
||||
Please follow these guidelines:
|
||||
|
||||
- Use [ATX] headings, not [setext] headings, levels 2 through 4
|
||||
- Use [fenced code blocks], not [indented code blocks]
|
||||
- Use hyphens, not asterisks, with unordered [list items]
|
||||
- Use the [note shortcode] instead of blockquotes
|
||||
- Do not mix [raw HTML] within markdown
|
||||
- Do not mix [raw HTML] within Markdown
|
||||
- Do not use bold text instead of a heading or description term (`dt`)
|
||||
- Remove consecutive blank lines (maximum of two)
|
||||
- Remove trailing spaces
|
||||
|
@ -44,15 +44,18 @@ Although we do not strictly adhere to the [Microsoft Writing Style Guide], it is
|
|||
Please link to the [glossary of terms] when necessary, and use the terms consistently throughout the documentation. Of special note:
|
||||
|
||||
- The term "front matter" is two words unless you are referring to the configuration key
|
||||
- The term "standalone" is one word, not hyphenated
|
||||
- Use the word "map" instead of "dictionary"
|
||||
- Use the word "flag" instead of "option" when referring to a command line flag
|
||||
- Capitalize the word "Markdown"
|
||||
- Hyphenate the term "open-source" when used an adjective.
|
||||
|
||||
#### Page titles and headings
|
||||
|
||||
Please follow these guidelines for page titles and headings:
|
||||
|
||||
- Use sentence-style capitalization
|
||||
- Avoid markdown in headings and page titles
|
||||
- Avoid formatted strings in headings and page titles
|
||||
- Shorter is better
|
||||
|
||||
#### Use active voice with present tense
|
||||
|
@ -92,11 +95,11 @@ Other guidelines to consider:
|
|||
- When including code samples, use short snippets that demonstrate the concept.
|
||||
- The Hugo user community is global; use [basic english](https://simple.wikipedia.org/wiki/Basic_English) when possible.
|
||||
|
||||
#### Level 6 markdown headings
|
||||
#### Level 6 headings
|
||||
|
||||
Level 6 markdown headings are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms.
|
||||
Level 6 headings are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms.
|
||||
|
||||
[glossary]: /getting-started/glossary
|
||||
[glossary]: /getting-started/glossary/
|
||||
|
||||
## Code examples
|
||||
|
||||
|
@ -202,26 +205,6 @@ Rendered:
|
|||
|
||||
These shortcodes are commonly used throughout the documentation. Other shortcodes are available for specialized use.
|
||||
|
||||
### deprecated-in
|
||||
|
||||
Use the “deprecated-in” shortcode to indicate that a feature is deprecated:
|
||||
|
||||
```text
|
||||
{{%/* deprecated-in 0.120.0 */%}}
|
||||
Use [`hugo.IsServer`] instead.
|
||||
|
||||
[`hugo.IsServer`]: /functions/hugo/isserver
|
||||
{{%/* /deprecated-in */%}}
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
{{% deprecated-in 0.120.0 %}}
|
||||
Use [`hugo.IsServer`] instead.
|
||||
|
||||
[`hugo.IsServer`]: /functions/hugo/isserver
|
||||
{{% /deprecated-in %}}
|
||||
|
||||
### code
|
||||
|
||||
Use the "code" shortcode for other code examples that require a file name. See the [code examples] above. This shortcode takes these arguments:
|
||||
|
@ -233,7 +216,7 @@ file
|
|||
: (`string`) The file name to display.
|
||||
|
||||
lang
|
||||
: (`string`) The code language. If you do not provide a `lang` argument, the code language is determined by the file extension. If the file extension is "html", sets the code language to `go-html-template`. Default is `text`.
|
||||
: (`string`) The code language. If you do not provide a `lang` argument, the code language is determined by the file extension. If the file extension is `html`, sets the code language to `go-html-template`. Default is `text`.
|
||||
|
||||
### code-toggle
|
||||
|
||||
|
@ -248,17 +231,54 @@ file
|
|||
fm
|
||||
: (`bool`) Whether the example is front matter. Default is `false`.
|
||||
|
||||
|
||||
### deprecated-in
|
||||
|
||||
Use the “deprecated-in” shortcode to indicate that a feature is deprecated:
|
||||
|
||||
```text
|
||||
{{%/* deprecated-in 0.127.0 */%}}
|
||||
Use [`hugo.IsServer`] instead.
|
||||
|
||||
[`hugo.IsServer`]: /functions/hugo/isserver/
|
||||
{{%/* /deprecated-in */%}}
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
{{% deprecated-in 0.127.0 %}}
|
||||
Use [`hugo.IsServer`] instead.
|
||||
|
||||
[`hugo.IsServer`]: /functions/hugo/isserver/
|
||||
{{% /deprecated-in %}}
|
||||
|
||||
### eturl
|
||||
|
||||
Use the embedded template URL (eturl) shortcode to insert an absolute URL to the source code for an embedded template. The shortcode takes a single argument, the base file name of the template (omit the file extension).
|
||||
|
||||
```text
|
||||
This is a link to the [embedded alias template].
|
||||
|
||||
[embedded alias template]: {{%/* eturl alias */%}}
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
This is a link to the [embedded alias template].
|
||||
|
||||
[embedded alias template]: {{% eturl alias %}}
|
||||
|
||||
### new-in
|
||||
|
||||
Use the "new-in" shortcode to indicate a new feature:
|
||||
|
||||
```text
|
||||
{{</* new-in 0.120.0 */>}}
|
||||
{{</* new-in 0.127.0 */>}}
|
||||
```
|
||||
|
||||
Rendered:
|
||||
|
||||
{{< new-in 0.120.0 >}}
|
||||
{{< new-in 0.127.0 >}}
|
||||
|
||||
### note
|
||||
|
||||
|
@ -288,7 +308,7 @@ Use the "new-in" shortcode to indicate a new feature:
|
|||
{{</* new-in 0.120.0 */>}}
|
||||
{{< /code >}}
|
||||
|
||||
The "new in" label will be hidden if the specified version is older than a predefined threshold, based on differences in major and minor versions. See [details](https://github.com/gohugoio/hugoDocs/blob/master/layouts/shortcodes/new-in.html).
|
||||
The "new in" label will be hidden if the specified version is older than a predefined threshold, based on differences in major and minor versions. See [details](https://github.com/gohugoio/hugoDocs/blob/master/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html).
|
||||
|
||||
## Deprecated features
|
||||
|
||||
|
@ -298,7 +318,7 @@ Use the "deprecated-in" shortcode to indicate that a feature is deprecated:
|
|||
{{%/* deprecated-in 0.120.0 */%}}
|
||||
Use [`hugo.IsServer`] instead.
|
||||
|
||||
[`hugo.IsServer`]: /functions/hugo/isserver
|
||||
[`hugo.IsServer`]: /functions/hugo/isserver/
|
||||
{{%/* /deprecated-in */%}}
|
||||
{{< /code >}}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue