Skip to content

Commit bc2c27b

Browse files
committed
[SITE] add asset link for url and images
shortcode to link to the devopsdays asset url - `file` : create a href link in a new tab - `image` : embeds an image with alt name on the page Signed-off-by: Toshaan Bharvani <[email protected]>
1 parent d63c7a2 commit bc2c27b

File tree

1 file changed

+17
-0
lines changed
  • themes/devopsdays-theme/layouts/shortcodes

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{ $file := .Get "file" }}
2+
{{ $image := .Get "image" }}
3+
{{ $year := .Get "year" }}
4+
{{ $city := .Get "city" }}
5+
{{ $name := .Get "name" }}
6+
7+
{{- if ne $file "" -}}
8+
9+
<a href="https://assets.devopsdays.org/events/{{- $year -}}/{{- $city -}}/{{- $file -}}" target="_blank">{{- $name -}}</a>
10+
11+
{{- end -}}
12+
13+
{{- if ne $image "" -}}
14+
15+
<img src = "https:/assets.devopsdays.org/events/{{- $year -}}/{{- $city -}}/{{- $image -}}" class = "img-fluid" alt="{{- $name -}}">
16+
17+
{{- end -}}

0 commit comments

Comments
 (0)