Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 0 additions & 33 deletions .dockerignore

This file was deleted.

21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
submodules: true
- name: build
run: |
docker build .
dotnet-version: '10.0.x'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Build container
run: dotnet build.cs container

- name: Run tests
run: dotnet build.cs dotnet-test
25 changes: 13 additions & 12 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
workflow_dispatch:
schedule:
- cron: "0 10 * * 0"
#push:
# branches:
# - main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
Expand All @@ -21,21 +18,25 @@ jobs:
issues: write
name: Link Checker Job
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
submodules: true
- name: Setup Node
dotnet-version: '10.0.x'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Run build
run: |
echo $PWD
./build.sh
node-version: '22'
- name: Build Astro
run: dotnet build.cs astro-build

- name: Link Checker
uses: lycheeverse/lychee-action@v2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: "--header 'x-origin-verify: ${{ secrets.ORIGIN_VERIFICATION_HEADER_VALUE }}' --no-progress --max-concurrency 8 --skip-missing --accept 200,429 --exclude-path root/_llms-txt --exclude-path root/llms.txt --exclude-path root/llms-full.txt --exclude-path root/llms-small.txt --exclude-loopback --require-https --exclude sample.duendesoftware.com --exclude \"docs.duendesoftware.com/404\" --exclude sitemap --exclude \"https://github.com/DuendeArchive/IdentityModel.AspNetCore/\" --root-dir \"$PWD/root\" root/**"
args: '--header ''x-origin-verify: ${{ secrets.ORIGIN_VERIFICATION_HEADER_VALUE }}'' --no-progress --max-concurrency 8 --skip-missing --accept 200,429 --exclude-path server/src/Docs.Web/wwwroot/_llms-txt --exclude-path server/src/Docs.Web/wwwroot/llms.txt --exclude-path server/src/Docs.Web/wwwroot/llms-full.txt --exclude-path server/src/Docs.Web/wwwroot/llms-small.txt --exclude-loopback --require-https --exclude sample.duendesoftware.com --exclude "docs.duendesoftware.com/404" --exclude sitemap --exclude "https://github.com/DuendeArchive/IdentityModel.AspNetCore/" --root-dir "$PWD/server/src/Docs.Web/wwwroot" server/src/Docs.Web/wwwroot/**'
fail: true
48 changes: 43 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# build output
dist/
root/
# Astro build output
astro/dist/
astro/root/
server/src/Docs.Web/wwwroot/

# generated types
.astro/
astro/.astro/

# dependencies
node_modules/
Expand All @@ -28,5 +30,41 @@ pnpm-debug.log*
opencode.json
.idea/**/copilot.data.migration.*.xml

# ides
# .NET
*.user
*.suo
*.userosscache
*.sln.docstates
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
.vs/
*.nupkg
*.snupkg
project.lock.json
project.fragment.lock.json
artifacts/

# Rider
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# User-specific files
*.rsuser

# JetBrains Rider
*.sln.iml

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# Windows
Thumbs.db
ehthumbs.db

# Azure Functions
local.settings.json
33 changes: 0 additions & 33 deletions Dockerfile

This file was deleted.

