diff options
author | 2022-06-16 20:31:08 -0400 | |
---|---|---|
committer | 2022-06-16 20:31:08 -0400 | |
commit | fca58cfd91b68501ec82350ab023170b208d8ce7 (patch) | |
tree | 443081239f72544fe56aea28f587a3ed54022ea4 /packages/markdown/remark/src/ssr-utils.ts | |
parent | fb80e384e3fd8a45b73d5617f4859e7dfa48d2c3 (diff) | |
download | astro-fca58cfd91b68501ec82350ab023170b208d8ce7.tar.gz astro-fca58cfd91b68501ec82350ab023170b208d8ce7.tar.zst astro-fca58cfd91b68501ec82350ab023170b208d8ce7.zip |
Fix: Netlify edge deployment when using markdown (#3612)
* wip: revert sitemap PR
* fix: extract SSR-ready "slug" helper to separate module
* Un-revert sitemap PR. Not to blame!
This reverts commit 7cd2a8a5ea1e9fdee6837425881328928ceff852.
* fix: use .netlify for edge deployment test
* refactor: add md file to edge function fixture
* fix: add netlify edge tests to ci
* chore: remove stray console log
* wip: undo "dist" change on edge tests
* chore: changeset
* Revert "wip: undo "dist" change on edge tests"
This reverts commit 70e565ef06b228150547bca92bc12d1c236c0ed9.
* temp: add ignore to breaking edge tests
Diffstat (limited to '')
-rw-r--r-- | packages/markdown/remark/src/ssr-utils.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/markdown/remark/src/ssr-utils.ts b/packages/markdown/remark/src/ssr-utils.ts new file mode 100644 index 000000000..1491e24a5 --- /dev/null +++ b/packages/markdown/remark/src/ssr-utils.ts @@ -0,0 +1,8 @@ +/** Utilities used in deployment-ready SSR bundles */ +import Slugger from 'github-slugger'; + +const slugger = new Slugger(); +/** @see {@link "/packages/astro/vite-plugin-markdown"} */ +export function slug(value: string): string { + return slugger.slug(value); +} |