Fix missing glob matching pattern support description in the documentation of the `include` and `exclude` configuration options (#9697)

Merge pull request 9697
This commit is contained in:
林博仁 Buo-ren Lin 2024-10-20 22:22:47 +08:00 committed by GitHub
parent 44fc6803d2
commit 0c4a453e2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 5 deletions

View File

@ -41,10 +41,15 @@
Exclude directories and/or files from the conversion. These exclusions are relative to the site's source directory
and cannot be outside the source directory.
<br />
In Jekyll 3, the `exclude` configuration option replaces the default exclusion list.
This configuration option supports Ruby's <a href="https://ruby-doc.org/3.3.5/File.html#method-c-fnmatch">
<code>File.fnmatch</code> filename globbing patterns</a> to match multiple entries to exclude. For example,
you can exclude multiple README.md files in your source tree from being included in your site by specifying the
following <code>exclude</code> option entries: <code>["README.md", "**/README.md"]</code>.
<br />
In Jekyll 4, user-provided entries get added to the default exclusion list instead and the `include` option can be
used to override the default exclusion list entries.
In Jekyll 3, the <code>exclude</code> configuration option replaces the default exclusion list.
<br />
In Jekyll 4, user-provided entries get added to the default exclusion list instead and the <code>include</code>
option can be used to override the default exclusion list entries.
<br />
The default exclusions are found in <code>_config.yml</code> as created by <code>jekyll new</code>:
<ul>
@ -65,8 +70,14 @@
- name: Include
description: >-
Force inclusion of directories and/or files in the conversion. <code>.htaccess</code> is a good example since
dotfiles are excluded by default. With Jekyll 4, the `include` configuration option entries override the
`exclude` option entries.
dotfiles are excluded by default.
<br>
This configuration option supports Ruby's <a href="https://ruby-doc.org/3.3.5/File.html#method-c-fnmatch-3F">
<code>File.fnmatch</code> filename globbing patterns</a> to match multiple entries to include, refer the
<code>exclude</code> configuration option for more information.
<br>
With Jekyll 4, the <code>include</code> configuration option entries override the <code>exclude</code> option
entries.
option: "include: [DIR, FILE, ...]"