From 762e27eff15424555f162139bb45620e78f44c7d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 6 Dec 2021 09:12:42 -0800 Subject: [PATCH] Clarify ignoreFiles regex matching Closes #1375 --- content/en/getting-started/configuration.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 69c2bd624..be1fe85cd 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -587,12 +587,18 @@ Test and document setting params via JSON env var. ## Ignore Content and Data Files when Rendering -To exclude specific files from the content and data directories when rendering your site, set `ignoreFiles` to one or more regular expressions. +To exclude specific files from the `content` and `data` directories when rendering your site, set `ignoreFiles` to one or more regular expressions to match against the absolute file path. -For example, to ignore content and data files ending with `.foo` and `.boo`: +To ignore files ending with `.foo` or `.boo`: -{{< code-toggle >}} -ignoreFiles = [ "\\.foo$","\\.boo$"] +{{< code-toggle copy="false" >}} +ignoreFiles = ['\.foo$', '\.boo$'] +{{< /code-toggle >}} + +To ignore a file using the absolute file path: + +{{< code-toggle copy="false" >}} +ignoreFiles = ['^/home/user/project/content/test\.md$'] {{< /code-toggle >}} ## Configure Front Matter