Skip to content

Commit 085b501

Browse files
authored
Merge pull request #14955 from toshywoshy/assetshortcode
[SITE] add asset link for url and images
2 parents a25f56b + e6415a1 commit 085b501

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-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 -}}

themes/devopsdays-theme/reference.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
&emsp;[registration_end](#registration_end)
3939
&emsp;[event_map](#event_map)
4040
&emsp;[tix](#tix)
41+
&emsp;[asset](#asset)
4142

4243
<!-- /MDTOC -->
4344

@@ -448,3 +449,16 @@ To enable the header text, add `info=show` to enable showing of the Event Info s
448449
```
449450
{{< tix city="belgium" year="antwerp-2024" info="show">}}
450451
```
452+
453+
### asset
454+
Create a links to a file or image from the DevOpsDays assset website.
455+
This shorcode requires the city name `city`, the year `year`, the name `name` being file or image and the link type, being `file` which creates a hyperlink or `image` which embeds the image on the page.
456+
457+
```
458+
{{< asset year="2025" city="chicago" name="prospectus" file="2025-chicago-devopsdays-prospectus.pdf" >}}
459+
```
460+
461+
```
462+
{{< asset year="2025" city="chicago" name="map layout" image="map.png" >}}
463+
```
464+

0 commit comments

Comments
 (0)