diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-06-16 07:22:11 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-06-16 07:22:11 +0200 |
commit | 475f87f685439de0f907a9ffc29bfd1361eb1c59 (patch) | |
tree | eb969ef5e45dcdab2714712cd999ab821165b96a | |
parent | e4bfe59c4e043c92d3992587d8c64d264b262a22 (diff) |
30f32a624 Update scss-sass.md
503130186 Update scss-sass.md
cbfaa6704 Remove references to outdated Blackfriday markdown processor (#1748)
e43948d26 netlify: Hugo 0.100.2
aaabe0ee9 Merge branch 'tempv0.100.2'
bc615f257 tpl/path: Add path.BaseName function
5dddbf95e Add Chinese translation for _documentation and _index.md
b1e4f3200 Add translation for search tools
23281633a Update introduction.md
3abb5fb5d netlify: Hugo 0.100.1
644ed3b01 Update faq.md
54f377051 Add some lines about resources.Copy
82cf08355 Remove most Blackfriday references
bfbe5aaf3 netlify: Update to Hugo 0.100.0
8b6f8577f docs: Regen CLI docs
858a5d39c docs: Regen docs helper
5037d504f Merge commit 'e4bfe59c4e043c92d3992587d8c64d264b262a22'
03ca7be5b Fix indentation in highlight shortcode
git-subtree-dir: docs
git-subtree-split: 30f32a62433a6d62b680a2dd874c72bb8fb0b728
32 files changed, 284 insertions, 199 deletions
diff --git a/content/en/commands/hugo.md b/content/en/commands/hugo.md index 8845fef4a..e51a79f48 100644 --- a/content/en/commands/hugo.md +++ b/content/en/commands/hugo.md @@ -47,6 +47,7 @@ hugo [flags] --log enable Logging --logFile string log File path (if set, logging enabled automatically) --minify minify any supported output format (HTML, XML etc.) + --noBuildLock don't create .hugo_build.lock file --noChmod don't sync permission mode of files --noTimes don't sync modification time of files --panicOnWarning panic on first WARNING log diff --git a/content/en/commands/hugo_mod.md b/content/en/commands/hugo_mod.md index 87daff595..91cd7c743 100644 --- a/content/en/commands/hugo_mod.md +++ b/content/en/commands/hugo_mod.md @@ -42,6 +42,7 @@ See https://gohugo.io/hugo-modules/ for more information. --ignoreCache ignores the cache directory -l, --layoutDir string filesystem path to layout directory --minify minify any supported output format (HTML, XML etc.) + --noBuildLock don't create .hugo_build.lock file --noChmod don't sync permission mode of files --noTimes don't sync modification time of files --panicOnWarning panic on first WARNING log diff --git a/content/en/commands/hugo_new.md b/content/en/commands/hugo_new.md index e1f5eb620..d294b65b3 100644 --- a/content/en/commands/hugo_new.md +++ b/content/en/commands/hugo_new.md @@ -43,6 +43,7 @@ hugo new [path] [flags] -k, --kind string content type to create -l, --layoutDir string filesystem path to layout directory --minify minify any supported output format (HTML, XML etc.) + --noBuildLock don't create .hugo_build.lock file --noChmod don't sync permission mode of files --noTimes don't sync modification time of files --panicOnWarning panic on first WARNING log diff --git a/content/en/commands/hugo_server.md b/content/en/commands/hugo_server.md index 7bbe46197..f79a8d5e9 100644 --- a/content/en/commands/hugo_server.md +++ b/content/en/commands/hugo_server.md @@ -54,6 +54,7 @@ hugo server [flags] --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 diff --git a/content/en/content-management/cross-references.md b/content/en/content-management/cross-references.md index 9580fd7e5..b5dd8a4c3 100644 --- a/content/en/content-management/cross-references.md +++ b/content/en/content-management/cross-references.md @@ -126,4 +126,3 @@ refLinksNotFoundURL [lists]: /templates/lists/ [output formats]: /templates/output-formats/ [shortcode]: /content-management/shortcodes/ -[bfext]: /content-management/formats/#blackfriday-extensions diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index 7d2d7b0a0..303bb4596 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -29,7 +29,6 @@ The current list of content formats in Hugo: | Name | Markup identifiers | Comment | | ------------- | ------------- |-------------| | Goldmark | md, markdown, goldmark |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).{{< new-in "0.60.0" >}} | -| Blackfriday | blackfriday |Blackfriday will eventually be deprecated.| |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.| @@ -128,8 +127,6 @@ Markdown syntax is simple enough to learn in a single sitting. The following are [`emojify` function]: /functions/emojify/ [ascii]: https://asciidoctor.org/ -[bfconfig]: /getting-started/configuration/#configuring-blackfriday-rendering -[blackfriday]: https://github.com/russross/blackfriday [config]: /getting-started/configuration/ [developer tools]: /tools/ [emojis]: https://www.webpagefx.com/tools/emoji-cheat-sheet/ diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index c915a5f96..0d8c2e3a6 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -217,7 +217,7 @@ You can assign content-specific `weight` in the front matter of your content. Th ## Override Global Markdown Configuration -It's possible to set some options for Markdown rendering in a content's front matter as an override to the [BlackFriday rendering options set in your project configuration][config]. +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]. ## Front Matter Format Specs diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index 2eeb1aa1b..d1e7965b2 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -140,31 +140,6 @@ Press Ctrl+C to stop Live reload and `--navigateToChanged` between the servers work as expected. -### Taxonomies and Blackfriday - -Taxonomies and [Blackfriday configuration][config] can also be set per language: - -{{< code-toggle file="config" >}} -[Taxonomies] -tag = "tags" - -[blackfriday] -angledQuotes = true -hrefTargetBlank = true - -[languages] -[languages.en] -weight = 1 -title = "English" -[languages.en.blackfriday] -angledQuotes = false - -[languages.fr] -weight = 2 -title = "Français" -[languages.fr.Taxonomies] -plaque = "plaques" -{{</ code-toggle >}} ## Translate Your Content diff --git a/content/en/functions/anchorize.md b/content/en/functions/anchorize.md index b5bd22e07..5530e193b 100644 --- a/content/en/functions/anchorize.md +++ b/content/en/functions/anchorize.md @@ -13,7 +13,7 @@ workson: [] relatedfuncs: [humanize] --- -If [Goldmark](https://gohugo.io/getting-started/configuration-markup#goldmark) is set as `defaultMarkdownHandler`, the sanitizing logic adheres to the setting [`markup.goldmark.parser.autoHeadingIDType`](https://gohugo.io/getting-started/configuration-markup#goldmark). If [Blackfriday](https://gohugo.io/getting-started/configuration-markup#blackfriday) is set as `defaultMarkdownHandler`, this template function uses the [`SanitizedAnchorName` logic from Blackfriday](https://github.com/russross/blackfriday#sanitized-anchor-names) (the same applies when `markup.goldmark.parser.autoHeadingIDType` is set to `blackfriday`). +If [Goldmark](https://gohugo.io/getting-started/configuration-markup#goldmark) is set as `defaultMarkdownHandler`, the sanitizing logic adheres to the setting [`markup.goldmark.parser.autoHeadingIDType`](https://gohugo.io/getting-started/configuration-markup#goldmark). Since the `defaultMarkdownHandler` and this template function use the same sanitizing logic, you can use the latter to determine the ID of a header for linking with anchor tags. diff --git a/content/en/functions/path.Base.md b/content/en/functions/path.Base.md index c44518a72..a6bfc2bd5 100644 --- a/content/en/functions/path.Base.md +++ b/content/en/functions/path.Base.md @@ -12,7 +12,7 @@ keywords: [path, base] signature: ["path.Base PATH"] workson: [] hugoversion: "0.40" -relatedfuncs: [path.Dir, path.Ext, path.Split] +relatedfuncs: [path.BaseName, path.Clean, path.Dir, path.Ext, path.Join, path.Split] deprecated: false --- diff --git a/content/en/functions/path.BaseName.md b/content/en/functions/path.BaseName.md new file mode 100644 index 000000000..6a5b9f0a0 --- /dev/null +++ b/content/en/functions/path.BaseName.md @@ -0,0 +1,24 @@ +--- +title: path.BaseName +description: BaseName returns the last element of a path, removing the extension if present. +date: 2022-06-04 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [path, base] +signature: ["path.BaseName PATH"] +relatedfuncs: [path.Base, path.Clean, path.Dir, path.Ext, path.Join, path.Split] +deprecated: false +--- + +If `PATH` is empty, `.` is returned. + +**Note:** On Windows, `PATH` is converted to slash (`/`) separators. + +```go-html-template +{{ path.BaseName "a/news.html" }} → "news" +{{ path.BaseName "news.html" }} → "news" +{{ path.BaseName "a/b/c" }} → "c" +{{ path.BaseName "/x/y/z/" }} → "z" +``` diff --git a/content/en/functions/path.Clean.md b/content/en/functions/path.Clean.md index 03ffbd836..852de65fd 100644 --- a/content/en/functions/path.Clean.md +++ b/content/en/functions/path.Clean.md @@ -8,8 +8,9 @@ categories: [functions] menu: docs: parent: "functions" -keywords: [path] +keywords: [path, clean] signature: ["path.Clean PATH"] +relatedfuncs: [path.Base, path.BaseName, path.Dir, path.Ext, path.Join, path.Split] --- `path.Clean` replaces path separators with slashes (`/`) and removes extraneous separators, including trailing separators. diff --git a/content/en/functions/path.Dir.md b/content/en/functions/path.Dir.md index 851a3dc83..161a0daa8 100644 --- a/content/en/functions/path.Dir.md +++ b/content/en/functions/path.Dir.md @@ -12,7 +12,7 @@ keywords: [path, dir] signature: ["path.Dir PATH"] workson: [] hugoversion: "0.40" -relatedfuncs: [path.Base, path.Ext, path.Split] +relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Ext, path.Join, path.Split] deprecated: false --- diff --git a/content/en/functions/path.Ext.md b/content/en/functions/path.Ext.md index 73db7ab38..8c6fe907c 100644 --- a/content/en/functions/path.Ext.md +++ b/content/en/functions/path.Ext.md @@ -12,7 +12,7 @@ keywords: [path, ext, extension] signature: ["path.Ext PATH"] workson: [] hugoversion: "0.40" -relatedfuncs: [path.Base, path.Dir, path.Split] +relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Join, path.Split] deprecated: false --- diff --git a/content/en/functions/path.Join.md b/content/en/functions/path.Join.md index 96ce86322..579e8667e 100644 --- a/content/en/functions/path.Join.md +++ b/content/en/functions/path.Join.md @@ -12,7 +12,7 @@ keywords: [path, join] signature: ["path.Join ELEMENT..."] workson: [] hugoversion: "0.39" -relatedfuncs: [path.Split] +relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Ext, path.Split] deprecated: false --- diff --git a/content/en/functions/path.Split.md b/content/en/functions/path.Split.md index 9a09fbe4a..7737b77d3 100644 --- a/content/en/functions/path.Split.md +++ b/content/en/functions/path.Split.md @@ -12,7 +12,7 @@ keywords: [path, split] signature: ["path.Split PATH"] workson: [] hugoversion: "0.39" -relatedfuncs: [path.Split] +relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Ext, path.Join] deprecated: false --- diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index b323ba464..2a38c0ce4 100644 --- a/content/en/getting-started/configuration-markup.md +++ b/content/en/getting-started/configuration-markup.md @@ -24,7 +24,7 @@ Below are all markup related configuration in Hugo with their default settings: ### Goldmark -[Goldmark](https://github.com/yuin/goldmark/) is from Hugo 0.60 the default library used for Markdown. It's fast, it's [CommonMark](https://spec.commonmark.org/0.29/) compliant and it's very flexible. Note that the feature set of Goldmark vs Blackfriday isn't the same; you gain a lot but also lose some, but we will work to bridge any gap in the upcoming Hugo versions. +[Goldmark](https://github.com/yuin/goldmark/) is from Hugo 0.60 the default library used for Markdown. It's fast, it's [CommonMark](https://spec.commonmark.org/0.29/) compliant and it's very flexible. This is the default configuration: @@ -77,16 +77,8 @@ Note that attributes in [code fences](/content-management/syntax-highlighting/#h ```` autoHeadingIDType ("github") {{< new-in "0.62.2" >}} -: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs work as with [Blackfriday](#blackfriday), the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func. +: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with [Blackfriday](#blackfriday), the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func. -### Blackfriday - - -[Blackfriday](https://github.com/russross/blackfriday) was Hugo's default Markdown rendering engine, now replaced with Goldmark. But you can still use it: Just set `defaultMarkdownHandler` to `blackfriday` in your top level `markup` config. - -This is the default config: - -{{< code-toggle config="markup.blackFriday" />}} ### Highlight diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index cd57b371d..9393e4534 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -121,9 +121,6 @@ The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). { ### baseURL Hostname (and path) to the root, e.g. https://bep.is/ -### blackfriday -See [Configure Blackfriday](/getting-started/configuration-markup#blackfriday) - ### build See [Configure Build](#configure-build) diff --git a/content/en/hugo-pipes/introduction.md b/content/en/hugo-pipes/introduction.md index bbafe55b2..a3c956885 100755 --- a/content/en/hugo-pipes/introduction.md +++ b/content/en/hugo-pipes/introduction.md @@ -53,6 +53,17 @@ With `resources.GetRemote`, the first argument is a remote URL: `resources.Get` and `resources.GetRemote` return `nil` if the resource is not found. +## Copy a Resource + +{{< new-in "0.100.0" >}} + +`resources.Copy` allows you to copy almost any Hugo `Resource` (the one exception is the `Page`), possibly most useful for renaming things: + +```go-html-template +{{ $resized := $image.Resize "400x400" | resources.Copy "images/mynewname.jpg" }} +<img src="{{ $resized.RelPermalink }}"> +``` + ### Caching By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given. diff --git a/content/en/hugo-pipes/postcss.md b/content/en/hugo-pipes/postcss.md index f8c9c2b0b..154f97f0b 100755 --- a/content/en/hugo-pipes/postcss.md +++ b/content/en/hugo-pipes/postcss.md @@ -45,7 +45,8 @@ Note that this import routine does not care about the CSS spec, so you can have Hugo will look for imports relative to the module mount and will respect theme overrides. skipInlineImportsNotFound [bool] {{< new-in "0.99.0" >}} -:Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true. + +Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true. _If no configuration file is used:_ diff --git a/content/en/hugo-pipes/scss-sass.md b/content/en/hugo-pipes/scss-sass.md index 12cebc014..c4a0a5520 100755 --- a/content/en/hugo-pipes/scss-sass.md +++ b/content/en/hugo-pipes/scss-sass.md @@ -45,7 +45,7 @@ includePaths [string slice] : Additional SCSS/SASS include paths. Paths must be relative to the project directory. ```go-html-template -{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/myscss")) }} +{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" (not hugo.IsProduction) "includePaths" (slice "node_modules/myscss")) }} {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }} ``` diff --git a/content/en/showcase/tomango/index.md b/content/en/showcase/tomango/index.md index 5252c02a8..6dc1a5c1f 100644 --- a/content/en/showcase/tomango/index.md +++ b/content/en/showcase/tomango/index.md @@ -10,7 +10,7 @@ siteURL: https://www.tomango.co.uk siteSource: https://github.com/trys/tomango-2018 -byline: "[Trys Mudford](http://www.trysmudford.com), Lead Developer, Tomango" +byline: "[Trys Mudford](https://www.trysmudford.com), Lead Developer, Tomango" --- diff --git a/content/en/templates/data-templates.md b/content/en/templates/data-templates.md index b5a293029..bd1ed6d76 100644 --- a/content/en/templates/data-templates.md +++ b/content/en/templates/data-templates.md @@ -112,7 +112,7 @@ You can use the following code to render the `Short Description` in your layout: <div>Short Description of {{.Site.Data.User0123.Name}}: <p>{{ index .Site.Data.User0123 "Short Description" | markdownify }}</p></div> ``` -Note the use of the [`markdownify` template function][markdownify]. This will send the description through the Blackfriday Markdown rendering engine. +Note the use of the [`markdownify` template function][markdownify]. This will send the description through the Markdown rendering engine. ## Get Remote Data diff --git a/content/en/templates/files.md b/content/en/templates/files.md index a448d7908..c2de11292 100644 --- a/content/en/templates/files.md +++ b/content/en/templates/files.md @@ -43,7 +43,7 @@ To use the `readFile` function in your templates, make sure the path is relative ### `readFile` Example: Add a Project File to Content -As `readFile` is a function, it is only available to you in your templates and not your content. However, we can create a simple [shortcode template][sct] that calls `readFile`, passes the first argument through the function, and then allows an optional second argument to send the file through the Blackfriday markdown processor. The pattern for adding this shortcode to your content will be as follows: +As `readFile` is a function, it is only available to you in your templates and not your content. However, we can create a simple [shortcode template][sct] that calls `readFile`, passes the first argument through the function, and then allows an optional second argument to send the file through the markdown processor. The pattern for adding this shortcode to your content will be as follows: ``` {{</* readfile file="/path/to/local/file.txt" markdown="true" */>}} diff --git a/content/en/troubleshooting/faq.md b/content/en/troubleshooting/faq.md index 548073b3f..67d9a3998 100644 --- a/content/en/troubleshooting/faq.md +++ b/content/en/troubleshooting/faq.md @@ -45,9 +45,9 @@ Also see this Twitter thread: Yes you can! Read [this](/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify). -## I get "TOCSS ... this feature is not available in your current Hugo version" +## I get "... this feature is not available in your current Hugo version" -If you process `SCSS` or `SASS` to `CSS` in your Hugo project, you need the Hugo `extended` version, or else you may see this error message: +If you process `SCSS` or `SASS` to `CSS` in your Hugo project with `libsass` as |