* 7576 - initial support for HTML inside Markdoc.
This uses htmlparser2 to perform a pure token transform/mutation
on the markdown-it tokens, replacing the original raw HTML string
tokens with a richer set of tokens per HTML node, and in the process
Markdoc tags are interleaved in the resulting token graph at the
appropriate locations
This removes the legacy config of the @astrojs/markdoc integration
entirely (suggested by @bholmesdev) and introduces a new type for
options to be specified in the astro config, initially, with just the new
"enableHTML" option
When "enableHTML" is *not* enabled (the default), the behavior
of the entire @astrojs/markdoc integration should remain functionally
equivalent to before this change
* 7576 - fixed issues with whitespace preservation
also:
* cleaned up " to ' for astro project preferred linting
* made the html rendering test fixture use a dynamic path
* 7576 - detailed nested HTML test coverage
* 7576 - component + HTML interleaved tests
* 7576 - fix lint problems from previous changes
* 7576 - some commentary
* 7576 - file naming, refactor html under imports, package.json exports definition for html
* 7576
* move out of extensions dir, remove export
* cdata handling changes
* 7576
* inline license from third party code
* cleanup test class copy of HTML output
* remove // third party indicators for imports (clarification: not third party code, just a indicator this group of imports is third party)
* 7576 - fixed test before/after for DRY'ness
* 7576 - no need to React-ify HTML attribute case
* 7576 - rename "enableHTML" option to "allowHTML"
* Added Markdoc allowHTML feature changeset
* 7576 - updated README with allowHTML info
* 7576 - fixed changeset typo
* 7576 - minor edits based on PR feedback for docs
* 7576 - minor edits based on PR feedback for docs
* Basic support
* Add the fade transition
* Move CSS into a separate file
* Add transition name
* View Transitions changeset
* Replace the boolean transition with 'morph'
* Update to use `transition:animate`
* Use head propagation
* Move CSS into a separate file
* Add builtin animations and namespaced module
* Misquote
* Remove unused code
* Add automatic prefetching to the View Transitions router
* Use a data attribute for back nav animations
* Use [data-astro-transition]
* Add view transitions to examples
* Wait on the HTML response before calling startViewTransition
* Updated stuff
* Update the compiler
* Fix
* Fallback support
* Properly do fallback
* Simplify the selectors
* Put viewTransitions support behind a flag
* Upgrade the compiler
* Remove unused import
* Add tests
* Use an explicit import instead of types
* Fix case where the click comes from within nested content
* Fix linting
* Add a test for the back button
* Prevent glitch in fallback
* Do not combine selectors
* Fallback to MPA nav if there is an issue fetching
* Fallback swap if there are no animations
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/components/ViewTransitions.astro
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update packages/astro/components/ViewTransitions.astro
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update the changeset
* PR review changes
* Update more based on review comments.
* Update the updateDOM default
* Pass in transitions options to the compiler
* Update broken tests
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/silly-garlics-live.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* h2 -> h4
* Upgrade to stable compiler
* Remove exp redirects from sitemap
* Remove usage from examples
* Remove example updates
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Remove experimental flag for redirects config
* Remove experimental from tests
* Remove experimental CLI flag
* Add changeset
* Removing redirect test that is no longer relevant
* Remove experimental label"
* Update .changeset/dry-beers-grow.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/dry-beers-grow.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Remove old function
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix(#7080): sitemap should only add trailing slash to pages
* fix(sitemap): only include pages in sitemap
* chore: add test
* chore: remove unused import
* docs: update readme
While this README doesn't distinguish between SSR mode and static mode (and SSR mode was recently made available for the sitemaps integration), there is one important difference: Dynamic routes that are server-rendered can't be used to create sitemap entries.
This note makes that clear.
* modifies prefetch to add the option to only prefetch certain pages on hover
* adds new pages to the test website to showcase prefetch-intent functionality
* adds tests to verify prefetch-intent behavior
* adds changelog
* waits until networkidle to check if the prefetching worked instead of waiting on a specific url load
* allows intentSelector to be either a string or array of strings
* Revert "allows intentSelector to be either a string or array of strings"
This reverts commit b0268eb0d5.
* fixes the multiple selector logic and adds tests
* updates docs to include new prefetch-intent integration
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/little-cars-exist.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/prefetch/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* docs: add docs link to markdoc error
* docs: add named exports guide to README
* chore: changeset
* edit: no like so
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* edit: exposed as named exports
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
---------
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* initial commit
* try to fix windows
* output files directly into the correct folder
* allow for rest parameters
* use fixed hook
* improve tests
* apply doc's team suggestions for README
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* try to fix prerendering
* apply doc's team suggestion for changeset
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* bump to minor
* readme update
* resolve review comments
* optimize memory allocation
* resolve review comments
* add removed link, to make sure old docs keep same
* resolve comment
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* start of vercel split support
* Split Mode with the Vercel Adapter
* Write routes into the config.json
* Add a changeset
* Add docs
* Better changeset
* fix: move `node:` libs out of utils
* fix: node -> default
* chore: remove kleur from markdoc ex (why was this there??)
* chore: lock
* chore: changeset
* test: add fixture
* chore: remove unneeded files in fixture
* test: update test mdx filfe
* test: add test case
* mark component as mdx
* add error builder utility
* throw error when it comes from an MDX component
* chore: update lock file
* Add comment to refactor later
* apply review
* add missing comma
* fix: config, prism, shiki exports
* fix: type error for `render` property
* chore: use `.ts` files in select tests for type checks
* fix: type error on shiki() promise
* chore: changeset
* fix: propagate assets when using document `render: null`
* fix: reverse spread order
* refactor: use README rec in test
* chore: changeset
* chore: revert unneeded changes
* Utilizes the new standard WebAPI Fetch Headers.getSetCookie() function
to safely handle multiple set-cookie headers when converting from a
WebAPI Response to a NodeJS ServerResponse
Modifies the existing nodeMiddleware logic which first set AstroCookies
on ServerResponse.setHeader(...) and then called
ServerResponse.writeHead(status, Response.headers) which means any that
if the WebAPI Response had any set-cookie headers on it, they would
replace anything from AstroCookies.
The new logic delegates appending AstroCookie values onto the WebAPI
Response Headers object, so that a single unified function safely
converts the WebAPI Response Headers into a NodeJS compatible
OutgoingHttpHeaders object utilizing the new standard
Headers.getSetCookie() function provided by the undici WebAPI polyfills.
Plus extensive test coverage.
* #7226 - changeset for NodeJS adapter set-cookie fix
* fixing all double quotes to single quotes
---------
Co-authored-by: Alex Sherwin <alex.sherwin@acadia.inc>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Redirects spike
* Allow redirects in static mode
* Support in Netlify as well
* Adding a changeset
* Rename file
* Fix build problem
* Refactor to be more modular
* Fix location ref
* Late test should only run in SSR
* Support redirects in Netlify SSR configuration (#7167)
* Implement support for dynamic routes in redirects (#7173)
* Implement support for dynamic routes in redirects
* Remove the .only
* No need to special-case redirects in static build
* Implement support for redirects config in the Vercel adapter (#7182)
* Implement support for redirects config in the Vercel adapter
* Remove unused condition
* Move to a internal helper package
* Add support for the object notation in redirects
* Use status 308 for non-GET redirects (#7186)
* Implement redirects in Cloudflare (#7198)
* Implement redirects in Cloudflare
* Fix build
* Update tests b/c of new ordering
* Debug issue
* Use posix.join
* Update packages/underscore-redirects/package.json
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update based on review comments
* Update broken test
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Test that redirects can come from middleware (#7213)
* Test that redirects can come from middleware
* Allow non-promise returns for middleware
* Implement priority (#7210)
* Refactor
* Fix netlify test ordering
* Fix ordering again
* Redirects: Allow preventing the output of the static HTML file (#7245)
* Do a simple push for priority
* Adding changesets
* Put the implementation behind a flag.
* Self review
* Update .changeset/chatty-actors-stare.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update docs on dynamic restrictions.
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Code review changes
* Document netlify static adapter
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Slight reword
* Update .changeset/twenty-suns-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add a note about public/_redirects file
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fix miss a head when the templaterender has a promise
* fix
* add some test
* test files move to md directory
* fix add
* delect file
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>