diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml
index acbc399c..bf1f89be 100644
--- a/.github/workflows/jekyll.yml
+++ b/.github/workflows/jekyll.yml
@@ -121,6 +121,33 @@ jobs:
uv run ./_validate_pyproject.py git_changed
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
+ validate_categories:
+ runs-on: ubuntu-latest
+ if: >
+ github.event_name == 'pull_request'
+ || (github.ref == 'refs/heads/master'
+ && github.repository == 'bl-sdk/bl-sdk.github.io')
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
+ with:
+ cache-dependency-glob: |
+ **/*requirements*.txt
+ **/*requirements*.in
+ **/*constraints*.txt
+ **/*constraints*.in
+ **/pyproject.toml
+ **/uv.lock
+ **/*.py.lock
+ _validate_categories.py
+
+ - name: Validate mod categories
+ run: uv run ./_validate_categories.py
+
# Deployment job
deploy:
environment:
diff --git a/_config.yml b/_config.yml
index bf3b047a..070e5e01 100644
--- a/_config.yml
+++ b/_config.yml
@@ -28,6 +28,16 @@ defaults:
type: willow2_mods
values:
layout: mod
+ - scope:
+ path: ""
+ type: category_index
+ values:
+ layout: category_index
+ - scope:
+ path: ""
+ type: category_list
+ values:
+ layout: category_list
- scope:
path: ""
values:
diff --git a/_config_oak.yml b/_config_oak.yml
index ad061235..e5d0e070 100644
--- a/_config_oak.yml
+++ b/_config_oak.yml
@@ -10,6 +10,10 @@ collections:
permalink: /oak-mod-db/mods/:name/
output: true
+category_index:
+ enabled: true
+ url: /oak-mod-db/categories/
+
game_selector:
collection: oak_mods
games:
diff --git a/_config_oak2.yml b/_config_oak2.yml
index 4f0b453b..2bf0b6e8 100644
--- a/_config_oak2.yml
+++ b/_config_oak2.yml
@@ -10,6 +10,10 @@ collections:
permalink: /oak2-mod-db/mods/:name/
output: true
+category_index:
+ enabled: true
+ url: /oak2-mod-db/categories/
+
just_the_docs:
collections:
oak2_mods:
diff --git a/_config_willow1.yml b/_config_willow1.yml
index 921c645c..36d508c2 100644
--- a/_config_willow1.yml
+++ b/_config_willow1.yml
@@ -10,6 +10,10 @@ collections:
permalink: /willow1-mod-db/mods/:name/
output: true
+category_index:
+ enabled: true
+ url: /willow1-mod-db/categories/
+
game_selector:
collection: willow1_mods
games:
diff --git a/_config_willow2.yml b/_config_willow2.yml
index 093b7f21..80169ca9 100644
--- a/_config_willow2.yml
+++ b/_config_willow2.yml
@@ -10,6 +10,10 @@ collections:
permalink: /willow2-mod-db/mods/:name/
output: true
+category_index:
+ enabled: true
+ url: /willow2-mod-db/categories/
+
game_selector:
collection: willow2_mods
games:
diff --git a/_data/categories.yml b/_data/categories.yml
new file mode 100644
index 00000000..bc60eef1
--- /dev/null
+++ b/_data/categories.yml
@@ -0,0 +1,14 @@
+# This file lists the categories we accept.
+# The top level keys are what you add to your mod file. All keys are lowercase, and use dashes in
+# place of spaces multiple words.
+# Each value can then have a custom 'title', to fix spaces and/or capitalization, and a custom
+# 'description', which is used in the category list.
+
+lorem:
+ title: Lorem Ipsum
+ description: >
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
+ labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+ nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
+ velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
diff --git a/_includes/components/nav/links.html b/_includes/components/nav/links.html
index 1b2574a8..8e09aafd 100644
--- a/_includes/components/nav/links.html
+++ b/_includes/components/nav/links.html
@@ -8,20 +8,11 @@
{%- for node in include.pages -%}
{%- if include.all == true or node.nav_exclude != true -%}
- {%- if site.game_selector.collection and node.collection == site.game_selector.collection -%}
- {%- assign game_select_classes = "game-any" -%}
- {%- include filter_games.html page=node -%}
- {%- for game in filtered_games -%}
- {%- assign game_class = " game-" | append: game | downcase -%}
- {%- assign game_select_classes = game_select_classes | append: game_class -%}
- {%- endfor -%}
- {%- else -%}
- {%- assign game_select_classes = "" -%}
- {%- endif -%}
+ {%- include mod_filter_classes.html page=node -%}
{%- if include.ancestors contains node.title -%}
-
+
∞
{%- capture nav_error_report -%}
@@ -36,7 +27,7 @@
{%- include components/nav/children.html node=node ancestors=include.ancestors all=include.all -%}
-
+
{%- if nav_children.size >= 1 -%}