Skip to content
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

Add Docusaurus #740

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@ com.regnosys.rosetta.web/

# CVE scan reports
reports/

# website
website/node_modules
website/build
website/.docusaurus
website/npm-debug.log*
website/yarn-debug.log*
website/yarn-error.log*
2 changes: 2 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../{docs,website}/"
1 change: 1 addition & 0 deletions website/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
26 changes: 26 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
This website was created with [Docusaurus v3](https://docusaurus.io/docs/3.1.1).

In order to start working with Docusaurus, please read the [Getting Started guide](https://docusaurus.io/docs/configuration) and browse through the following folders and files:
- `website` - contains the Node/React code to build the website
- `website/docusaurus.config.js` - contains the Docusaurus configuration; you'll need to edit this file.
- `website/static` - contains images, PDF and other static assets used in the website; if you add a `file.pdf` in this folder, it will be served as `https://<your_host>/file.pdf`.
- `docs` - contains the `.md` and `.mdx` files that are served as `https://<your_host>/<file_id>` ; the `file_id` is defined at the top of the file.

## Local run

Running Docusaurus locally is very simple, just follow these steps:
- Make sure `node` version is 14 or higher, using `node -v` ; you can use [nvm](https://github.com/nvm-sh/nvm) to install different node versions in your system.
- `cd website ; npm install ; npm run start`

The command should open your browser and point to `http://localhost:3000`.

## Deployment

[Netlify] (https://www.netlify.com/) is the default way to serve FINOS websites publicly. Find docs [here] (https://docs.netlify.com/configure-builds/get-started/).

You can configure Netlify using your own GitHub account, pointing to a personal repository (or fork); when adding a new site, please use the following configuration:
- Woeking directory: `website`
- Build command: `yarn build`
- Build directory: `website/build`

If you want to serve your website through `https://<project_name>.finos.org`, please email [[email protected]](mailto:[email protected]). To check a preview, visit https://project-blueprint.finos.org .
6 changes: 6 additions & 0 deletions website/docs/rosetta-code-generators.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: rosetta-code-generators
title: "Rosetta Code Generators"
---

Welcome to Rune DSL !
6 changes: 6 additions & 0 deletions website/docs/rosetta-dsl-overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: rosetta-dsl-overview
title: "Rosetta DSL Overview"
---

Welcome to Rune DSL !
6 changes: 6 additions & 0 deletions website/docs/rosetta-java-documentation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: rosetta-java-documentation
title: "Rosetta Java Documentation"
---

Welcome to Rune DSL !
6 changes: 6 additions & 0 deletions website/docs/rosetta-modelling-components.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: rosetta-modelling-components
title: "Rosetta Modelling Components"
---

Welcome to Rune DSL !
107 changes: 107 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// Docs at https://docusaurus.io/blog/releases/3.1

const projectName = 'Rune DSL'
const projectSlug = 'rune-dsl'
const copyrightOwner = 'REGnosys'

module.exports = {
title: `FINOS ${projectName}`,
tagline: `FINOS ${projectName}`,
url: 'https://finos.org',
baseUrl: '/',
trailingSlash: false,
favicon: 'img/favicon/favicon-finos.ico',
projectName: `FINOS ${projectName}`,
organizationName: 'FINOS',
customFields: {
repoUrl: `https://github.com/finos/${projectSlug}`,
},
scripts: ['https://buttons.github.io/buttons.js'],
stylesheets: ['https://fonts.googleapis.com/css?family=Overpass:400,400i,700'],
themeConfig: {
navbar: {
title: `FINOS ${projectName}`,
logo: {
alt: 'FINOS Logo',
src: 'img/favicon/favicon-finos.ico',
},
items: [
{to: 'docs/rosetta-dsl-overview', label: 'Docs', position: 'right'},
{
href: 'https://github.com/finos/rune-dsl',
label: 'GitHub',
position: 'right',
}
],
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} ${projectName} - ${copyrightOwner}`,
logo: {
alt: 'FINOS Logo',
src: 'img/favicon/favicon-finos.ico',
href: 'https://finos.org'
},
links: [
{
title: 'Docs',
items: [
{
label: 'Docs',
to: 'docs/rosetta-dsl-overview',
},
]
},
{
title: 'FINOS',
items: [
{
label: 'FINOS Website',
to: 'https://www.finos.org/',
},
{
label: 'Community Handbook',
to: 'https://community.finos.org/',
},
{
label: 'FINOS Projects',
to: 'https://landscape.finos.org',
}
]
},
{
title: 'About FINOS',
items: [
{
label: 'FINOS Projects on GitHub',
to: 'https://github.com/finos',
},
{
label: 'Engage the FINOS Community',
to: 'https://www.finos.org/engage-with-our-community',
},
{
label: 'FINOS News and Events',
to: 'https://www.finos.org/news-and-events',
}
]
},
]
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: './docs',
editUrl:
'https://github.com/finos/${projectSlug}/edit/main/website/',
sidebarPath: require.resolve('./sidebars.js')
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
}
}
]
]
};
Loading