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

Display meta.description not meta.alt-text #25

Open
jeremycherfas opened this issue Nov 19, 2018 · 6 comments
Open

Display meta.description not meta.alt-text #25

jeremycherfas opened this issue Nov 19, 2018 · 6 comments

Comments

@jeremycherfas
Copy link

Very useful plugin. I added yaml meta files as suggested, but the full-size image displays the contents of meta.alt-text, when I think it should display meta.description.

Alt is correct in the HTML, so I do not just want to switch them.

@flpommeton
Copy link

flpommeton commented Dec 5, 2018

I have tried everything to get either the alt_text or the description to display. I cannot get either to display. I am just getting <img alt="" data-description="" . .

Can you show an example of your meta.yaml file for me?

Here is what I have so far:

---
meta.alt-text="At the Getty"
meta.alt_text="At the Getty Underscore"
meta.description="A Painting at the Getty - One of my favourites"
---

Thanks for any help.

@jeremycherfas
Copy link
Author

This is in the file 01.jpg.meta.yaml

alt_text: Library of Congress entrace hall
description: The entrance hall with the big mosaic at the top of the stairs

You see the result here https://www.jeremycherfas.net/blog/library-of-congress -- complete with spelling mistake that I just noticed :)

@flpommeton
Copy link

That worked (and here I thought that I had tried all possibilities). As an FYI when I put the info in the .yaml correctly both the alt_text and the description are displayed. Must be a recent update.

Thanks for your help.

@jeremycherfas
Copy link
Author

Good to know. I guess I need to update.

@flpommeton
Copy link

Just figured out that in my many different attempts to turn on the description I had provided a replacement in mytheme for gallery.html.twig: Contents:

<div class="modular-row gallery-container {{ page.header.class }}">
	{{ unite_gallery(page.media.images, '{
    "gallery_theme":"tiles","tiles_type":"justified", "lightbox_show_textpanel": true, "lightbox_textpanel_enable_description": true}') }}
</div>

Once I got the meta data right it started actually doing something.

@jeremycherfas
Copy link
Author

jeremycherfas commented Dec 13, 2018

Because I have galleries on ordinary blog posts, not on modular pages, I was using only the inbuilt template, with

unitegallery:
    gallery_theme: tiles
    assets_in_meta: true

Now I think I am going to have to make a specific gallery template for posts where I know want a gallery.

Later: In the end I used what you had done to change the call to the gallery within the post; much simpler, and I can save that as a snippet and use it whenever needed.

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

2 participants