Skip to content

Commit

Permalink
feat: add redoc to documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Reining <[email protected]>
  • Loading branch information
renovate[bot] authored and lukas-reining committed Feb 22, 2025
1 parent 9b6f4fb commit 4c78ca2
Show file tree
Hide file tree
Showing 7 changed files with 699 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "external-content/community"]
path = external-content/community
url = https://github.com/open-feature/community
[submodule "external-content/protocol"]
path = external-content/protocol
url = https://github.com/open-feature/protocol
4 changes: 4 additions & 0 deletions docs/reference/technologies/ofrep/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"collapsible": true,
"collapsed": false
}
11 changes: 11 additions & 0 deletions docs/reference/technologies/ofrep/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
sidebar_position: 3
id: ofrep
title: OpenFeature Remote Evaluation Protocol
---

# Server

import ApiDocMdx from '@theme/ApiDocMdx';

<ApiDocMdx />
21 changes: 19 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Options as PresetClassicOptions } from '@docusaurus/preset-classic';
import type { UserThemeConfig as ThemeCommonConfig } from '@docusaurus/theme-common';
import type { UserThemeConfig as AlgoliaThemeConfig } from '@docusaurus/theme-search-algolia';
import type * as Redocusaurus from 'redocusaurus';
import type { Config } from '@docusaurus/types';
import autoprefixer from 'autoprefixer';
import { themes } from 'prism-react-renderer';
Expand Down Expand Up @@ -172,7 +173,7 @@ const themeConfig: ThemeCommonConfig & AlgoliaThemeConfig = {
},
prism: {
theme: themes.oceanicNext,
additionalLanguages: ['java', 'csharp', 'powershell', 'php', 'kotlin', 'ruby'],
additionalLanguages: ['java', 'csharp', 'powershell', 'php', 'kotlin', 'ruby', 'scala'],
magicComments: [
{
className: 'theme-code-block-highlighted-line',
Expand Down Expand Up @@ -284,7 +285,23 @@ const config: Config = {
},
},
],
presets: [['classic', presetClassicOptions]],
presets: [
['classic', presetClassicOptions],
[
'redocusaurus',
{
specs: [
{
id: 'ofrep',
spec: './external-content/protocol/service/openapi.yaml',
},
],
theme: {
primaryColor: '#5D5DFF',
},
},
] satisfies Redocusaurus.PresetEntry,
],
plugins: [
async function tailwind() {
return {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"react-instantsearch": "^7.15.3",
"react-lite-youtube-embed": "^2.4.0",
"react-transition-group": "^4.4.5",
"redocusaurus": "^2.2.1",
"rehype-github-alerts": "^3.0.0",
"remark-gfm": "^4.0.1",
"remarkable": "2.0.1",
Expand Down Expand Up @@ -84,7 +85,7 @@
"fs-extra": "11.3.0",
"markdownlint-cli2": "^0.17.2",
"markdownlint-rule-max-one-sentence-per-line": "^0.0.2",
"prettier": "3.5.1",
"prettier": "3.5.2",
"typescript": "5.7.3",
"wireit": "^0.14.11"
},
Expand Down
13 changes: 13 additions & 0 deletions redocly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends:
- recommended

theme:
# See https://redocly.com/docs/redoc/config/
openapi:
disableSearch: true
hideDownloadButton: true
# See https://redocly.com/docs/api-reference-docs/configuration/theming/
theme:
colors:
primary:
main: '#32329f'
Loading

0 comments on commit 4c78ca2

Please sign in to comment.