Skip to content

Demo

This page contains various diff code blocks gathered from the Astro and Starlight documentations to compare the differences between the classic diff syntax and the one used with the remark-auto-diff plugin.

Markdown Code Editor
```diff title="package.json"
{
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "dev": "astro dev",
+ "build": "astro build",
+ "preview": "astro preview"
}
}
```
Preview
package.json
{
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview"
}
}
Markdown Code Editor
```diff
// astro.config.mjs
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
export default defineConfig({
integrations: [
starlight({
title: 'Docs With Custom CSS',
- customCss: [],
+ customCss: [
+ // Relative path to your custom CSS file
+ './src/styles/custom.css',
+ ],
}),
],
})
```
Preview
astro.config.mjs
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
export default defineConfig({
integrations: [
starlight({
title: 'Docs With Custom CSS',
customCss: [],
customCss: [
// Relative path to your custom CSS file
'./src/styles/custom.css',
],
}),
],
})