diff options
author | Julio Pescador <jpescador@users.noreply.github.com> | 2016-02-27 03:20:29 +0300 |
---|---|---|
committer | Julio Pescador <jpescador@users.noreply.github.com> | 2016-02-27 03:20:29 +0300 |
commit | cf6ab633100fa8971cf947aa61a86c65dacfc923 (patch) | |
tree | fe91b219d0632fc8323e091ea695762735873312 | |
parent | 9adee7c9aeaf746246acbfa0efe5497c5563612f (diff) |
Can add alt text in the featured imagev0.161
The new variable in the front matter is called featuredalt. Setting the
text value will set the value for the alt attribute.
-rw-r--r-- | archetypes/blog.md | 1 | ||||
-rw-r--r-- | archetypes/default.md | 1 | ||||
-rw-r--r-- | layouts/post/featured.html | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/archetypes/blog.md b/archetypes/blog.md index b310a86..cd86ce7 100644 --- a/archetypes/blog.md +++ b/archetypes/blog.md @@ -5,5 +5,6 @@ description = "" linktitle = "" featured = "" featuredpath = "" +featuredalt = "" type = "post" +++ diff --git a/archetypes/default.md b/archetypes/default.md index 1c2b0d1..051690f 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -5,4 +5,5 @@ description = "" linktitle = "" featured = "" featuredpath = "" +featuredalt = "" +++ diff --git a/layouts/post/featured.html b/layouts/post/featured.html index 3a1a248..5aa9d5f 100644 --- a/layouts/post/featured.html +++ b/layouts/post/featured.html @@ -8,7 +8,7 @@ <div> <a href="{{ .Permalink }}" class="image featured"> - <img src="{{ $path }}/{{ .Params.featured }}" alt="" /> + <img src="{{ $path }}/{{ .Params.featured }}" alt="{{ .Params.featuredalt }}" /> </a> </div> {{ end }} |