feat(astro-redirects): Astro integration for _redirects and frontmatter redirects#1118
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 09:57
9edb721 to
58930c7
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 09:59
58930c7 to
2b56c03
Compare
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 10:02
2b56c03 to
fdd3345
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 10:19
fdd3345 to
3f56eeb
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 10:47
3f56eeb to
1ecf3f3
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 11:23
1ecf3f3 to
d6bfa36
Compare
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
…matter redirects Add @lumeweb/astro-redirects package that provides: - Parse _redirects files (Netlify/IPFS spec compliant) - Extract redirect_from frontmatter via gray-matter - Support splats, placeholders, status codes (200, 301-308, 404, 410, 451) - Optional emitFile to generate _redirects text output - Skip draft posts in production builds - 100% test coverage with vitest Package is private for now until ready for publish.
pcfreak30
force-pushed
the
feat/astro-redirects
branch
from
July 21, 2026 11:26
d6bfa36 to
c045e8c
Compare
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.
Summary
Astro integration that generates redirects from
_redirectsfiles, Markdown frontmatter, and programmatic config. Compatible with the IPFS Web Redirects File spec and inspired byastro-redirect-from.Features
_redirectsfiles (Netlify/IPFS spec):*), placeholders (:id)redirect_fromfrom Markdown/MDX frontmatter via gray-matterdraft: trueposts in production buildsemitFileto output_redirectstext for static hostsUsage
Package
libs/astro-redirects/— new workspace packageprivate: truefor now until ready to publishFiles Changed
libs/astro-redirects/*— new package (12 files)pnpm-lock.yaml— gray-matter + depsThis pull request introduces a new
@lumeweb/astro-redirectsAstro integration library that centralizes redirect management for Astro-based projects.The integration collects redirect rules from three sources:
_redirectsfiles (Netlify/IPFS Web Redirects format) located in the public directory or a custom pathredirect_fromfrontmatter in Markdown/MDX content files undersrc/pagesSupported capabilities include splat patterns (
*), dynamic placeholders, common HTTP status codes (200, 301–308, 404, 410, 451), and absolute destination URLs with allowed schemes (http,https,ipfs,ipns).The integration registers valid 3xx redirects with Astro's built-in redirect config and can optionally emit a
_redirectstext file into the build output for deployment to static hosts. Draft content is excluded from production builds.The change adds the full library source, unit tests, build configuration, documentation, and updates the lockfile with the new package dependencies.