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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 0 additions & 116 deletions docusaurus.config.js

This file was deleted.

123 changes: 123 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
import type { Config } from "@docusaurus/types";
import type {
Options as PresetClassicOptions,
ThemeConfig,
} from "@docusaurus/preset-classic";
import { themes } from "prism-react-renderer";
import parseFrontMatter from "./src/plugins/parseIpaFrontMatter";

const config: Config = {
title: "IPA - Improvement Proposal for APIs",
url: "https://mongodb.github.io", // Your website URL
baseUrl: "/ipa/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "mongodb",
projectName: "ipa", // Usually your repo name.
presets: [
[
"classic",
{
docs: {
path: "ipa", // Use ipa/ as docs root
routeBasePath: "/", // Serve docs at site root
sidebarPath: require.resolve("./sidebars.ts"),
editUrl: undefined,
},
blog: false,
theme: {},
} satisfies PresetClassicOptions,
],
],

markdown: {
parseFrontMatter,
},

plugins: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
// When applying `zh` in language, please install `nodejieba` in your project.
indexDocs: true,
indexBlog: false,
indexPages: false,
docsRouteBasePath: "/",
highlightSearchTermsOnTargetPage: true,
searchResultLimits: 8,
searchResultContextMaxLength: 50,
explicitSearchResultPath: true,
},
],
],

themeConfig: {
navbar: {
title: "IPA - Improvement Proposal for APIs",
items: [
{
type: "doc",
docId: "index",
position: "left",
label: "IPA Docs",
},
{
href: "https://github.com/mongodb/ipa",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Documentation",
items: [
{
label: "General Guidelines",
to: "/1",
},
{
label: "SDK Guidelines",
to: "/900",
},
],
},
{
title: "Community",
items: [
{
label: "GitHub Issues",
href: "https://github.com/mongodb/ipa/issues",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/mongodb/ipa",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} MongoDB, Inc. Built with Docusaurus.`,
},
prism: {
theme: themes.github,
darkTheme: themes.dracula,
},
} satisfies ThemeConfig,
};

export default config;
51 changes: 19 additions & 32 deletions ipa/general/0001.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: 1
slug: /1
state: adopt
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also update the guidance in https://mongodb.github.io/ipa/1 to cover the new state tagging? Currently it explicitly states to use admonitions

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All done let me know what you think

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, lgtm 👍

---

# IPA-1 Improvement Proposal for APIs
Expand All @@ -12,12 +12,6 @@ teams discuss and come to a consensus on API guidance.

The principles are not final and are subject to changes.

:::info[State]

Adopt

:::

## Guidance

- IPAs **must** describe guidance on API design
Expand Down Expand Up @@ -70,16 +64,15 @@ labeled with a state described as:
proposal **must** transition to the retired phase
- This allows keeping focus on the correct set of IPAs and avoids documenting
principals that may no longer be worth considering
- Experimental **must** be documented using `warning` admonitions
- Experimental **must** be documented using `state: experimental` in the
frontmatter

Example:

```markdown
:::warning[State]

Experimental

:::
---
state: experimental
---
```

#### Adopt
Expand All @@ -90,16 +83,14 @@ The principle **must** be well-supported at the time of adoption, meaning that:
- It **may** provide tooling support, where possible.
- API producers **must** follow this principle for new resources
- API producers **must** justify opting out
- Adopt **must** be documented using `info` admonitions
- Adopt **must** be documented using `state: adopt` in the frontmatter

Example:

```markdown
:::info[State]

Adopt

:::
---
state: adopt
---
```

#### Deprecated
Expand All @@ -111,16 +102,14 @@ Adopt
- Using deprecated principles for new resources is discouraged and considered
opt-in
- API producers **must** justify its usage
- Deprecated **must** be documented using `warning` admonitions
- Deprecated **must** be documented using `state: deprecated` in the frontmatter

Example:

```markdown
:::warning[State]

Experimental

:::
---
state: deprecated
---
```

#### Retired
Expand All @@ -131,18 +120,16 @@ Experimental
- Retired principles are still useful to keep around
- Historical reasons
- Document how older APIs were designed and implemented
- Retired **must** be documented using `danger` admonitions
- Retired **must** be documented using `state: retired` in the frontmatter

Example:

```markdown
:::danger[State]

Retired

:::
---
state: retired
---
```

## Further Reading

[GitHub Alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts)
[Docusaurus Frontmatter](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter)
8 changes: 1 addition & 7 deletions ipa/general/0002.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: 2
slug: /2
state: adopt
---

# IPA-2 IPA Numbering
Expand All @@ -11,12 +11,6 @@ for Improvement Proposals for APIs.
All IPAs have an associated number to make them easier to reference, and editors
are expected to assign a number to their proposals.

:::info[State]

Adopt

:::

## Assigning IPA Numbers

While IPA numbering is arbitrary, authors can choose to suggest assigning
Expand Down
8 changes: 1 addition & 7 deletions ipa/general/0003.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: 3
slug: /3
state: adopt
---

# IPA-3 IPA Style and Guidance
Expand All @@ -9,12 +9,6 @@ IPAs are most useful when they are clear and concise and cover a single topic or
inquiry well. In the same way that IPAs describe consistent patterns and style
for use in APIs, they also follow consistent patterns and style.

:::info[State]

Adopt

:::

## Guidance

- IPAs **must** cover a single, discrete topic and provide clear, actionable
Expand Down
Loading
Loading