Skip to content

Commit

Permalink
Update to docusaurus 3 (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek authored Oct 25, 2024
1 parent f9741cd commit 1dc4234
Show file tree
Hide file tree
Showing 11 changed files with 2,610 additions and 3,475 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
echo "WEBHOOK_SITE_API_KEY=${{ secrets.E2E_WEBHOOK_SITE_API_KEY }}" >> .env.e2e
- name: Install dependencies
run: pnpm install --ignore-engines --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Get playwright version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
echo "WEBHOOK_SITE_API_KEY=${{ secrets.E2E_WEBHOOK_SITE_API_KEY }}" >> .env.e2e
- name: Install dependencies
run: pnpm install --ignore-engines --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Get playwright version
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/invitation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ start({
});
```

:::tipsuccess
:::success
With this configuration, sending the invitation is automated thanks to your function.
:::
2 changes: 1 addition & 1 deletion docs/docs/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ In order for the Swan OAuth2 server to recognize your environment, add the follo
https://banking.swan.local:8080/auth/callback
```

:::tipSuccess
:::success
🎉 Your repository is ready for development!
:::
2 changes: 1 addition & 1 deletion docs/docs/specs/banking/banking.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can keep them all, remove some, or add your own—whatever you need.
Finally, included are some **workarounds**.
Let Swan know if you need other workarounds, or if you've found one that works well for your use case.

:::infoTTL
:::info
Swan recommends a 5-minute time-to-live (TTL) for Web Banking, after which the session discontinues automatically.
If the window remains open, the session tokens refresh and the session stays live.
:::
69 changes: 43 additions & 26 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/oceanicNext");
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
import { themes as prismThemes } from "prism-react-renderer";

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Swan Banking Frontend",
tagline: "Onboarding & Banking interfaces for Swan",
favicon: "img/favicon.png",

// Set the production url of your site here
url: "https://swan-io.github.io",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/swan-partner-frontend/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.png",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "swan-io", // Usually your GitHub org/user name.
projectName: "swan-partner-frontend", // Usually your repo name.

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
routeBasePath: "/",
sidebarPath: "./sidebars.js",
// Please change this to your repo.
editUrl: "https://github.com/swan-io/swan-partner-frontend/edit/main/docs/",
},
theme: {
customCss: "./src/css/custom.css",
},
},
],
],

themeConfig: {
navbar: {
title: "Swan Banking Frontend",
Expand Down Expand Up @@ -51,25 +83,10 @@ module.exports = {
copyright: `Copyright © ${new Date().getFullYear()} Swan`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: prismThemes.github,
darkTheme: prismThemes.oceanicNext,
},
},
scripts: [],
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/swan-io/swan-partner-frontend/edit/main/docs/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};

export default config;
23 changes: 12 additions & 11 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@
}
},
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"@docusaurus/theme-search-algolia": "^2.3.1",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
"file-loader": "^6.2.0",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
"@docusaurus/core": "3.4.0",
"@docusaurus/preset-classic": "3.4.0",
"@docusaurus/theme-search-algolia": "3.4.0",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.4.0",
"@docusaurus/types": "3.4.0"
},
"browserslist": {
"production": [
Expand Down
Loading

0 comments on commit 1dc4234

Please sign in to comment.