Skip to content

Commit

Permalink
Ignore mdx format
Browse files Browse the repository at this point in the history
  • Loading branch information
torn4dom4n committed May 3, 2024
1 parent cecbcd7 commit 714beb1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules/
pnpm-lock.yaml
.netlify/
.astro/
*.mdx
3 changes: 2 additions & 1 deletion src/content/docs/guides/add-latex-to-starlight.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ This guide lead you use LaTeX in Starlight.
<Steps>

1. Start by installing the [`remark-math`](https://github.com/remarkjs/remark-math) and [`rehype-katex`](https://github.com/remarkjs/remark-math/tree/main/packages/rehype-katex) package using your favorite package manager:
<PackageManagerCommand command='add katex rehype-katex remark-math' />

<PackageManagerCommand command="add katex rehype-katex remark-math" />

2. Add `katex`, `rehype-katex` and `remark-math` in `astro.config.mjs`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ This guide helps you add Mermaid Diagrams to Starlight.
<Steps>

1. Start by installing the [`remark-mermaidjs`](https://github.com/remcohaszing/remark-mermaidjs) and [playwright](https://playwright.com):
<PackageManagerCommand command='add remark-mermaidjs playwright playwright-chromium' />

<PackageManagerCommand command="add remark-mermaidjs playwright playwright-chromium" />

2. Setup Astro config:

Expand Down
36 changes: 20 additions & 16 deletions src/content/docs/guides/add-og-images-to-starlight.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import PackageManagerCommand from '@/components/PackageManagerCommand.astro'

<Steps>
1. Start by installing the [`astro-og-canvas`](https://github.com/delucis/astro-og-canvas) package:

<PackageManagerCommand command="add astro-og-canvas"/>

2. Create the image endpoint with this code:

```ts
//src/pages/og/[...route].ts

import { getCollection } from 'astro:content'
import { OGImageRoute } from 'astro-og-canvas'

Expand All @@ -39,6 +41,7 @@ import PackageManagerCommand from '@/components/PackageManagerCommand.astro'
```

3. Override the `<Head/>` component:

```astro
//src/components/Head.astro
---
Expand All @@ -59,21 +62,22 @@ import PackageManagerCommand from '@/components/PackageManagerCommand.astro'

4. Configure Starlight in the `astro.config.ts` file:

```ts ins={8-10}
//astro.config.ts
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
export default defineConfig({
integrations: [
starlight({
components: {
Head: './src/components/Head.astro',
},
}),
],
})
```
```ts ins={8-10}
//astro.config.ts
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
export default defineConfig({
integrations: [
starlight({
components: {
Head: './src/components/Head.astro',
},
}),
],
})
```

</Steps>

Up to you to customize the image using the various options provided by [`astro-og-canvas`](https://github.com/delucis/astro-og-canvas/tree/latest/packages/astro-og-canvas#image-options).
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/guides/embed-youtube-videos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This guide lead you embed YouTube videos in Starlight/Astro.
<Steps>

1. Start by installing the [`lite-youtube-embed`](https://github.com/paulirish/lite-youtube-embed) package using your favorite package manager:
<PackageManagerCommand command='add lite-youtube-embed' />

<PackageManagerCommand command="add lite-youtube-embed" />

2. Create `YouTube.astro` in `src/components`:

Expand Down
2 changes: 1 addition & 1 deletion src/pages/og/[...route].ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export const { getStaticPaths, GET } = OGImageRoute({
padding: 120,
}
},
})
})

0 comments on commit 714beb1

Please sign in to comment.