Handle multiline and list properties correctly in album.yml#18
Handle multiline and list properties correctly in album.yml#18GjjvdBurg merged 2 commits intoGjjvdBurg:masterfrom
Conversation
…erties or list properties in album.yml
…egories or tags) in album.yml
|
@fazalmajid Thank you very much for contributing to HugoPhotoSwipe! I don't currently have much time to look at this closely and to merge it, but from a quick scan it looks very nice, thanks! I'll try to get back to you within a few weeks. |
|
@fazalmajid I just tried to merge this but it seems the |
|
I added test_gallery.md and granted you access. That said, I switched since to my own utility https://github.com/fazalmajid/hugopix, inspired by yours (notably the PhotoSwipe to Hugo template integration) but written in Go. It does not do round-trip sync of image metadata like yours does, but the smart cropping is way, way faster (the README.md docs are not complete yet). |
Thanks for your work on HugoPhotoSwipe. Migrating photo galleries was one of the main obstacles to my migration from Wordpress to Hugo, and your solution meets most of my needs. The main change I would do is to get photo captions from EXIF/IPTC metadata when first adding a photo to a gallery, but that's for another day.
I was trying to use properties in
album.ymlto provide additional text before/after the galleries, and put categories or tags on them, for example here would be the file for https://majid.info/blog/a-passel-of-miniature-tripods/Unfortunately,
hpswould just mangle these when it rewritesalbum.yml.I don't know what the rationale was for using functions like
utils.yaml_field_to_fileand the hand-rolled TOML inalbum.create_markdowninstead of just using the YAML parser that is already imported, and one of the several full-featured TOML parsers in PyPI, so I implemented a minimally invasive fix. It can handle this use-case properly, but not more complex nested ones or data types other than lists of strings.