Skip to content

Fix 404 errors by adding permalinks to generate proper directory structures#8

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/fix-404-errors-tools-categories
Draft

Fix 404 errors by adding permalinks to generate proper directory structures#8
Copilot wants to merge 6 commits intomainfrom
copilot/fix-404-errors-tools-categories

Conversation

Copy link
Contributor

Copilot AI commented Jan 31, 2026

GitHub Pages was serving 404s because Jekyll generated categories/heat.html while links pointed to /categories/heat/. Jekyll needs explicit permalink directives to generate directory structures with index.html files.

Changes

Category pages (8 files)

  • Added permalink: /categories/{name}/ to heat, flood, coastal, green, planning, data, energy, other

Main pages (3 files)

  • Added permalink: /about/ to about.md
  • Added permalink: /tools/ to tools.md
  • Added permalink: /case-studies/ to case-studies.md

Build configuration

  • Added Jekyll dependencies to Gemfile (theme, plugins, kramdown parser)
  • Created .gitignore for build artifacts
  • Removed duplicate defaults block in _config.yml

Example

---
layout: category
title: Heat Management Tools
category: heat
description: Tools and resources for managing urban heat islands...
permalink: /categories/heat/  # <- Added
---

Generates _site/categories/heat/index.html instead of _site/categories/heat.html, matching the /categories/heat/ link format used throughout the site.

Original prompt

Fix the 404 errors encountered on all tools and category pages when accessed via the GitHub Pages link. Verify and test the configurations to ensure all links and pages are functioning as intended.

Tasks:

  1. Resolve 404 Errors:
    • Identify and fix the issues causing 404 errors on tools pages and category pages.
    • Match file and directory names to their expected URL paths (case sensitivity, .html extensions, etc.).
  2. Verify Site Structure:
    • Ensure each category page and tools page has the required files (e.g., index.html) or valid alternatives.
  3. Update Links:
    • Review and fix all links in the site to align with the correct file paths and URLs to prevent further 404 issues.
  4. Check Configuration:
    • Verify and, if needed, update the _config.yml file for proper routing and GitHub Pages compatibility.
  5. Local Testing:
    • Use the Jekyll serve command to build and test the GitHub Pages site locally.
    • Navigate through the site locally to ensure all links are functional and no 404 errors occur.
  6. Post Fix Validation:
    • Once fixes are applied, deploy the updates and access the live site via the GitHub Pages URL to confirm all tools and category pages are working seamlessly.

Deliverables:

  • Fully functional tools and category pages
  • Error-free navigation through all links on the site
  • Updated _config.yml and other required files as applicable
  • Detailed log of fixes and relevant changes made

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 5 commits January 31, 2026 00:11
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>
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 on tools and category pages Fix 404 errors by adding permalinks to generate proper directory structures Jan 31, 2026
Copilot AI requested a review from mk-ws-git January 31, 2026 00:18
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