Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ignored_content work with nested paths and directories #1738

Merged
merged 3 commits into from
Feb 6, 2022

Conversation

kartva
Copy link
Contributor

@kartva kartva commented Jan 17, 2022

IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.

resolves #1701

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

@kartva
Copy link
Contributor Author

kartva commented Jan 17, 2022

This may break some config files if they had a filter which included directories (like "foo/bar/*.xlsx") - previously Zola would ignore all *.xlsx but now only foo/bar/*.xlsx. I don't think anyone relied on this behavior, though.

@Keats Keats force-pushed the next branch 2 times, most recently from 189c37d to 6238b36 Compare January 23, 2022 13:38
@Keats
Copy link
Collaborator

Keats commented Jan 23, 2022

Can you rebase the PR?

@kartva
Copy link
Contributor Author

kartva commented Jan 24, 2022

Better now?

@Keats
Copy link
Collaborator

Keats commented Jan 24, 2022

Hm no, it still contains lots of unrelated commits from master. The easiest way would be reset --hard on master and cherrypick the 2 relevant commits on it rather than merging

@kartva
Copy link
Contributor Author

kartva commented Jan 29, 2022

Is it somewhat better now?

Just had to remove strip_prefix(path) from file ignore code.
Added tests for subdirectory globbing.
Copy link
Collaborator

@Keats Keats left a comment

Choose a reason for hiding this comment

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

Looks good, just a small tweak needed to a test

components/config/src/config/mod.rs Show resolved Hide resolved
to confim that simple filename globs still match paths
without strip_prefix
@kartva
Copy link
Contributor Author

kartva commented Feb 5, 2022

Done? GitHub still shows "Changes requested" even if I marked it as resolved, so I'm not sure.

Copy link
Collaborator

@Keats Keats left a comment

Choose a reason for hiding this comment

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

Yep sorry it's good

@Keats Keats merged commit 677d0f0 into getzola:next Feb 6, 2022
Keats pushed a commit that referenced this pull request Feb 14, 2022
* Make ignored_content work with directories
Just had to remove strip_prefix(path) from file ignore code.
Added tests for subdirectory globbing.

* Add documentation

* add more tests
to confim that simple filename globs still match paths
without strip_prefix
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.

2 participants