Skip to content

Commit

Permalink
Handle all build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed Feb 13, 2025
1 parent c6a157a commit ad6107b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
Empty file.
7 changes: 1 addition & 6 deletions sites/next.skeleton.dev/src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ const docs = defineCollection({
})
});

const blog = defineCollection({
type: 'content',
schema: z.object({})
});

const schemas = defineCollection({
type: 'data',
schema: z.array(
Expand All @@ -47,4 +42,4 @@ const schemas = defineCollection({
)
});

export const collections = { docs, blog, schemas };
export const collections = { docs, schemas };
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import ExampleBubblesRaw from '@examples/guides/cookbook/chat/ExampleBubbles.ast
<Example client:visible />
</Fragment>
<Fragment slot="codeReact">
<Code code={`Coming soon...`} lang="react" />
<Code code={`Coming soon...`} lang="tsx" />
</Fragment>
<Fragment slot="codeSvelte">
<Code code={ExampleRaw} lang="svelte" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ExampleStepOne from '@examples/guides/cookbook/stepper/ExampleStepOne.sve
<Example client:visible />
</Fragment>
<Fragment slot="codeReact">
<Code code={`Coming soon...`} lang="react" />
<Code code={`Coming soon...`} lang="tsx" />
</Fragment>
<Fragment slot="codeSvelte">
<Code code={ExampleRaw} lang="svelte" />
Expand All @@ -36,7 +36,7 @@ Optionally, you can substitute primitive data for components and props.
<ExampleComponent client:visible />
</Fragment>
<Fragment slot="codeReact">
<Code code={`Coming soon...`} lang="react" />
<Code code={`Coming soon...`} lang="tsx" />
</Fragment>
<Fragment slot="codeSvelte">
<div class="space-y-4">
Expand Down
18 changes: 9 additions & 9 deletions sites/next.skeleton.dev/src/pages/docs/[...slug]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export const getStaticPaths = (async () => {
const { entry } = Astro.props;
const { Content, remarkPluginFrontmatter } = await entry.render();
// Get meta for the current page
// This Regex replaces that last part of the url with meta, so "components/accordion/svelte" becomes "components/accordion/meta"
const meta = await getEntry('docs', entry.slug.replace(/\/[^\/]*$/, '/meta'));
// Append common frontmatter
// https://github.com/withastro/astro/issues/7972
// https://docs.astro.build/en/guides/content-collections/#modifying-frontmatter-with-remark
if (meta !== undefined) {
Object.assign(remarkPluginFrontmatter, meta.data);
// Only try to get meta if we're in the components section
if (entry.slug.startsWith('components/')) {
// Get meta for the current page
// This Regex replaces that last part of the url with meta, so "components/accordion/svelte" becomes "components/accordion/meta"
const meta = await getEntry('docs', entry.slug.replace(/\/[^\/]*$/, '/meta'));
// Append common frontmatter
if (meta !== undefined) {
Object.assign(remarkPluginFrontmatter, meta.data);
}
}
---

Expand Down

0 comments on commit ad6107b

Please sign in to comment.