8000 Load Leaflet on dataset pages again by matamadio · Pull Request #216 · GFDRR/rdl-jkan · GitHub
[go: up one dir, main page]

Skip to content

Load Leaflet on dataset pages again - #216

Merged
matamadio merged 1 commit into
rdl-1.0from
fix/dataset-map
Nov 25, 2026
Merged

matamadio merged 1 commit into
rdl-1.0from
fix/dataset-map

Conversation

@matamadio
Copy link
Copy Markdown

The maps of the live dataset pages are empty since #210 (L is not defined): Leaflet is not loaded.

Cause: _includes/head.html loads it if page.layout == "dataset". The layout of these pages comes from the defaults in _config.yml, and Liquid only sees the fields a document has itself, so the condition is never true.

Fix: the condition is now page.collection == "datasets", which Jekyll's DocumentDrop gives for these pages. python/check_site.py now fails the build if a dataset page has no Leaflet.

Testing: checked on a local stand-in for Jekyll which hides page.layout as Jekyll does: without the fix the dataset page has no Leaflet, with it the page has, and the home page still has none. Jekyll itself was not run locally; the check of this PR builds the site with it and runs the new test.

#208 has a third page.layout == "dataset" condition, for css/dataset.css. It needs the same change before it is merged.

🤖 Generated with Claude Code

The maps of the dataset pages were empty: Liquid does not see page.layout
when it comes from the defaults of _config.yml, so the condition added in
#210 was never true. The build check now looks for Leaflet on the pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matamadio
matamadio merged commit 7a44703 into rdl-1.0 Nov 25, 2026
1 check passed
@matamadio
matamadio deleted the fix/dataset-map branch November 25, 2026 23:09
matamadio added a commit that referenced this pull request Nov 25, 2026
Liquid does not see page.layout on these pages, see #216. The build check
now looks for the stylesheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0