summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2022-07-14 09:05:20 -0700
committerGravatar GitHub <noreply@github.com> 2022-07-14 09:05:20 -0700
commit01a55467d561974f843a9e0cd6963af7c840abb9 (patch)
treeb3d97d6d234e138f17ec13da48809c0baf7ebd42
parent056d4d5fd2a8e35bcb8dbcf4b408cecd7387f6e4 (diff)
downloadastro-01a55467d561974f843a9e0cd6963af7c840abb9.tar.gz
astro-01a55467d561974f843a9e0cd6963af7c840abb9.tar.zst
astro-01a55467d561974f843a9e0cd6963af7c840abb9.zip
add back missing ssr-utils.ts file (#3919)
-rw-r--r--.changeset/many-terms-do.md5
-rw-r--r--packages/markdown/remark/package.json3
-rw-r--r--packages/markdown/remark/src/ssr-utils.ts8
3 files changed, 15 insertions, 1 deletions
diff --git a/.changeset/many-terms-do.md b/.changeset/many-terms-do.md
new file mode 100644
index 000000000..ba852e6ee
--- /dev/null
+++ b/.changeset/many-terms-do.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/markdown-remark': patch
+---
+
+Add back missing ssr-utils.js file
diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json
index 521f96870..09c5b22e1 100644
--- a/packages/markdown/remark/package.json
+++ b/packages/markdown/remark/package.json
@@ -13,7 +13,8 @@
"homepage": "https://astro.build",
"main": "./dist/index.js",
"exports": {
- ".": "./dist/index.js"
+ ".": "./dist/index.js",
+ "./ssr-utils": "./dist/ssr-utils.js"
},
"scripts": {
"prepublish": "pnpm build",
diff --git a/packages/markdown/remark/src/ssr-utils.ts b/packages/markdown/remark/src/ssr-utils.ts
new file mode 100644
index 000000000..4f099307f
--- /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);
+} \ No newline at end of file