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

Feature Request: Allow users to specify additional paths to watch for changes #2741

Open
rparrett opened this issue Dec 19, 2024 · 4 comments

Comments

@rparrett
Copy link

rparrett commented Dec 19, 2024

Motivated by some friction experienced by Bevy maintainers, discussed here: bevyengine/bevy#16431 (reply in thread)

As well as a project of mine where I am including content that is necessarily in another directory, and would love it if Zola would reload when it changes.

edit: Oops, it looks like this was previously suggested in the forum, but never received a response.

@cart
Copy link

cart commented Dec 19, 2024

To elaborate:

  1. We have a "news" markdown page that calls a release_notes shortcode
  2. The release_notes shortcode calls load_data() to load a _release-notes.toml file, which is an index that contains many "release note" entries containing things like a title and a link to the release note entry markdown.
  3. We iterate over all of the "release note" entries and call load_data(release_note.file_name) to retrieve the markdown and render it.

The problem is that if we change one of the individual release note markdown files, the final rendered page is not updated.

Here is a link to the shortcode: https://github.com/bevyengine/bevy-website/blob/main/templates/shortcodes/release_notes.md?plain=1

And here is a link to one of the news articles that doesnt hot-reload when a release note entry changes: https://github.com/bevyengine/bevy-website/blob/main/content/news/2024-11-29-bevy-0.15/index.md

And here is a link to one of the release note entries that connects to that article: https://github.com/bevyengine/bevy-website/blob/main/release-content/0.15/release-notes/14791_Required_Components.md

@Keats
Copy link
Collaborator

Keats commented Dec 20, 2024

I think that's fine to add as an argument to zola serve. I'm assuming we're fine with just completely reloading the site when something changes right?

@rparrett
Copy link
Author

rparrett commented Dec 20, 2024

It would be nice to be able to configure this with an array in config.toml so that contributors don't need to do anything extra beyond zola serve.

I have this working in a branch, and can open a PR if that sounds okay. There may be some small implementation details to discuss.

@Keats
Copy link
Collaborator

Keats commented Dec 20, 2024

I would prefer that to be cli arguments, there are no serve specific things in config.toml right now. You can always write the command required in a makefile or docs

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

No branches or pull requests

3 participants