Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulio Pescador <jpescador@users.noreply.github.com>2016-02-27 03:20:29 +0300
committerJulio Pescador <jpescador@users.noreply.github.com>2016-02-27 03:20:29 +0300
commitcf6ab633100fa8971cf947aa61a86c65dacfc923 (patch)
treefe91b219d0632fc8323e091ea695762735873312
parent9adee7c9aeaf746246acbfa0efe5497c5563612f (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.md1
-rw-r--r--archetypes/default.md1
-rw-r--r--layouts/post/featured.html2
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 }}