Skip to content

Commit 254ca76

Browse files
committedApr 11, 2024
config: Drop jekyll-archive, manually create tag pages.
This will also allow us to add some context and intros to the respective pages. This may seem like extra work, but there shouldn't be too many tags anyway.
1 parent 0d948d5 commit 254ca76

File tree

16 files changed

+112
-49
lines changed

16 files changed

+112
-49
lines changed
 

‎Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ group :jekyll_plugins do
1515
gem "jekyll-include-cache"
1616
gem "jekyll-algolia"
1717
gem "jekyll-redirect-from"
18-
gem "jekyll-archives"
1918
gem "webrick"
2019
end

‎_config.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ remote_theme: mmistakes/minimal-mistakes
3131
# Outputting
3232
permalink: /project/:title/
3333
paginate: 5 # amount of posts to show
34-
paginate_path: "blog/page:num"
34+
paginate_path: "latest/page:num"
3535
timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
3636

3737
exclude:
@@ -48,7 +48,7 @@ exclude:
4848
- projects/CONTRIBUTING.md
4949
- projects/LICENSE
5050
- projects/setup.cfg
51-
# - projects # Legacy projects. Should be enabled until all projects converted
51+
- projects # Legacy projects. Should be enabled until all projects converted
5252

5353
# Plugins (previously gems:)
5454
plugins:
@@ -59,7 +59,6 @@ plugins:
5959
- jemoji
6060
- jekyll-include-cache
6161
- jekyll-redirect-from
62-
- jekyll-archives
6362

6463
author:
6564
name : "Laurens Valk"
@@ -119,6 +118,15 @@ defaults:
119118
toc_sticky: true
120119
sidebar:
121120
nav: "install"
121+
# Tag index / archive pages
122+
- scope:
123+
path: "project"
124+
type: pages
125+
values:
126+
layout: project-tag
127+
author_profile: false
128+
share: true
129+
toc: false
122130
# About pages, indexing based on directory structure
123131
- scope:
124132
path: "about"

‎_data/navigation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ about:
5959
- title: "2023: Block based coding"
6060
url: /about/new-pybricks-blocks/
6161
- title: "Latest news"
62-
url: /blog/
62+
url: /latest/

‎_layouts/archive-taxonomy.html

-35
This file was deleted.

‎_layouts/project-tag.html

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
layout: default
3+
---
4+
5+
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
6+
{% include page__hero.html %}
7+
{% elsif page.header.video.id and page.header.video.provider %}
8+
{% include page__hero_video.html %}
9+
{% endif %}
10+
11+
{% if page.url != "/" and site.breadcrumbs %}
12+
{% unless paginator %}
13+
{% include breadcrumbs.html %}
14+
{% endunless %}
15+
{% endif %}
16+
17+
<div id="main" role="main">
18+
{% include sidebar.html %}
19+
20+
21+
22+
<div class="archive">
23+
24+
{% include tag-header.html %}
25+
26+
{% unless page.header.overlay_color or page.header.overlay_image %}
27+
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
28+
{% endunless %}
29+
30+
{{ content }}
31+
32+
{% assign entries_layout = page.entries_layout | default: 'list' %}
33+
{% for tag in site.tags %}
34+
{% if tag[0] == page.project_tag %}
35+
<section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section">
36+
<div class="entries-{{ entries_layout }}">
37+
{% for post in tag.last %}
38+
{% include archive-single.html type=entries_layout %}
39+
{% endfor %}
40+
</div>
41+
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
42+
</section>
43+
{% endif %}
44+
{% endfor %}
45+
</div>
46+
</div>
File renamed without changes.

‎misc/project.md

-9
This file was deleted.

‎project/block-coding/index.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Projects that use Pybricks Block Coding
3+
project_tag: Block Coding
4+
---
5+
6+

‎project/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Projects by category
3+
---
4+
5+
Choose a category!

‎project/lego-42099/index.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Projects for the LEGO® Technic 4X4 X-treme Off-Roader (42099)
3+
project_tag: LEGO 42099
4+
---
5+
6+
Go 42099!

‎project/powered-up-remote/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Projects with the Powered Up Remote
3+
project_tag: Powered Up Remote
4+
---
5+

‎project/python/index.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Projects that use Pybricks MicroPython Coding
3+
project_tag: Python
4+
---
5+
6+

‎project/remote-control/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: LEGO® Remote Control Projects
3+
project_tag: Remote Control
4+
---
5+
6+
7+
technic!!!
8+

‎project/steering-car/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Projects for LEGO® vehicles with front-wheel steering
3+
project_tag: Steering Car
4+
---
5+

‎project/technic/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: LEGO® Technic Projects
3+
project_tag: Technic
4+
---
5+
6+
7+
technic!!!
8+

‎project/xbox-controller/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Projects with the Xbox Controller
3+
project_tag: Xbox Controller
4+
---
5+

0 commit comments

Comments
 (0)