Skip to content

Commit

Permalink
Fix docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Mar 10, 2024
1 parent f5c3d11 commit f144a2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/docs/scripts/generate-plugin-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ for await (const dir of directories) {
const pluginDir = path.join(pluginsDir, pluginName);
const plugin: Plugin = (await import(path.join(pluginDir, 'index.ts'))).default;

const { name, enablers, config, entry, production, project } = plugin;
const { title, enablers, config, entry, production, project } = plugin;

plugins.push([name, pluginName]);
plugins.push([title, pluginName]);

const frontmatter = u('yaml', `title: ${name}\nsidebar:\n hidden: true`);
const frontmatter = u('yaml', `title: ${title}\nsidebar:\n hidden: true`);

const defaults: Record<string, string[]> = {};
if (config && config.length > 0) defaults.config = config;
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/pages/og/[...route].ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function breakText(str: string, maxLines: number, maxLineLen: number) {
}

const getPages = async () => {
const data = await import.meta.glob(['/src/content/**/*.{md,mdx}'], { eager: true });
const data = import.meta.glob(['/src/content/**/*.{md,mdx}'], { eager: true });
const pages: Record<string, unknown> = {};
for (const [filePath, page] of Object.entries(data)) {
const imagePath = filePath.replace(/^\/src\/content\//, '').replace(/(\/index)?\.(md|mdx)$/, '.webp');
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/pages/sitemap.txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ interface Page {
};
}

const data: Record<string, Page> = await import.meta.glob(['/src/content/**/!([)*.{md,mdx}'], { eager: true });
const plugins = await import.meta.glob(['/dist/reference/plugins/*/index.html'], { eager: true });
const data: Record<string, Page> = import.meta.glob(['/src/content/**/!([)*.{md,mdx}'], { eager: true });
const plugins = import.meta.glob(['/dist/reference/plugins/*/index.html'], { eager: true });

const pages = new Set<string>();
for (const [filePath, page] of Object.entries(data)) {
Expand Down

0 comments on commit f144a2f

Please sign in to comment.