Skip to content

fix: make footer year dynamic#215

Merged
jevy merged 1 commit intomainfrom
claude/issue-214-20260130-2243
Jan 30, 2026
Merged

fix: make footer year dynamic#215
jevy merged 1 commit intomainfrom
claude/issue-214-20260130-2243

Conversation

@jevy
Copy link
Contributor

@jevy jevy commented Jan 30, 2026

Updated the footer copyright year to be dynamically generated using the current year instead of a hardcoded 2023 value.

Closes #214

Generated with Claude Code

Updated the footer copyright year to be dynamically generated using
the current year instead of a hardcoded 2023 value.

- Added currentYear context variable to vite.config.js using new Date().getFullYear()
- Updated footer.html to use {{currentYear}} Handlebars variable

Closes #214

Co-authored-by: Jevin Maltais <jevy@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

Deploying typestream with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6ad840e
Status: ✅  Deploy successful!
Preview URL: https://c02cf2b7.typestream.pages.dev
Branch Preview URL: https://claude-issue-214-20260130-22-lddp.typestream.pages.dev

View logs

@claude
Copy link

claude bot commented Jan 30, 2026

Pull Request Review

Summary

This PR successfully addresses issue #214 by making the footer copyright year dynamic. The implementation replaces a hardcoded "2023" with a dynamic year that will automatically update.


✅ Positives

  1. Clean Implementation: The solution correctly uses the vite-plugin-handlebars context feature to inject the current year at build time.

  2. Minimal Changes: The PR makes only the necessary changes without over-engineering or adding unnecessary complexity.

  3. Correct Approach: Using build-time year generation via Vite config is appropriate for a static site, avoiding runtime overhead.

  4. Follows Best Practices: The Handlebars variable naming ({{currentYear}}) is clear and semantic.


🔍 Considerations & Suggestions

1. Build-Time vs Runtime

The current implementation generates the year at build time using new Date().getFullYear(). This means:

  • ✅ No client-side JavaScript needed
  • ⚠️ The year will only update when the site is rebuilt

Impact: If the site is built on December 31st and not rebuilt on January 1st, the copyright year will be outdated until the next deployment.

Recommendation: This is typically acceptable for marketing sites that deploy regularly. However, if deployment frequency is a concern, consider documenting this in a comment in vite.config.js:

context: {
  // Note: Year is set at build time. Site must be rebuilt in the new year.
  currentYear: new Date().getFullYear(),
},

2. Test Coverage

There are no automated tests for this change. For a simple footer update this is reasonable, but consider:

  • Manual testing: Verify the footer displays correctly after build
  • Visual regression testing: If you have visual testing tools, ensure the footer renders properly

3. Search for Other Hardcoded Years

I ran a search and confirmed there are no other hardcoded year references in the HTML files that need updating. Good job being thorough! ✅


🎯 Code Quality Assessment

Category Rating Notes
Correctness ✅ Excellent Implementation works as intended
Maintainability ✅ Excellent Simple, clear code
Performance ✅ Excellent Build-time generation, zero runtime cost
Security ✅ No concerns No user input or XSS vectors
Best Practices ✅ Good Follows Handlebars and Vite conventions

📋 Checklist

  • Code solves the stated problem
  • Implementation is simple and maintainable
  • No performance concerns
  • No security vulnerabilities
  • No other hardcoded years found in codebase
  • Manual testing recommended (verify footer after build)

✨ Verdict

LGTM (Looks Good To Me) - This is a clean, straightforward fix that solves the issue appropriately. The implementation is correct and follows best practices for a Vite + Handlebars static site.

The only minor consideration is the build-time vs runtime year generation, but for a marketing website with regular deployments, this approach is perfectly acceptable and arguably preferable (simpler, faster, no client-side JS needed).

Recommendation: ✅ Approve and merge

@jevy jevy merged commit 03b790d into main Jan 30, 2026
4 checks passed
@jevy jevy deleted the claude/issue-214-20260130-2243 branch January 30, 2026 23:43
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.

Update year to be dynamic

1 participant