From 36de478df8bab98ac4b59c1ca7c3a497cd7ecbe6 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 24 Mar 2021 07:19:08 -0700 Subject: [PATCH] Update description of ignoreFiles config setting (#1377) --- content/en/getting-started/configuration.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 1f8ad40c5..716af3d41 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -444,15 +444,15 @@ To set config params, prefix the name with `HUGO_PARAMS_` Test and document setting params via JSON env var. {{< /todo >}} -## Ignore Content Files When Rendering +## Ignore Content and Data Files when Rendering -The following statement inside `./config.toml` will cause Hugo to ignore content files ending with `.foo` and `.boo` when rendering: +To exclude specific files from the content and data directories when rendering your site, set `ignoreFiles` to one or more regular expressions. -``` -ignoreFiles = [ "\\.foo$", "\\.boo$" ] -``` +For example, to ignore content and data files ending with `.foo` and `.boo`: -The above is a list of regular expressions. Note that the backslash (`\`) character is escaped in this example to keep TOML happy. +{{< code-toggle >}} +ignoreFiles = [ "\\.foo$","\\.boo$"] +{{< /code-toggle >}} ## Configure Front Matter