Skip to content

Commit

Permalink
Add d2 to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pantonante committed Feb 21, 2024
1 parent 2661074 commit 9f8cc08
Show file tree
Hide file tree
Showing 13 changed files with 1,590 additions and 1,358 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/docs" # App source code path
api_location: "" # Api source code path - optional
output_location: "/dist/" # Built app content directory - optional
output_location: "/dist" # Built app content directory - optional
###### End of Repository/Build Configurations ######
skip_api_build: true

Expand Down
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store

# Generated by d2
public/d2
7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)

## Requirements

- [Node.js](https://nodejs.org/en/download/)
- [npm](https://www.npmjs.com/get-npm)
- [d2](https://github.com/terrastruct/d2/blob/master/docs/INSTALL.md)

## 🧞 Commands

All commands are run from the root of the project, from a terminal:
Expand All @@ -14,4 +20,3 @@ All commands are run from the root of the project, from a terminal:
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

8 changes: 7 additions & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import remarkMath from 'remark-math';
import rehypeMathjax from 'rehype-mathjax';
import astroD2 from 'astro-d2'

// https://astro.build/config
export default defineConfig({
site: 'https://red-meadow-00dc81510.4.azurestaticapps.net',
base: '/v0.3',
outDir: './dist/v0.3',
trailingSlash: "never",
trailingSlash: "always",
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeMathjax],
Expand Down Expand Up @@ -39,6 +40,10 @@ export default defineConfig({
{ label: 'Quick Start', link: '/getting-started/quickstart/' },
],
},
{
label: 'Pipeline',
autogenerate: { directory: 'pipeline' }
},
{
label: 'Metrics',
items: [
Expand Down Expand Up @@ -88,5 +93,6 @@ export default defineConfig({
},
],
}),
astroD2({output: 'd2', basePath: '/v0.3'}),
],
});
Loading

0 comments on commit 9f8cc08

Please sign in to comment.