Skip to content

Comments

Add Year-Based Routing for Provincial and Municipal Jurisdictions#254

Merged
xrendan merged 2 commits intomainfrom
pr-228-update
Jan 31, 2026
Merged

Add Year-Based Routing for Provincial and Municipal Jurisdictions#254
xrendan merged 2 commits intomainfrom
pr-228-update

Conversation

@xrendan
Copy link
Member

@xrendan xrendan commented Jan 31, 2026

Summary

This PR rebases and updates PR #228 by @jclarkin to resolve merge conflicts with main.

Original PR: #228

Changes

  • Introduces year-specific routing for provincial and municipal jurisdictions
  • New URL structure:
    • Provincial: /en/provincial/{province}/{year} (e.g., /en/provincial/ontario/2023)
    • Municipal: /en/municipal/{province}/{municipality}/{year}
  • Backward compatible - routes without year redirect to latest available year
  • Extracts JurisdictionPageContent component for code reuse
  • Adds SpendingFullScreen component for mobile views
  • Updates navigation and sitemap generation

Conflict Resolution

  • Resolved merge conflicts by keeping main's version of evolved components (MainLayout, spending/budget pages)
  • Fixed import paths for moved files (TenureChart, SalaryDistributionChart)

Closes #228

🤖 Generated with Claude Code

- New URL structure: /provincial/{province}/{year} and /municipal/{province}/{municipality}/{year}
- Non-year URLs render latest year without redirect
- Canonical links point to year-specific URLs for SEO
- 301 redirects for old URL patterns
- Consolidated duplicate page logic into shared components
@build-canada-deploy-bot
Copy link

build-canada-deploy-bot bot commented Jan 31, 2026

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
nextjs ✅ Done Preview URL 2026-01-31T17:16:18.729Z

Provincial data folders now use the fiscal year END date:
- FY 2023-24 data -> 2024/ folder
- FY 2024-25 data -> 2025/ folder

This makes URLs like /en/provincial/alberta/2025 represent
the 2024-25 fiscal year, which is more intuitive.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@xrendan xrendan merged commit a827102 into main Jan 31, 2026
@xrendan xrendan deleted the pr-228-update branch January 31, 2026 17:31
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