Skip to content

Fix category page 404s and implement filtered tabular views#5

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-category-links-and-pages
Draft

Fix category page 404s and implement filtered tabular views#5
Copilot wants to merge 4 commits intomainfrom
copilot/fix-category-links-and-pages

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Category pages at /categories/{name}/ were returning 404s. Root cause: _layouts/category.html referenced site.tools (empty collection) instead of site.data.tools (actual data source).

Changes

Category Layout (_layouts/category.html)

  • Fixed data source: site.toolssite.data.tools
  • Replaced card grid with HTML table (Name, Developer, Description, Cost, Skill Level, Actions)
  • Added client-side filters for Cost and Skill Level with real-time count updates
  • Empty state handling with singular/plural tool count ("1 tool" vs "2 tools")
  • Security: Added rel="noopener noreferrer" to external links

CSS (assets/css/style.css)

  • Added missing --spacing-3xl: 64px variable
  • Added .container and .btn-small classes for layout consistency

Repository

  • Created .gitignore for Jekyll artifacts

Data Verification

All 8 category pages exist with proper frontmatter. Tool distribution:

  • coastal (1), data (7), energy (3), flood (1), green (4), heat (1), planning (6), other (0)

Before/After

<!-- Before: Empty results -->
{% for tool in site.tools %}
  {% if tool.categories contains page.category %}
    ...
  {% endif %}
{% endfor %}

<!-- After: Correct data source -->
{% for tool in site.data.tools %}
  {% if tool.categories contains page.category %}
    ...
  {% endif %}
{% endfor %}
Original prompt

Goals:

  1. Fix 404 errors for URLs such as https://mk-ws-git.github.io/Urban-Climate-Tools/categories/flood/ and any other broken category links.
  2. Ensure that each category icon (e.g., Energy Efficiency, Water Management) redirects correctly.
  3. Verify existence of the following category pages within the 'categories/' directory:
    • coastal.md
    • data.md
    • energy.md
    • flood.md
    • green.md
    • heat.md
    • other.md
    • planning.md
    • index.md
  4. Implement further filtered views for each category to display tools related to each specific category in a tabular format.
  5. Verify functionality and ease of navigation for all category pages.
  6. Test locally to ensure all category pages are displayed correctly on the deployed GitHub Pages site.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 30, 2026 19:18
Co-authored-by: mk-ws-git <235080064+mk-ws-git@users.noreply.github.com>
Co-authored-by: mk-ws-git <235080064+mk-ws-git@users.noreply.github.com>
Co-authored-by: mk-ws-git <235080064+mk-ws-git@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix 404 errors for category URLs and improve navigation Fix category page 404s and implement filtered tabular views Jan 30, 2026
@mk-ws-git
Copy link
Owner

@copilot review the plan and codebase and tell mer whats next

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.

2 participants