Genaral question about Frontmatter and markdown and twig

I’ve chosen big-picture the one-page skeleton for further development. I see lots of content in frontmatter (is this twig?). Is it possible to put it into markdown for better editing? I would like to add alt tags e.g.

Obligatory link to the documentation

Twig is a templating “language” used in the templates. You can also activate it and use it in individual pages, both front matter and content.

The front matter of the page (at the top, between the three hyphes) is standard YAML. You can flip some switches to put some Twig variables in the front matter, but you can’t put Markdown there.

If you could explain what it is you’re trying to accomplish, perhaps we could give some specific help.

At the moment I would like to add “alt” tags to the images. In the wiki it is explained for markdown, but at the big-picture theme the images are set in the front matter with YAML.

In the frontmatter it looks like:
images:
-
title: 'Photographie | Pasta’
full: 01_full.jpg
thumbnail: 01_thumbnail.jpg

the images are loaded within a lightbox

To add the alt texts for the thumbnails, do this:

In the frontmatter, add your alt texts like this

images:
    -
        title: Proin sollicitudin at ipsum ut efficitur
        full: 01_full.jpg
        thumbnail: 01_thumbnail.jpg
        alt: Some text here

    -
        title: Etiam congue tellus a rutrum aliquet
        full: 02_full.jpg
        thumbnail: 02_thumbnail.jpg
        alt: Some more text here

And so on.

Then, in the file /user/themes/big-picture/templates/modular/gallery.html.twig, edit line 17 to add the alttext:

<img src="{{ page.media[image.thumbnail].url }}" title="{{ image.title|escape }}" alt="{{ image.alt }}" />

Thanks a lot for that precise explanation :slight_smile: