Skip to content

Commit

Permalink
docs: migrate to starlight
Browse files Browse the repository at this point in the history
  • Loading branch information
jceb committed May 21, 2024
1 parent 20f8fb1 commit 31a443a
Show file tree
Hide file tree
Showing 46 changed files with 4,104 additions and 21,597 deletions.
31 changes: 16 additions & 15 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Dependencies
/node_modules
# build output
dist/
# generated types
.astro/

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

/.direnv
4 changes: 4 additions & 0 deletions docs/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions docs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
10 changes: 7 additions & 3 deletions docs/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ build: update-figures
# #!/usr/share/just-docker/env --image=node:20 bash
yarn run build

# Serve production application
serve:
yarn run serve
# Preview production build
preview:
yarn run preview

# Update dependencies
update-dependencies:
yarn upgrade-interactive --latest

# Clean files
clean:
Expand Down
59 changes: 36 additions & 23 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,54 @@
# Website
# Starlight Starter Kit: Basics

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

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

```
$ yarn
npm create astro@latest -- --template starlight
```

### Local Development
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)

```
$ yarn start
```
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
## 🚀 Project Structure

### Build
Inside of your Astro + Starlight project, you'll see the following folders and files:

```
$ yarn build
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

### Deployment
Images can be added to `src/assets/` and embedded in Markdown with a relative link.

Using SSH:
Static assets, like favicons, can be placed in the `public/` directory.

```
$ USE_SSH=true yarn deploy
```
## 🧞 Commands

Not using SSH:
All commands are run from the root of the project, from a terminal:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `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 |

## 👀 Want to learn more?

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
64 changes: 64 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi';

// https://astro.build/config
export default defineConfig({
site: 'https://dws.identinet.io',
integrations: [
starlight({
title: 'did-web-server',
favicon: '/favicon.svg',
head: [
// Add ICO favicon fallback for Safari.
{
tag: 'link',
attrs: {
rel: 'icon',
href: '/favicon.ico',
sizes: '32x32',
},
},
],
logo: {
light: './src/assets/logo-light.svg',
dark: './src/assets/logo-dark.svg'
},
social: {
github: 'https://github.com/identinet/did-web-server',
"x.com": 'https://x.com/identinet',
},
editLink: {
baseUrl: 'https://github.com/identinet/did-web-server/tree/main/docs/',
},
plugins: [
// Generate the OpenAPI documentation pages.
// Documentation: https://starlight-openapi.vercel.app/configuration/
starlightOpenAPI([
{
base: 'api',
label: 'API',
schema: '../openapi/openapi.yaml',
collapsed: false,
},
]),
],
sidebar: [
{ label: 'Introduction', link: '/' },
{ label: 'Getting Started', link: '/getting-started' },
{ label: 'Configuration', link: '/configuration' },
{
label: 'Deployment',
autogenerate: { directory: 'deployment' },
},
{
label: 'DID Management',
autogenerate: { directory: 'did-management' },
},
{ label: 'Congratulations', link: '/congratulations' },
...openAPISidebarGroups
],
}),
],
});
3 changes: 0 additions & 3 deletions docs/babel.config.js

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/deployment/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/deployment/hosted-service.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/deployment/test-server.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/did-management/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/did-management/resolve-a-did.md

This file was deleted.

Loading

0 comments on commit 31a443a

Please sign in to comment.