Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

FEATURE: add ability to include alt text in featured images #159

Closed
tmswfrk opened this issue Jul 13, 2020 · 1 comment · Fixed by #154
Closed

FEATURE: add ability to include alt text in featured images #159

tmswfrk opened this issue Jul 13, 2020 · 1 comment · Fixed by #154

Comments

@tmswfrk
Copy link

tmswfrk commented Jul 13, 2020

Feature Request

Please add ability to include alt text in featured images.

Is your feature request related to a problem?

No problem, just something that I think should be included in some way.

[A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]]
Right now, a featured image or images does not include alt text. Likely this is due to the array is represented in the meta information in the markdown files. From my limited understanding so far of SEO best practices, having alt text is very helpful in building a good SEO profile for your site.

Solution

The images parameter in each markdown file would likely need to be updated to something more complicated, such as an array of key / value pairs to represent both the source and the alt text of each image to be featured. So instead of:
images: ["/img/image1.jpg", "img/image2.jpg"]
it would be something more like:
images: [{ src="/img/image1.jpg", alt="alt text for image1" }, { src="/img/image2.jpg", alt="alt text for image2" }]

The logic behind this appears to be primarily in the ./layouts/_default/featured.html file.

Alternatives

I don't have any specific implementation preferences, but wanted to primarily ask more about.

@pacollins
Copy link
Owner

See #154

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants