Skip to content

Commit 939f318

Browse files
authored
Modify config to include _docs-4 in generated site (#458)
These changes will include the _docs-4 directory in the generated site at `docs/4.x`. All pages will have a warning at the top to tell the reader that these are draft docs for an upcoming 4.0 release. These pages are not listed in the `Documentation` drop down menu.
1 parent a5907e2 commit 939f318

3 files changed

Lines changed: 76 additions & 1 deletion

File tree

_config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ collections:
2727
docs-2:
2828
output: true
2929
permalink: "/docs/2.x/:path"
30+
docs-4:
31+
output: true
32+
permalink: "/docs/4.x/:path"
3033

3134
defaults:
3235
-
@@ -78,5 +81,19 @@ defaults:
7881
javadoc_base: "https://www.javadoc.io/static/org.apache.accumulo"
7982
skiph1fortitle: "true"
8083
gh_branch: "main"
84+
-
85+
scope:
86+
path: ""
87+
type: "docs-4"
88+
values:
89+
layout: "docs-4"
90+
title_prefix: "Accumulo Documentation - "
91+
version: "4.x"
92+
latest_release: "4.0.0-SNAPSHOT"
93+
javadoc_version: "4.0.0-SNAPSHOT"
94+
docs_baseurl: "/docs/4.x"
95+
javadoc_base: "https://www.javadoc.io/static/org.apache.accumulo"
96+
skiph1fortitle: "true"
97+
gh_branch: "main"
8198

8299
plugins: [jekyll-redirect-from]

_docs-4/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ category: getting-started
44
order: 1
55
skip_doc_h1: true
66
---
7-
# User Manual (2.x and 3.x)
7+
# User Manual (4.x)
88

99
Starting with Accumulo 2.0, the user manual now lives on the website as a series
1010
of web pages. Previously, it was one large pdf document that was only generated

_layouts/docs-4.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: default
3+
skiph1fortitle: true
4+
---
5+
6+
<div class="alert alert-danger" style="margin-bottom: 0px;" role="alert">
7+
This is a <strong>draft</strong> user guide for a future release of Accumulo 4.0.0!<br>
8+
</div>
9+
10+
<div class="row">
11+
<div class="col-md-3">
12+
<div class="accordion sticky-top" id="myAccordion" style="top: 100px;">
13+
{% assign mydocs = site.docs-4 | group_by: 'category' %}
14+
{% assign categories = "getting-started,development,security,configuration,administration,troubleshooting" | split: "," %}
15+
{% for pcat in categories %}
16+
{% for dcat in mydocs %}
17+
{% if pcat == dcat.name %}
18+
<div class="accordion-item">
19+
<div class="accordion-header fs-5 fw-bold" id="heading{{ pcat }}">
20+
<button class="accordion-button {% if pcat != page.category %}collapsed{% endif %}" type="button" data-bs-toggle="collapse" data-bs-target="#collapse{{ pcat }}" aria-expanded="{% if pcat == page.category %}true{% else %}false{% endif %}" aria-controls="collapse{{ pcat }}">
21+
{{ pcat | capitalize | replace: "-", " " }}
22+
</button>
23+
</div>
24+
<div id="collapse{{pcat}}" class="accordion-collapse collapse{% if pcat == page.category %} show{% endif %}" aria-labelledby="heading{{ pcat }}" data-bs-parent="#myAccordion">
25+
<div class="accordion-body">
26+
{% assign items = dcat.items | sort: 'order' %}
27+
{% for item in items %}
28+
<div class="row{% if page.title == item.title %} selected{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></div>
29+
{% endfor %}
30+
</div>
31+
</div>
32+
</div>
33+
{% endif %}
34+
{% endfor %}
35+
{% endfor %}
36+
</div>
37+
</div>
38+
<div class="col-md-9">
39+
{% if page.category %}
40+
<p>Accumulo {{ page.version }} Documentation &gt;&gt; {{ page.category | capitalize | replace: "-", " " }} &gt;&gt; {{ page.title }}</p>
41+
{% endif %}
42+
{% unless page.skip_doc_h1 %}
43+
<div class="row mt-4">
44+
<div class="col-md-12 d-flex justify-content-between">
45+
<h1>{{ page.title }}</h1>
46+
<a href="https://github.com/apache/accumulo-website/edit/main/{{ page.path }}" role="button"><span class="fa-solid fa-pen-to-square"></span> <small>Edit this page</small></a>
47+
</div>
48+
</div>
49+
{% endunless %}
50+
{{ content }}
51+
<div class="row mt-4">
52+
<div class="col-md-12 d-flex justify-content-between">
53+
<strong>Find documentation for all releases in the <a href="{{ site.baseurl }}/docs-archive">archive</strong>
54+
<a href="https://github.com/apache/accumulo-website/edit/main/{{ page.path }}" role="button"><span class="fa-solid fa-pen-to-square"></span> <small>Edit this page</small></a>
55+
</div>
56+
</div>
57+
</div>
58+
</div>

0 commit comments

Comments
 (0)