From 9d0c86ee85b24b3f703b278624141d91fbb810de Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 18 Apr 2024 12:04:47 -0700 Subject: [PATCH 1/7] commands: Add gen chromastyles --lineNumbersTableStyle flag For symmetry, also rename --linesStyle to --lineNumbersInlineStyle. Closes #12393 --- content/en/commands/hugo_gen_chromastyles.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/content/en/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md index 1970ed736..6ecb00bd0 100644 --- a/content/en/commands/hugo_gen_chromastyles.md +++ b/content/en/commands/hugo_gen_chromastyles.md @@ -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 From a2548dac9d19ab93480843348cf10c94791166b9 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 3 May 2024 18:06:10 -0700 Subject: [PATCH 2/7] markup/goldmark: Support extras extension Enables inclusion of these HTML elements in Markdown: - Inserted Text (++inserted++) - Mark Text (==marked==) - Subscript (H~2~O) - Superscript (1^st^) --- data/docs.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data/docs.yaml b/data/docs.yaml index dcc96c590..036c21285 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -1065,6 +1065,15 @@ config: enable: false escapedSpace: false definitionList: true + extras: + insert: + enable: false + mark: + enable: false + subscript: + enable: false + superscript: + enable: false footnote: true linkify: true linkifyProtocol: https From 0d2044f6d01ee4bdffaec56f3419a2a7fac8e7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 14 May 2024 14:46:16 +0200 Subject: [PATCH 3/7] docs: Regen docshelper --- data/docs.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/data/docs.yaml b/data/docs.yaml index 036c21285..ae8185259 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -1209,6 +1209,12 @@ config: delimiter: . suffixes: - webp + text/asciidoc: + delimiter: . + suffixes: + - adoc + - asciidoc + - ad text/calendar: delimiter: . suffixes: @@ -1225,6 +1231,7 @@ config: delimiter: . suffixes: - html + - htm text/javascript: delimiter: . suffixes: @@ -1239,11 +1246,25 @@ config: delimiter: . suffixes: - md + - mdown - markdown + text/org: + delimiter: . + suffixes: + - org + text/pandoc: + delimiter: . + suffixes: + - pandoc + - pdc text/plain: delimiter: . suffixes: - txt + text/rst: + delimiter: . + suffixes: + - rst text/tsx: delimiter: . suffixes: From 25377171b72aa8ae071a231659e90c699a1d6005 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 21 May 2024 04:13:16 -0700 Subject: [PATCH 4/7] config: Remove extraneous BuildConfig setting Closes #12519 --- data/docs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/data/docs.yaml b/data/docs.yaml index ae8185259..d96468f40 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -939,7 +939,6 @@ config: cacheBusters: - source: (postcss|tailwind)\.config\.js target: (css|styles|scss|sass) - duplicateResourceFiles: false noJSConfigInAssets: false useResourceCacheWhen: fallback buildDrafts: false From ac5bd16d28d060296644cfad90c7ea94c23ec438 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 8 Jun 2024 10:40:01 -0700 Subject: [PATCH 5/7] deps: Upgrade github.com/alecthomas/chroma v2.13.0 => v2.14.0 Closes #12580 --- data/docs.yaml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/data/docs.yaml b/data/docs.yaml index d96468f40..6d85042d7 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -307,6 +307,9 @@ chroma: - gherkin - Gherkin Name: Gherkin + - Aliases: + - gleam> + Name: Gleam - Aliases: - glsl Name: GLSL @@ -926,6 +929,20 @@ chroma: - zig Name: Zig config: + HTTPCache: + cache: + for: + excludes: + - '**' + includes: null + polls: + - disable: true + for: + excludes: null + includes: + - '**' + high: 0s + low: 0s archeTypeDir: archetypes assetDir: assets author: {} @@ -1569,8 +1586,12 @@ config: term: - html - rss - paginate: 10 - paginatePath: page + paginate: 0 + paginatePath: "" + pagination: + defaultPageSize: 10 + disableAliases: false + path: page panicOnWarning: false params: {} permalinks: @@ -1721,6 +1742,8 @@ config_helpers: _merge: none frontmatter: _merge: none + httpcache: + _merge: none imaging: _merge: none languages: @@ -1745,6 +1768,8 @@ config_helpers: _merge: shallow outputs: _merge: none + pagination: + _merge: none params: _merge: deep permalinks: From d9e964bdb6ecfcfdc15bd2ac13a1822bae1d3dd7 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 15 Jun 2024 06:45:27 -0700 Subject: [PATCH 6/7] markup/goldmark: Add the Hugo Goldmark Extras "delete" extension With Goldmark v1.7.1 and earlier, the Goldmark "strikethrough" extension was triggered by wrapping text within a pair of double-tilde characters. With Goldmark v1.7.2 and later, to provide full GFM compatibility, the Goldmark "strikethrough" extension is triggered by wrapping text within a pair of single- or double-tilde characters. This change created a conflict with the Hugo Goldmark Extras "subscript" extension. When enabling the Hugo Goldmark Extras "subscript" extension, if you want to render subscript and strikethrough text concurrently, you must: 1. Disable the Goldmark "strikethrough" extension 2. Enable the Hugo Goldmark Extras "delete" extension Closes #12597 --- data/docs.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/docs.yaml b/data/docs.yaml index 6d85042d7..476d374a1 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -1082,6 +1082,8 @@ config: escapedSpace: false definitionList: true extras: + delete: + enable: false insert: enable: false mark: @@ -1589,8 +1591,8 @@ config: paginate: 0 paginatePath: "" pagination: - defaultPageSize: 10 disableAliases: false + pagerSize: 10 path: page panicOnWarning: false params: {} From ff34a035a90cda5ea0f61cad890f2524eea18b0e Mon Sep 17 00:00:00 2001 From: Dietrich Epp Date: Tue, 18 Jun 2024 14:26:08 -0400 Subject: [PATCH 7/7] deploy: Add stripIndexHtml target option This new configuration parameter causes paths matching "/index.html" to be stored as "/" remotely. This simplifies the cloud configuration needed for some use cases, such as CloudFront distributions with S3 bucket origins. Before this change, users must configure their S3 buckets as public websites (which is incompatible with certain authentication / authorization schemes), or users must add a CloudFormation function to add index.html to the end of incoming requests. After this change, users can simply use an ordinary CloudFront distribution (no additional code) with an ordinary S3 bucket origin (and not an S3 website). This adds tests to ensure that functionality like matchers is unaffected by this change. I have also tested that the functionality works as expected when deploying to a real S3 / CloudFront website. Closes #12607 --- content/en/hosting-and-deployment/hugo-deploy.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/en/hosting-and-deployment/hugo-deploy.md b/content/en/hosting-and-deployment/hugo-deploy.md index 45b917f1e..db2448ee7 100644 --- a/content/en/hosting-and-deployment/hugo-deploy.md +++ b/content/en/hosting-and-deployment/hugo-deploy.md @@ -186,6 +186,15 @@ URL = "" #include = "**.html" # would only include files with ".html" suffix #exclude = "**.{jpg, png}" # would exclude files with ".jpg" or ".png" suffix +# Map any file named "/index.html" to the remote file "/". This does +# not affect the root "index.html" file, and it does not affect matchers below. +# This works when deploying to key-value cloud storage systems, such as Amazon +# S3 (general purpose buckets, not directory buckets), Google Cloud Storage, and +# Azure Blob Storage. This makes it so the canonical URL will match the object +# key in cloud storage, except for the root index.html file. +# +#stripIndexHTML = true + ####################### [[deployment.matchers]] @@ -195,6 +204,7 @@ URL = "" # See https://golang.org/pkg/regexp/syntax/ for pattern syntax. # Pattern searching is stopped on first match. +# This is not affected by stripIndexHTML, above. pattern = "" # If true, Hugo will gzip the file before uploading it to the bucket.