Skip to content

Commit c64b84b

Browse files
authored
Merge pull request #689
Remove .md from links using ReMark plugin
2 parents 7ef7cb2 + 7179cf2 commit c64b84b

File tree

12 files changed

+190
-8
lines changed

12 files changed

+190
-8
lines changed

.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/webResources.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You will need Node 22+ installed on your operating system and in the PATH.
77
* Run `npm install` to restore all dependencies.
88
* Use `npm run dev` to run the documentation site locally.
99

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

1212
## Project Structure
1313

@@ -39,6 +39,55 @@ Content can be authored in Markdown, in a `.md` or `.mdx` file. The Starlight do
3939
* [Authoring Content in Markdown](https://starlight.astro.build/guides/authoring-content/)
4040
* [Using Components](https://starlight.astro.build/components/using-components/) (only in `.mdx`)
4141

42+
Use a spell checker like [Grazie](https://www.jetbrains.com/grazie/) or [Grammarly](https://www.grammarly.com/) to check your content for spelling and grammar errors.
43+
WebStorm has Grazie as a built-in spell checker and grammar checker, and supports a good default writing style.
44+
45+
### Writing Style
46+
47+
* Use the active voice. For example, use "Enable" instead of "Enabled" or "Enabling".
48+
* Use the second person ("you" not "I" or "we"). "You" is the reader of the documentation. "We" is Duende Software.
49+
* Use sentence case in text. Titles use Title Case.
50+
* Use the Oxford comma.
51+
* Avoid words like "very", "simple", "easy", ...
52+
* "As well as" can be written as "and".
53+
* Avoid flowery language.
54+
* When using acronyms, use the full form with parentheses the first time you use it. For example, use "Multi-Factor Authentication (MFA)" instead of "MFA".
55+
56+
### Linking Rules
57+
58+
* Always prefer linking internally over linking externally. For example, when you talk about data protection, prefer an internal link over a link to external sites.
59+
* When linking to external content, consider writing one or two sentences about the context and what the reader will learn on the linked page.
60+
* When linking other pages, use a path that starts at the content root, like `/identityserver/troubleshooting.md`. Use the `.md(x)` file extension - Starlight will update the link to the correct format on build.
61+
* When linking to external resources, use the full URL using HTTPS.
62+
* You can link to header anchors using the `#` symbol, for example `[multiple authentication methods](/identityserver/ui/federation.md#multiple-authentication-methods-for-users)`.
63+
* Link relevant text. Prefer `learn more about [improving the sign-in experience]` over `click [here] to learn more`.
64+
* Run `npm run linkchecker` to validate all links (note this will ignore links to GitHub because of rate limits in place).
65+
66+
### Code Block Style
67+
68+
* Use triple backticks to enclose code blocks.
69+
* Use a language identifier to specify the language (e.g. `csharp`, `bash`, `json`, `html`, `javascript`, `typescript`, `css`, `json`)
70+
* Add a title to the code block. You can do this adding the title as a comment in the first line of the code block (e.g. `// Program.cs`).
71+
* Use [expressive code features](https://starlight.astro.build/guides/authoring-content/#expressive-code-features).
72+
* Readers should not need to scroll horizontally to read a code example. Simplify and condense the code as much as possible.
73+
* If writing C#, use the latest syntax — including top-level statements, collection expressions, ...
74+
* 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.
75+
* Inline comments can be used to explain essential parts of the code. Expressive code can highlight line numbers, show diffs, and more.
76+
* Mention NuGet packages as a `bash` code block showing how to install it (`dotnet add package ...`). Link to the NuGet Gallery.
77+
78+
### Frontmatter Rules
79+
80+
* Always have a `title` property to set the page title.
81+
* Always have a `description` property to set the page description.
82+
* Always have a `date` property to set the creation/significant update date for a page. Use the `YYYY-MM-DD` format.
83+
* Add the `sidebar` property and include the `label`. The `label` is used in the menu, and should typically be shorter than the more descriptive `title`. For example:
84+
```yaml
85+
title: "Using IdentityServer As A Federation Gateway"
86+
sidebar:
87+
label: "Federation"
88+
```
89+
* In the `sidebar` property, use `order` to re-order entries in the navigation bar.
90+
4291
## 🧞 Commands
4392

4493
All commands are run from the root of the project, from a terminal:

astro.config.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-check
21
import { defineConfig, fontProviders } from "astro/config";
32
import starlight from "@astrojs/starlight";
43
import starlightLinksValidator from "starlight-links-validator";
@@ -10,10 +9,14 @@ import starlightHeadingBadges from "starlight-heading-badges";
109
import starlightLlmsTxt from "starlight-llms-txt";
1110
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";
1211
import opengraphImages from "astro-opengraph-images";
13-
import { duendeOpenGraphImage } from "./src/components/duende-og-image.js";
1412
import rehypeExternalLinks from "rehype-external-links";
1513
import * as fs from "node:fs";
1614

15+
// don't convert to path aliases, it doesn't work here
16+
// https://github.com/withastro/astro/issues/9782
17+
import { duendeOpenGraphImage } from "./src/plugins/duende-og-image.js";
18+
import removeMarkdownExtensions from "./src/plugins/remove-markdown-extensions.js";
19+
1720
// https://astro.build/config
1821
export default defineConfig({
1922
site: "https://docs.duendesoftware.com",
@@ -180,6 +183,7 @@ export default defineConfig({
180183
}),
181184
],
182185
markdown: {
186+
remarkPlugins: [[removeMarkdownExtensions, { ignoreRelativeLinks: true }]],
183187
rehypePlugins: [
184188
[
185189
rehypeAstroRelativeMarkdownLinks,

package-lock.json

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"dependencies": {
2626
"@astrojs/markdown-remark": "^6.3.1",
2727
"@astrojs/starlight": "^0.34.0",
28+
"@astrojs/ts-plugin": "^1.10.4",
2829
"@fontsource/roboto": "^5.2.5",
2930
"@pasqal-io/starlight-client-mermaid": "^0.1.0",
3031
"@resvg/resvg-js": "^2.6.2",

src/content/docs/identitymodel-oidcclient/manual.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from:
1010

1111
OpenID Connect is a protocol that allows you to authenticate users
1212
using a browser and involves browser-based interactions. When using this
13-
library you can choose between two modes: [automatic](./automatic.md) and manual.
13+
library you can choose between two modes: [automatic](/identitymodel-oidcclient/automatic.md) and manual.
1414

1515
We recommend using automatic mode when possible, but sometimes you need
1616
to use manual mode when you want to handle browser interactions yourself.

src/content/docs/identityserver/apis/aspnetcore/confirmation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from:
1010
- /identityserver/v7/apis/aspnetcore/confirmation/
1111
---
1212

13-
IdentityServer can [bind tokens to clients](/identityserver/tokens/pop#proof-of-possession-styles) using either mTLS or
13+
IdentityServer can [bind tokens to clients](/identityserver/tokens/pop.md#proof-of-possession-styles) using either mTLS or
1414
DPoP, creating a `Proof-of-Possession` (PoP) access token. When one of these mechanisms is used, APIs that use those
1515
access tokens for authorization need to validate the binding between the client and token. This document describes how
1616
to perform such validation, depending on which mechanism was used to produce a PoP token.

src/content/docs/identityserver/ui/login/mfa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ redirect_from:
99
- /identityserver/v7/ui/login/mfa/
1010
---
1111

12-
Duende IdentityServer itself doesn't implement multi-factor authentication (MFA). MFA is part of the login process in the user interface which is the [responsibility of the hosting application](../index.md). Microsoft provides some [general guidelines](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/mfa) on how to enable MFA in ASP.NET Core.
12+
Duende IdentityServer itself doesn't implement multi-factor authentication (MFA). MFA is part of the login process in the user interface which is the [responsibility of the hosting application](/identityserver/ui/index.md). Microsoft provides some [general guidelines](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/mfa) on how to enable MFA in ASP.NET Core.
1313

1414
## MFA Hosted In IdentityServer
1515

File renamed without changes.

0 commit comments

Comments
 (0)