Skip to content

Commit 1604565

Browse files
committed
feat(config): add config top-level section
1 parent c86910f commit 1604565

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

_config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ defaults:
5656
values:
5757
layout: "guides"
5858
permalink: /guides/:name
59+
-
60+
scope:
61+
path: "" # an empty string here means all files in the project
62+
type: "config" # previously `post` in Jekyll 2.2.
63+
values:
64+
layout: "config"
65+
permalink: /config/:name
5966
-
6067
scope:
6168
path: "" # an empty string here means all files in the project

_includes/header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
<div class="trigger">
2222
<a class="page-link" href="/get-started/">Get Started</a>
23+
<a class="page-link" href="/config/">Config</a>
2324
<a class="page-link" href="/guides/">Guides</a>
2425
<a class="page-link" href="/demo/">Demo</a>
2526
<a class="page-link" href="/blog/">Blog</a>

_layouts/config.html

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
layout: default
3+
---
4+
5+
{% include back-to-top.html %}
6+
7+
{% assign versioned_page = page.url | startswith: '/version/' %}
8+
{% if versioned_page %}
9+
{% assign docversion = page.url | replace_regex: '^/version/([^/]+)/.*', '\1' %}
10+
{% else %}
11+
{% assign docversion = 'latest' %}
12+
{% endif %}
13+
14+
<div class="home">
15+
<div>
16+
<label id="configindex-version-label">Version</label>
17+
<select id="configindex-version-dropdown">
18+
{% for version in site.data.versions.documentation %}
19+
<option value="{{ version }}" {% if docversion == version %}selected{% endif %}>{% if version == 'latest' %}{{ site.data.versions.cryostat.version }} - {% endif %}{{ version | capitalize }}</option>
20+
{% endfor %}
21+
</select>
22+
</div>
23+
24+
{%- if page.title -%}
25+
<h1 class="page-heading">{{ page.title }}</h1>
26+
{%- endif -%}
27+
28+
{{ content }}
29+
30+
31+
{% if site.paginate %}
32+
{% assign posts = paginator.posts %}
33+
{% else %}
34+
{% assign posts = site.posts %}
35+
{% endif %}
36+
37+
38+
{%- if posts.size > 0 -%}
39+
{%- if page.list_title -%}
40+
<h2 class="post-list-heading">{{ page.list_title }}</h2>
41+
{%- endif -%}
42+
<ul class="post-list">
43+
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
44+
{%- for post in posts -%}
45+
<li>
46+
<span class="post-meta">{{ post.date | date: date_format }}</span>
47+
<h3>
48+
<a class="post-link" href="{{ post.url | relative_url }}">
49+
{{ post.title | escape }}
50+
</a>
51+
</h3>
52+
{%- if site.show_excerpts -%}
53+
{{ post.excerpt }}
54+
{%- endif -%}
55+
</li>
56+
{%- endfor -%}
57+
</ul>
58+
59+
{% if site.paginate %}
60+
<div class="pager">
61+
<ul class="pagination">
62+
{%- if paginator.previous_page %}
63+
<li><a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">{{ paginator.previous_page }}</a></li>
64+
{%- else %}
65+
<li><div class="pager-edge"></div></li>
66+
{%- endif %}
67+
<li><div class="current-page">{{ paginator.page }}</div></li>
68+
{%- if paginator.next_page %}
69+
<li><a href="{{ paginator.next_page_path | relative_url }}" class="next-page">{{ paginator.next_page }}</a></li>
70+
{%- else %}
71+
<li><div class="pager-edge"></div></li>
72+
{%- endif %}
73+
</ul>
74+
</div>
75+
{%- endif %}
76+
77+
{%- endif -%}
78+
79+
</div>

config/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: config
3+
title: Cryostat Advanced Configuration
4+
---
5+
6+
* auto-gen TOC:
7+
{:toc}

0 commit comments

Comments
 (0)