Skip to content

Commit

Permalink
Merge pull request #138 from finos/docs-website
Browse files Browse the repository at this point in the history
Add docusaurus
  • Loading branch information
maoo authored Jun 25, 2024
2 parents ede9795 + 1eaae47 commit 894a2eb
Show file tree
Hide file tree
Showing 34 changed files with 10,660 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,16 @@ obj/
# End of https://www.toptal.com/developers/gitignore/api/dotnetcore,csharp

sdk/**/launchSettings.json

# dependencies
website/node_modules

# production
website/build

# generated files
website/.docusaurus
.cache-loader
website/npm-debug.log*
website/yarn-debug.log*
website/yarn-error.log*
6 changes: 6 additions & 0 deletions docs/home.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: home
title: "Homepage"
---

Welcome to TraderX!
9 changes: 9 additions & 0 deletions docs/roadmap.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: roadmap
title: "TraderX Roadmap"
---

This is the TraderX Roadmap:
1. ...
2. ...
3. ...
9 changes: 9 additions & 0 deletions docs/team.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
id: team
title: "TraderX Team"
---

This is the TraderX team:
1. ...
2. ...
3. ...
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 v2](https://v2.docusaurus.io/).

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 [help@finos.org](mailto:help@finos.org). To check a preview, visit https://project-blueprint.finos.org .
118 changes: 118 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Docs at https://docusaurus.io/docs

const projectName = 'TraderX'
const projectSlug = 'traderX'
const copyrightOwner = 'FINOS - The Fintech Open Source Foundation'

module.exports = {
onBrokenLinks: 'ignore',
title: `${projectName}`,
tagline: `${projectName}`,
url: 'https://finos.org',
baseUrl: '/',
trailingSlash: false,
favicon: 'img/favicon/favicon-traderX.ico',
projectName: `${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: `TraderX`,
logo: {
alt: 'TraderX Logo',
src: 'img/favicon/favicon-traderX.ico',
},
items: [
{to: 'docs/home', label: 'Docs', position: 'right'},
{to: 'docs/roadmap', label: 'Roadmap', position: 'right'},
{to: 'docs/team', label: 'Team', position: 'right'},
{
href: 'https://github.com/finos/',
label: 'GitHub',
position: 'right',
}
],
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} TraderX - ${copyrightOwner}`,
logo: {
alt: 'FINOS Logo',
src: 'img/favicon/favicon-finos.ico',
href: 'https://finos.org'
},
links: [
{
title: 'Docs',
items: [
{
label: 'Getting Started',
to: 'docs/home',
},
{
label: 'Roadmap',
to: 'docs/roadmap',
},
{
label: 'Team',
to: 'docs/team',
}
]
},
{
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/traderX/edit/main/website/',
sidebarPath: require.resolve('./sidebars.js')
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
}
}
]
]
};
41 changes: 41 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"scripts": {
"docusaurus": "docusaurus",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"clear": "docusaurus clear",
"start": "docusaurus start",
"swizzle": "docusaurus swizzle",
"build": "docusaurus build",
"publish-gh-pages": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "^3.2.0",
"@docusaurus/preset-classic": "^3.2.0",
"ajv": "^8.12.0",
"classnames": "^2.5.1",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"eslint": "^8.0.0",
"eslint-plugin-react": "^7.23.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
5 changes: 5 additions & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
mainSidebar: {
'Main Menu': ["home", "team", "roadmap"]
},
}
20 changes: 20 additions & 0 deletions website/src/components/HomepageFeatures.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}

.featureSvg {
height: 200px;
width: 200px;
}

.divider {
border: 100000px solid #000 !important;
}

.furtherReading {
display: flex;
flex-direction: column;
}
Loading

0 comments on commit 894a2eb

Please sign in to comment.