Skip to content

Conversation

@ryoarmanda
Copy link
Contributor

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [X] Enhancement to an existing feature

Resolves #715

What is the rationale for this request?
With the usage of globs for defining pages to render, if there are any files or directories within the glob that the user wishes to exclude, there is no concise way for them to declare it. It would be better to have a dedicated file exclusion rule for this purpose.

What changes did you make? (Give an overview)
Added two new properties:

  • globExclude can be used inside each entry of pages, whose value is an array that contains glob patterns to be excluded. The exclusions will only affect files found for that particular entry.
  • pagesExclude is the global variant of globExclude, designed to be used on the root level and will affect all entries.

Users can choose which property to use for their exclusions. If both are used at the same time, it will be combined into one.

Is there anything you'd like reviewers to focus on?
NA

Testing instructions:
npm run test

Proposed commit message: (wrap lines at 72 characters)
Add site.json properties for file exclusions

When using globs to define pages, there is no concise way for users to
declare files or directories to exclude within the glob.

Let's add new properties to site.json for containing file patterns to
exclude and incorporate these during site building.

Copy link
Contributor

@ang-zeyu ang-zeyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks neat! Just a couple of docs nits:

@ang-zeyu ang-zeyu added this to the v2.15.3 milestone Aug 18, 2020
@ang-zeyu ang-zeyu merged commit 9f87353 into MarkBind:master Aug 18, 2020
@ang-zeyu ang-zeyu mentioned this pull request Sep 18, 2021
@ong6 ong6 mentioned this pull request Feb 14, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is there a more concise way to specify file exclusions in site.json?

2 participants