Skip to content

Commit f878c10

Browse files
committed
website overview fix
1 parent f6a49d1 commit f878c10

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

_data/sidebars/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ subitems:
2020
subitems:
2121
- title: Contributor page
2222
url: /contributors.html
23-
- title: All resources
24-
url: /all_resources.html
2523
- title: Events
2624
url: /events.html
2725
- title: News page
@@ -39,6 +37,12 @@ subitems:
3937
url: /general_page_3.html
4038
- title: General page 4
4139
url: /general_page_4.html
40+
- title: All resources
41+
url: /all_resources.html
42+
- title: All trainings
43+
url: /all_trainings.html
44+
- title: Website overview
45+
url: /website_overview.html
4246
- title: 404 page not found
4347
url: /404.html
4448

_includes/pageids-overview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
{%- assign sidebar = site.data.sidebars.main.subitems -%}
2+
{%- assign sidebar = site.data.sidebars[include.sidebar]['subitems'] -%}
33
{%- for sections in sidebar %}
44
{%- assign section = sections.title | downcase | replace: " ", "_" %}
55
{%- assign section_pages = site.pages | where:"type", section %}
6-
{%- unless section_pages == nil %}
6+
{%- unless section_pages.size == 0 %}
77
<h2>{{sections.title}}</h2>
88
<div class="table-responsive">
99
<table class="table ">

pages/example_pages/all_resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Overview page example
2+
title: All resources
33
toc: false
44
datatable: true
55
---

pages/example_pages/all_trainings.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: All training
3+
toc: false
4+
datatable: true
5+
---
6+
7+
Nam non sollicitudin sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas consectetur nulla nec rutrum rhoncus. Sed non urna sem. Maecenas sed lobortis urna, hendrerit aliquet massa. Phasellus felis dui, feugiat ut sapien vel, mattis dictum eros. Suspendisse in felis sit amet dui elementum rutrum tristique eget velit. Sed hendrerit, ante sit amet hendrerit cursus, ante nibh accumsan nibh, vitae rhoncus quam ipsum placerat ante.
8+
9+
## Listing all resources
10+
11+
12+
```
13+
{% raw %}
14+
{% include training-table-all.html %}
15+
{% endraw %}
16+
```
17+
18+
19+
{% include training-table-all.html %}
20+
21+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Website overview
3+
toc: false
4+
---
5+
6+
Nam non sollicitudin sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas consectetur nulla nec rutrum rhoncus. Sed non urna sem. Maecenas sed lobortis urna, hendrerit aliquet massa. Phasellus felis dui, feugiat ut sapien vel, mattis dictum eros. Suspendisse in felis sit amet dui elementum rutrum tristique eget velit. Sed hendrerit, ante sit amet hendrerit cursus, ante nibh accumsan nibh, vitae rhoncus quam ipsum placerat ante.
7+
8+
## Listing all resources
9+
10+
11+
```
12+
{% raw %}
13+
{% include pageids-overview.html sidebar="main"%}
14+
{% endraw %}
15+
```
16+
17+
18+
{% include pageids-overview.html sidebar="main" %}
19+

0 commit comments

Comments
 (0)