diff options
| -rw-r--r-- | CHANGELOG.md | 5 | ||||
| -rw-r--r-- | layouts/shortcodes/img.html | 6 | ||||
| -rw-r--r-- | layouts/shortcodes/link.html | 9 |
3 files changed, 16 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 13c553d..c674c69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Added multilanguage support -- Added Russian translation +- Add multilanguage support +- Add Russian translation +- Provide an ability to use hreflang attribute in raw links ### Changed diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 3d2b03f..4978358 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -1 +1,5 @@ -<img src="{{ .Get "src" }}" {{- with .Get "alt" }} alt="{{.}}"{{ end }} {{- with .Get "width" }} width="{{.}}"{{ end }} {{- with .Get "height" }} height="{{.}}"{{ end }} {{- with .Get "class" }} class="{{.}}"{{ end }}> +<img src="{{ .Get "src" }}" + {{- with .Get "alt" }} alt="{{ . }}"{{ end }} + {{- with .Get "width" }} width="{{ . }}"{{ end }} + {{- with .Get "height" }} height="{{ . }}"{{ end }} + {{- with .Get "class" }} class="{{ . }}"{{ end }}> diff --git a/layouts/shortcodes/link.html b/layouts/shortcodes/link.html index b6993ec..3778d83 100644 --- a/layouts/shortcodes/link.html +++ b/layouts/shortcodes/link.html @@ -1 +1,8 @@ -<a href="{{ .Get "src" | absURL }}" {{- with .Get "title" }} title="{{.}}"{{ end }} {{- with .Get "class" }} class="{{.}}"{{ end }} {{- with .Get "target" }} target="{{.}}"{{ end }} {{- with .Get "rel" }} rel="{{.}}"{{ end }}>{{ .Inner }}</a> +<a href="{{ .Get "src" | absURL }}" + {{- with .Get "hreflang" }} hreflang="{{ . }}"{{ end }} + {{- with .Get "title" }} title="{{ . }}"{{ end }} + {{- with .Get "class" }} class="{{ . }}"{{ end }} + {{- with .Get "target" }} target="{{ . }}"{{ end }} + {{- with .Get "rel" }} rel="{{ . }}"{{ end }}> + {{- .Inner -}} +</a> |
