-
Notifications
You must be signed in to change notification settings - Fork 2
feat(ipa): Add IPA metadata UI with frontmatter parsing and validation #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ce3e484
feat(ipa): add state frontmatter to all IPAs + Badge + IpaMetadata co…
andmatei 532729a
chore: prettier --write
andmatei be99232
feat(ipa): validate state frontmatter at build time
andmatei 5598d04
chore: simplify plugin comments
andmatei eabdb77
chore: migrate IPA metadata UI to TypeScript
andmatei 84dce7b
refactor: rename metadata wrapper and simplify Badge colors
andmatei fffccd1
chore: add prettier pre-commit hook and revert preview states
andmatei eadfa5f
chore: revert mistaken pre-commit-hook changes
andmatei fc054df
style: run prettier across repo
andmatei 2198f9d
feat(ipa): validate and normalize IPA frontmatter during parsing
andmatei 2d63354
style(ipa): make deprecated state badge red
andmatei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, lgtm 👍