Refactor duplicated code and remove dead code #96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR eliminates code duplication and removes unused code across the repository, reducing the codebase by 64 lines while improving maintainability and organization.
Changes Made
1. Refactored
pewpew.htmlto Use Layout InheritanceThe
pewpew.htmlfile previously contained a complete HTML document structure with duplicated<head>,<body>, and metadata tags. This has been refactored to use Jekyll's layout system:_layouts/pewpew.html- A dedicated layout for the pewpew page_includes/pewpew-head.html- Extracted pewpew-specific meta tags (Open Graph, Twitter Card, favicons, etc.)pewpew.htmlfrom 231 to 183 lines (48 lines removed, 20.8% reduction)This change eliminates duplication while maintaining all functionality and SEO metadata.
2. Removed Dead Code from
assets/js/s.jsDiscovered and removed an unused
scrollToItem()helper function that was defined but never called anywhere in the codebase:Reduced
assets/js/s.jsfrom 100 to 38 lines (62% reduction)3. Refactored Layout Inheritance Structure
The
_layouts/home.htmlfile duplicated the entire HTML structure from_layouts/default.html:Before:
After:
_layouts/default.htmlto support abody_classparameter_layouts/home.htmlto inherit from default layout<html>, and<body>declarationsImpact
Testing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.