Skip to content

Commit dc4280e

Browse files
committed
Add /quickstarts page to list latest quickstarts
I want to include a link in some video content that will not rot. This link should always contain a list of the quickstarts for the latest version of the proxy. Signed-off-by: Robert Young <[email protected]>
1 parent d8e1250 commit dc4280e

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

_layouts/latest-quickstarts.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: default
3+
---
4+
<!-- _layouts/latest-quickstarts.html -->
5+
{%- assign version = site.data.kroxylicious.latestRelease -%}
6+
{%- assign underscored_version = version | replace: '.', '_' -%}
7+
<div class="row align-items-start justify-content-center my-5">
8+
<div class="col-lg-6" role="main">
9+
<div class="row row-cols-1 row-cols-md-2 g-4">
10+
{%- assign docs_for_release = site.data.documentation[underscored_version].docs | sort: "rank" -%}
11+
{%- for doc in docs_for_release -%}
12+
{%- if doc.path contains 'quick' -%}
13+
{%- assign first1 = doc.path | slice: 0, 1 -%}
14+
{%- assign first7 = doc.path | slice: 0, 7 -%}
15+
{%- assign first8 = doc.path | slice: 0, 8 -%}
16+
{%- if first7 == 'http://' or first8 == 'https://' -%}
17+
{%- assign linkTemplate = doc.path -%}
18+
{%- elsif first1 == '/' -%}
19+
{%- assign linkTemplate = doc.path | absolute_url -%}
20+
{%- else -%}
21+
{%- assign linkTemplate = "/documentation/" | append: version | append: "/" | append: doc.path | absolute_url -%}
22+
{%- endif -%}
23+
<div class="col">
24+
<div class="card shadow mb-2 h-100 mx-2 {%- for tag in doc.tags %} doctag-{{tag}}{%- endfor -%}">
25+
<div class="card-header">
26+
<h2 class="card-title fs-4"><a href='{{ linkTemplate | replace: "$(VERSION)", version}}'>{{ doc.title }}</a></h2>
27+
</div>
28+
<div class="card-body mx-3 my-2">
29+
{{ doc.description }}
30+
</div>
31+
</div>
32+
</div>
33+
{%- endif -%}
34+
{%- endfor -%}
35+
</div>
36+
</div>
37+
</div>
38+

quickstarts/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
layout: latest-quickstarts
3+
---

0 commit comments

Comments
 (0)