getnikola / plugins

Extra plugins for Nikola
https://plugins.getnikola.com/
MIT License
59 stars 95 forks source link

[pkgindex_compiler] Updated conf.py.sample files are not updated on plugin site rebuild #221

Closed felixfontein closed 7 years ago

felixfontein commented 7 years ago

Compare https://plugins.getnikola.com/v7/hierarchical_pages/ vs. https://github.com/getnikola/plugins/blob/master/v7/hierarchical_pages/conf.py.sample (I assume you didn't updated the MarkDown by hand...)

Kwpolska commented 7 years ago

I actually did, but yes, dependencies seem to be broken/missing.

felixfontein commented 7 years ago

This should be fixable with calling post.add_dependency(path_to_conf_py_sample, add='fragment') in CompilePackageIndexEntries.read_metadata in case conf.py.sample exists.

felixfontein commented 7 years ago

I guess similar dependencies should be added on the .plugin file, and on all the requirements*.txt files.

Hmm, maybe it is better to add the whole metadata object as an uptodate dependency?

Kwpolska commented 7 years ago

I always thought post metadata were dependencies, and perhaps this is why I didn’t bother doing any dependency stuff… Was anything ever changed in that regard? What happens with two-file posts?

Kwpolska commented 7 years ago

(In any case, I’ve got a patch ready for pkgindex_compiler)

felixfontein commented 7 years ago

The post source file and the .meta file (for two-file posts) are file dependencies. That doesn't work for metadata coming from other sources, though, like in this case.