-
Notifications
You must be signed in to change notification settings - Fork 966
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
Add ignored_static to config #2209
Conversation
Finally got around to manual testing, and my code is 100% not ignoring static files 😩
edit: Was thankfully a simple fix |
Any feedback on this PR @Keats ? |
src/cmd/serve.rs
Outdated
@@ -475,6 +475,13 @@ pub fn serve( | |||
}; | |||
|
|||
let copy_static = |site: &Site, path: &Path, partial_path: &Path| { | |||
// Do nothing if the file/dir is on the ignore list | |||
println!("{:?}, partial: {:?}", path, partial_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops! will fix this immediately
components/utils/src/fs.rs
Outdated
src: &Path, | ||
dest: &Path, | ||
hard_link: bool, | ||
gs: &GlobSet, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just pass an Option to copy_directory
instead of copying the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
|
Don't worry about the pinned version, we can increase it. The errors on the other CI are legit though |
a468550
to
e705bfa
Compare
😬 didn't see the errors were different, will be more thorough next time. Can't believe I forgot to actually build it, I must have been rushing. Anyway, it builds now, will keep an eye on CI |
Thanks! |
* Add ignored_static to config * Make handle ignored static files correctly * cargo fmt * Match on relative path rather than incorrect target path * path -> partial path for serve static ignore * remove debug println * copy static directory if there is no ignored globset * Update docs * Deduplicate code with additional Option argument * cargo fmt
* Add ignored_static to config * Make handle ignored static files correctly * cargo fmt * Match on relative path rather than incorrect target path * path -> partial path for serve static ignore * remove debug println * copy static directory if there is no ignored globset * Update docs * Deduplicate code with additional Option argument * cargo fmt
* Add ignored_static to config * Make handle ignored static files correctly * cargo fmt * Match on relative path rather than incorrect target path * path -> partial path for serve static ignore * remove debug println * copy static directory if there is no ignored globset * Update docs * Deduplicate code with additional Option argument * cargo fmt
I opened an issue report for this feature here: #2677 |
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one:
Issue #1925
I need to do some manual testing for this yet. EDIT: done