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
[WIP] Feature images metadata #2438
Conversation
Previously, once newstyle mode is detected, the metadata are read from the initial file itself, which is wrong.
It is now possible to add a .meta file associated to any image file in galleries. The contained metadata are made available to the gallery.tmpl.
@@ -455,6 +455,7 @@ def __init__(self, **config): | |||
'FRONT_INDEX_HEADER': '', | |||
'GALLERY_FOLDERS': {'galleries': 'galleries'}, | |||
'GALLERY_SORT_BY_DATE': True, | |||
'GALLERY_USE_METADATA': True, |
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.
I don't think we need an option, since it's unlikely that metadata files will randomly appear next to images. If people don't want to show image metadata, then don't put meta files there :-)
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.
You are right. I initially added this option, thinking on conflicting processing of title. But finally, I change my mind in the same way: if there is a meta file, it is the most important source of information.
I will remove that.
If people don't want to show image metadata, then don't put meta files there.
As suggested by CONTRIBUTING.rst.
Needed since we can have textual information associated with images. Cf. https://blog.mozilla.org/webdev/2009/02/20/cross-browser-inline-block/
@guyou need a hand with anything? Want me to take over and push your work? What you have done so far is awesome, I'd love to have in Nikola! |
I would appreciate to test it on a more complex "gallerie" theme, but spare time is missing. If you consider the current state meets all you requirements, so please, pull it on main branch. |
@guyou awesome, I will try to give this a push this weekend and see how it goes! |
I am taking over this branch and superseding the PR with a new one. Thanks for the work @guyou and sorry it took me so long to get to it. |
The story continues in #2837. |
In order to offer the ability to create theme with advanced image galleries, nikola needs to offer a way to adds extended/manual metadata to each image files.
This feature branch add a support for additional .meta file associated to image files.
Cf. #1286