Skip to content

Commit 5e09ac0

Browse files
ricardoamarosvrnmopentelemetrybotchalin
authored
Time-boxed entries for the banner (#4429)
Co-authored-by: Severin Neumann <[email protected]> Co-authored-by: opentelemetrybot <[email protected]> Co-authored-by: Patrice Chalin <[email protected]> Co-authored-by: Severin Neumann <[email protected]>
1 parent bc8a24b commit 5e09ac0

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

content/en/_index.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@ title: OpenTelemetry
33
description: >-
44
High-quality, ubiquitous, and portable telemetry to enable effective
55
observability
6-
show_banner: true
76
outputs:
87
- HTML
98
- REDIRECTS # Include this `content/en` ONLY
109
developer_note:
1110
The blocks/cover shortcode (used below) will use as a background image any
1211
image file containing "background" in its name.
12+
show_banner: true
13+
limit_banner: 2 # Default to 2, adjust as needed
14+
banners:
15+
- message:
16+
'<i class="fas fa-bullhorn"></i> Join us for [**OTel Community Day** on
17+
June
18+
25th](https://events.linuxfoundation.org/open-telemetry-community-day/)!'
19+
to: 2024-06-25
20+
- message:
21+
'<i class="fas fa-bullhorn"></i> Help improve OTel and Prometheus
22+
interoperability: [complete our
23+
survey](https://forms.gle/bZAG9f7udoJsjZUG9) by May 31'
24+
to: 2024-05-31
1325
---
1426

1527
<div class="d-none"><a rel="me" href="https://fosstodon.org/@opentelemetry"></a></div>

layouts/partials/banner.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
{{/* cSpell:ignore contribfest */ -}}
2-
{{ if .Params.show_banner -}}
3-
1+
{{/* cSpell:ignore markdownify */ -}}
2+
{{ if and .Params.show_banner (gt (len (.Params.banners | default slice)) 0) }}
3+
{{ $limit := .Params.limit_banner | default 2 }}
4+
{{ $sorted := sort .Params.banners "to" }}
5+
{{ $currentDate := now.Format "2006-01-02" }}
6+
{{ $filtered := slice }}
7+
{{ range $sorted }}
8+
{{ if le $currentDate .to }}
9+
{{ if lt (len $filtered) $limit }}
10+
{{ $filtered = $filtered | append . }}
11+
{{ end }}
12+
{{ end }}
13+
{{ end }}
414
<div class="o-banner">
5-
6-
<i class="fas fa-bullhorn"></i> Join us for
7-
[**OTel Community Day** on June 25th](https://sessionize.com/OTel-Community-Day/)!
8-
9-
15+
{{ range $filtered }}
1016
<!-- prettier-ignore -->
11-
<i class="fas fa-bullhorn"></i>
12-
Help improve OTel and Prometheus interoperability: [complete our survey](https://forms.gle/bZAG9f7udoJsjZUG9) by May 31
13-
{.pt-0}
14-
15-
17+
{{ .message | markdownify }}
18+
{{ end }}
1619
</div>
17-
{{ end -}}
20+
{{ end -}}

0 commit comments

Comments
 (0)