133 changes: 97 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,98 @@ Welcome to the documentation of all [Duende Software](https://duendesoftware.com

## Getting Started

You will need Node 22+ installed on your operating system and available in the PATH.
You will need the following installed:
* [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
* Node.js 22+

* Run `npm install` to restore all dependencies.
* Use `npm run dev` to run the documentation site locally.
### Quick Start (Astro only)

```bash
cd astro
npm install
npm run dev
```

### Development with .NET Aspire

For local development with the full stack (Astro dev server + ASP.NET Core):

```bash
dotnet build.cs aspire
```

This starts:
* **Astro dev server** at http://localhost:4321 (with hot reload)
* **ASP.NET Core server** (for production-like static file serving)
* **Aspire Dashboard** at https://localhost:17001 (for traces, logs, metrics)

Alternatively in VS Code, GitHub Codespaces, or WebStorm, you can use the devcontainer to get a development environment set up.

## Build Commands

All commands use the `build.cs` file-based build script and can be run from any directory in the repository:

| Command | Action |
| :------ | :----- |
| `dotnet build.cs` | Build everything (Astro + .NET) |
| `dotnet build.cs astro-build` | Build Astro to wwwroot |
| `dotnet build.cs dotnet-build` | Build .NET solution |
| `dotnet build.cs container` | Build container image |
| `dotnet build.cs aspire` | Start Aspire dev environment |
| `dotnet build.cs clean` | Clean all build outputs |
| `dotnet build.cs verify-formatting` | Check .NET code formatting |
| `dotnet build.cs --list-targets` | List all available targets |

## Container

The container is built using `dotnet publish /t:PublishContainer` (no Dockerfile required).

### Building the container

```bash
dotnet build.cs container
```

### Running the container

```bash
docker run -p 8080:8080 docs
```

The site will be available at http://localhost:8080.

## Project Structure

This project uses Astro + Starlight. You'll see the following folders and files:
This project uses Astro + Starlight for the documentation site, served by ASP.NET Core in production.

```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
├── build.cs # File-based build script
├── astro/ # Astro documentation site
│ ├── public/
│ ├── src/
│ │ ├── assets/
│ │ ├── content/
│ │ │ └── docs/
│ │ └── content.config.ts
│ ├── astro.config.mjs
│ ├── package.json
│ └── tsconfig.json
└── server/ # ASP.NET Core server
├── src/
│ ├── Docs.Web/ # Static file server
│ │ └── wwwroot/ # Astro build output (gitignored)
│ ├── Docs.AppHost/ # .NET Aspire orchestrator
│ └── Docs.ServiceDefaults/ # Shared configuration
└── tests/
└── Docs.Web.Tests/ # Integration tests
```

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.
Starlight looks for `.md` or `.mdx` files in the `astro/src/content/docs/` directory. Each file is exposed as a route based on its file name.

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

Static assets, like favicons, can be placed in the `public/` directory.
Static assets, like favicons, can be placed in the `astro/public/` directory.

## ✍️ Authoring

Expand Down Expand Up @@ -63,7 +126,7 @@ WebStorm has Grazie as a built-in spell checker and grammar checker, and support
* When linking to external resources, use the full URL using HTTPS.
* You can link to header anchors using the `#` symbol, for example `[multiple authentication methods](/identityserver/ui/federation.md#multiple-authentication-methods-for-users)`.
* Link relevant text. Prefer `learn more about [improving the sign-in experience]` over `click [here] to learn more`.
* Run `npm run linkchecker` to validate all links (note this will ignore links to GitHub because of rate limits in place).
* Run `dotnet build.cs link-check` to build Astro for link validation (actual lychee check runs in CI).
* When a markdown link is long (75+ characters) or a link is repeated multiple times on a page, prefer moving the link to the bottom of the file and using markdown anchor syntax `[test.cs][repo-test-file]`

### Markdown Style
Expand All @@ -84,7 +147,7 @@ WebStorm has Grazie as a built-in spell checker and grammar checker, and support
* Make sure examples are runnable and complete. The goal is "Copy-paste from docs". Include namespaces, a result, and other prerequisites that are not obvious to someone new to the code.
* Inline comments can be used to explain essential parts of the code. Expressive code can highlight line numbers, show diffs, and more.
* Mention NuGet packages as a `bash` code block showing how to install it (`dotnet add package ...`). Link to the NuGet Gallery.
* When referencing a property, field, class, or other symbol in text, use the `test` format instead of *test*.
* When referencing a property, field, class, or other symbol in text, use the `test` format instead of _test_.
* Values should also be back-ticked, especially HTTP Status codes like `404` or `401`.
* Make sure code blocks start at the very first character space and don't have excessive starting padding.

Expand All @@ -95,30 +158,29 @@ WebStorm has Grazie as a built-in spell checker and grammar checker, and support
* Always have a `date` property to set the creation/significant update date for a page. Use the `YYYY-MM-DD` format.
* Add the `sidebar` property and must include the `label` and `order`. The `label` is used in the menu, and should typically be shorter than the more descriptive `title`. For example:

```yaml
title: "Using IdentityServer As A Federation Gateway"
sidebar:
label: "Federation"
order: 1
```
```yaml
title: "Using IdentityServer As A Federation Gateway"
sidebar:
label: "Federation"
order: 1
```

## 🧞 Commands

All commands are run from the root of the project, from a terminal:
Astro commands are run from the `astro/` directory:

| 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 |
| `npm run linkchecker` | Run lychee link checker |
| Command | Action |
| :------ | :----- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build production site (use `dotnet build.cs astro-build` instead) |
| `npm run preview` | Preview your build locally |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |

## 🔀 Redirects

There are two ways to restructure content:

* Internal (move content around in the current structure)
* External (move content outside the current structure)

Expand All @@ -133,7 +195,6 @@ title: Page title
redirect_from:
- /old-path-to/content
---

Page content goes here
```

Expand All @@ -142,7 +203,7 @@ This will generate the page at the new location, and put a redirect to it at the
### External Restructuring

When moving a page outside the structure, or you need a redirect to another location altogether,
edit the `astro.config.mjs` file and append a key/vaklue pair to the `redirects` property:
edit the `astro/astro.config.mjs` file and append a key/value pair to the `redirects` property:

```json
redirects: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading