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
force build individual files #2881
Comments
Hello, and thanks for choosing Nikola for the wxPython website! First, the feature you’re asking for already exists. However, there is a better solution. Shortcodes always return a list of their dependencies. In templated shortcodes, the usual include directive of your template system should make the included files dependencies (assuming there are no bugs there). However, if you use Python-based shortcodes, you can then specify any dependencies you want, including But in this exact case, you don’t even need to do that. This can be solved with the post list directive (also available as a shortcode) and a custom post-list template, with the added benefit of avoiding ugly Mako code. |
Thanks, I hadn't noticed the However it would still be nice to be able to define extra dependencies in some way. I expect that there could potentially be some other use cases that could benefit from it. |
If someone can name a genuine use-case, and the need for manual dependency specification can’t be worked around easily, we can implement that. Otherwise, it’s not worth the hassle, and it makes Nikola look bad because we can’t manage dependencies right. |
Ok, that makes sense. |
If you need special dependencies computed for whatever reason, you can also write a plugin which inserts these dependencies. Nikola is flexible enough to do that. (You can even write a plugin which allows you to specify dependencies via meta. I agree with @Kwpolska that there shouldn't be a need for such a plugin.) |
Enhancement request
It would be nice to be able to force the rebuild of one page/post (and any that depend on it) instead of needing to do
nikola build -a
and rebuild everything. For example, I have a shortcode template that pulls a few posts into a normal page. I know that whenever the newest few posts are updated that I need to ensure that this page is rebuilt too, but currently I either have to do abuild -a
, make some arbitrary change in the page, or remove the files for that page from cache and running the build. This is basically the same problem mentioned in the docs about thepost-list
directive.An alternative idea would be to be able to specify in the page's metadata the slugs and/or section-slugs that would cause it to be out of date and need to be rebuilt. Something like
.. depends: news, some-other-page
The text was updated successfully, but these errors were encountered: