Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.jsr-cache.json
.jsr-*-cache.json
.vitepress/cache/
.vitepress/dist/
node_modules/
27 changes: 21 additions & 6 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,24 @@ import {
import llmstxt from "vitepress-plugin-llms";
import { withMermaid } from "vitepress-plugin-mermaid";

const jsrRefPlugin = await jsrRef({
package: "@fedify/fedify",
version: process.env.JSR_REF_VERSION ?? "unstable",
cachePath: ".jsr-cache.json",
});
const jsrRefVersion = process.env.JSR_REF_VERSION ?? "unstable";
const jsrRefPackages = [
["@fedify/fedify", ".jsr-cache.json"],
["@fedify/vocab", ".jsr-vocab-cache.json"],
["@fedify/vocab-runtime", ".jsr-vocab-runtime-cache.json"],
["@fedify/webfinger", ".jsr-webfinger-cache.json"],
["@fedify/debugger", ".jsr-debugger-cache.json"],
["@fedify/testing", ".jsr-testing-cache.json"],
] as const;
const jsrRefPlugins = await Promise.all(
jsrRefPackages.map(([packageName, cachePath]) =>
jsrRef({
package: packageName,
version: jsrRefVersion,
cachePath,
})
),
);

let extraNav: { text: string; link: string }[] = [];
if (process.env.EXTRA_NAV_TEXT && process.env.EXTRA_NAV_LINK) {
Expand Down Expand Up @@ -300,7 +313,9 @@ export default withMermaid(defineConfig({
md.use(footnote);
md.use(taskLists);
md.use(groupIconMdPlugin);
md.use(jsrRefPlugin);
for (const jsrRefPlugin of jsrRefPlugins) {
md.use(jsrRefPlugin);
}
},
},
sitemap: {
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"markdown-it-abbr": "^2.0.0",
"markdown-it-deflist": "^3.0.0",
"markdown-it-footnote": "^4.0.0",
"markdown-it-jsr-ref": "0.4.1",
"markdown-it-jsr-ref": "0.4.4",
"mermaid": "^11.4.1",
"postgres": "catalog:",
"srvx": "^0.11.15",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading