feat(seo): add PWA web app manifest and theme-color metadata#181
Merged
mikewheeleer merged 1 commit intoJun 26, 2026
Merged
Conversation
Contributor
|
solid — thanks for picking it up 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was done Implemented a web app manifest for installability, PWA integration, and richer platform/OS metadata.
PWA Web App Manifest: Created src/app/manifest.ts using the Next.js MetadataRoute API. It returns name, short_name, description, start_url, display type, and theme/background colors aligned with the Light/Dark palettes defined in src/app/globals.css.
Favicon Integration: Configured the manifest to point to the existing src/app/favicon.ico.
Apple Touch Icon and Metadata Wire-up: Updated src/app/layout.tsx to set manifest to /manifest.webmanifest, specify an apple touch icon mapping /favicon.ico in the metadata, and export a viewport configuration containing the responsive media query-based theme color declarations.
Documentation: Documented the PWA/manifest support in README.md under the SEO section.
Unit Testing: Created src/app/manifest.test.ts to assert that all required manifest keys are present, the configured colors match the palette, and the favicon is registered. Updated src/app/layout.test.tsx to assert viewport and manifest properties.
How it was verified
Checked linting and typecheck:
bash
npm run lint && npm run typecheck
Output: Done with 0 errors
Ran isolated tests with 100% coverage on manifest.ts:
bash
npx jest src/app/manifest.test.ts --coverage --collectCoverageFrom=src/app/manifest.ts
Output:
-------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
manifest.ts | 100 | 100 | 100 | 100 |
-------------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Verified metadata and viewport test suite:
bash
npx jest src/app/layout.test.tsx
Output: PASS (2 passed)
closes #89