Skip to content

Commit 4ef2e88

Browse files
committed
Use series list for structuring docs index
No need for the draft boolean, we already have this information in the project structure.
1 parent 134abd0 commit 4ef2e88

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

_data/projects.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,22 @@
2424
pattern: '\(RhBug:([0-9]+)\)'
2525
docs:
2626
- series: 4.20.x
27-
draft: false
2827
build: |
2928
podman build --target base --tag rpm/web -f tests/Dockerfile .
3029
podman run -it --rm -v $PWD:/srv:z --workdir /srv rpm/web sh -c \
3130
"cmake -B _build -DWITH_DOXYGEN=ON && make -C _build apidoc"
3231
cp -r _build/docs/html $DESTDIR/api
3332
cp -r _build/docs/index.md docs/manual docs/man $DESTDIR/
3433
- series: 4.19.x
35-
draft: false
3634
build: |
3735
podman build --target base --tag rpm/web -f tests/Dockerfile .
3836
podman run -it --rm -v $PWD:/srv:z --workdir /srv rpm/web sh -c \
3937
"cmake -B _build -DENABLE_TESTSUITE=OFF && make -C _build apidoc"
4038
cp -r _build/docs/html $DESTDIR/api
4139
cp -r _build/docs/index.md docs/manual docs/man $DESTDIR/
4240
- series: 6.1.x
43-
draft: true
4441
baseurl: https://rpm-software-management.github.io/rpm
4542
- series: 6.0.x
46-
draft: true
4743
build: |
4844
podman build --target base --tag rpm/web -f tests/Dockerfile .
4945
podman run -it --rm -v $PWD:/srv:z --workdir /srv rpm/web sh -c \

docs/index.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,25 @@
44
---
55

66
{% assign project = site.data.projects | where: "name", "rpm" | first %}
7+
{% assign docs = project.docs | sort: "series" | reverse %}
78

89
<h2>Documentation</h2>
910
<p>Reference documentation shipped with RPM.</p>
1011

1112
<h3>Stable Releases</h3>
12-
{% assign docs = project.docs |
13-
where: "draft", false |
14-
sort: "series" | reverse %}
1513
<ul>
1614
{% for tree in docs %}
15+
{% if project.stable contains tree.series %} {% else %} {% continue %} {% endif %}
1716
<li>
1817
<a href="{{ tree.series }}/">{{ project.title }} {{ tree.series }}</a>
1918
</li>
2019
{% endfor %}
2120
</ul>
2221

2322
<h3>Development</h3>
24-
{% assign docs = project.docs |
25-
where: "draft", true |
26-
sort: "series" | reverse %}
2723
<ul>
2824
{% for tree in docs %}
25+
{% if project.stable contains tree.series %} {% continue %} {% endif %}
2926
{% if tree.baseurl %}
3027
{% assign baseurl = tree.baseurl %}
3128
{% else %}

0 commit comments

Comments
 (0)