mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 04:31:13 +00:00
feat: fixes on docs website (#3563)
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ logs/
|
||||
.DS_Store
|
||||
*.env
|
||||
.venv
|
||||
venv
|
||||
.vscode
|
||||
*.ipynb
|
||||
env/
|
||||
|
||||
67
website/README.md
vendored
67
website/README.md
vendored
@@ -1,3 +1,70 @@
|
||||
# OpenBB Documentation Website
|
||||
|
||||
This repository contains the source code for the OpenBB Documentation Website.
|
||||
|
||||
The website was built using [Docusaurus](https://docusaurus.io/), a modern static website generator and [TailwindCSS](https://tailwindcss.com) as styling solution.
|
||||
The final website can be found at [https://docs.openbb.co](https://docs.openbb.co).
|
||||
|
||||
|
||||
## Folder Structure
|
||||
|
||||
```bash
|
||||
website
|
||||
├── content # Markdown files
|
||||
| ├── sdk # SDK markdown files
|
||||
| └── terminal # Terminal markdown files
|
||||
├── old_content # previous terminal documentation; required to get the examples for terminal reference
|
||||
├── src # react stuff for website
|
||||
├── static # Static files
|
||||
├── generate_sdk_markdown.py # Script to generate markdown files for SDK
|
||||
└── generate_terminal_markdown.py # Script to generate markdown files for Terminal
|
||||
```
|
||||
|
||||
### Markdown files
|
||||
|
||||
The markdown files are used to generate the website. The markdown files are located in the `content` folder. The markdown files are generated using the `generate_sdk_markdown.py` and `generate_terminal_markdown.py` scripts. The markdown files are generated from the docstrings in the SDK and Terminal code. Files inside `content/sdk/reference` and `content/terminal/reference` should not be changed manually because they are generated automatically on every commit.
|
||||
|
||||
|
||||
## Run locally
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Node.js](https://nodejs.org/en/) >= 16.13.0
|
||||
To check if you have Node.js installed, run this command in your terminal:
|
||||
|
||||
```bash
|
||||
node --version # should be v16.13.0 or higher
|
||||
```
|
||||
|
||||
### Install dependencies
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
### Start development server
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
This command starts a local development server and open up a browser window in `http://localhost:3000`. Most changes are reflected live without having to restart the server.
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service. We use Github Pages to host our website. It's deployed in the `gh-pages` branch.
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions to the OpenBB Documentation Website.
|
||||
|
||||
---
|
||||
<details><summary>DEPRECATED - OLD README</summary>
|
||||
<p>
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ aapl = openbb.stocks.load("aapl")
|
||||
combined_df = openbb.forecast.combine(spy,aapl, dataset="aapl", column= "Close")
|
||||
openbb.forecast.show(combined_df)
|
||||
```
|
||||
<img width="507" alt="image" src="https://user-images.githubusercontent.com/105685594/203791078-181431cb-99bf-4d26-bfff-b4cf34b5dee2.png">
|
||||
<img width="507" alt="image" src="https://user-images.githubusercontent.com/105685594/203791078-181431cb-99bf-4d26-bfff-b4cf34b5dee2.png" />
|
||||

|
||||
|
||||
|
||||
@@ -113,7 +113,6 @@ openbb.forecast.expo_chart(df)
|
||||
```
|
||||
|
||||
Here was can now see a chart and table with the expected values, and historic data. The chart also tells us how our backtesing performed, so that we can know the accuracy of our prediction.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
8
website/src/pages/index.tsx
vendored
8
website/src/pages/index.tsx
vendored
@@ -25,12 +25,10 @@ export default function Home(): JSX.Element {
|
||||
<div className="flex flex-col md:flex-row w-full container items-center justify-center gap-6 px-6 sm:mx-0 mt-8 md:!mt-14 lg:!mt-15 md:mb-0">
|
||||
<Link
|
||||
style={{
|
||||
backgroundImage: "url('/img/terminal_bg.png')",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "100% 110%",
|
||||
}}
|
||||
to="/terminal"
|
||||
className="shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-400 bg-white dark:bg-grey-900"
|
||||
className="bg-[url('/img/terminal_bg_light.png')] dark:bg-[url('/img/terminal_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-400 bg-white dark:bg-grey-900"
|
||||
>
|
||||
<h3 className="uppercase tracking-widest font-bold text-2xl mb-3">
|
||||
OpenBB Terminal
|
||||
@@ -50,12 +48,10 @@ export default function Home(): JSX.Element {
|
||||
</Link>
|
||||
<Link
|
||||
style={{
|
||||
backgroundImage: "url('/img/sdk_bg.png')",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "100% 130%",
|
||||
}}
|
||||
to="/sdk"
|
||||
className="shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-400 bg-white dark:bg-grey-900"
|
||||
className="bg-[url('/img/sdk_bg_light.png')] dark:bg-[url('/img/sdk_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-400 bg-white dark:bg-grey-900"
|
||||
>
|
||||
<h3 className="uppercase tracking-widest font-bold text-2xl mb-3">
|
||||
OpenBB SDK
|
||||
|
||||
20
website/src/theme/Footer/index.js
vendored
20
website/src/theme/Footer/index.js
vendored
@@ -1,16 +1,10 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useThemeConfig } from "@docusaurus/theme-common";
|
||||
import FooterLinks from "@theme/Footer/Links";
|
||||
import FooterLogo from "@theme/Footer/Logo";
|
||||
import FooterCopyright from "@theme/Footer/Copyright";
|
||||
import FooterLayout from "@theme/Footer/Layout";
|
||||
import Link from "@docusaurus/Link";
|
||||
import LetteringLogo from "@site/src/components/Icons/LetteringLogo";
|
||||
import StarIcon from "@site/src/components/Icons/Star";
|
||||
import GithubIcon from "@site/src/components/Icons/Github";
|
||||
import LinkedinIcon from "@site/src/components/Icons/Linkedin";
|
||||
import TwitterIcon from "@site/src/components/Icons/Twitter";
|
||||
import InstagramIcon from "@site/src/components/Icons/Instagram";
|
||||
import TiktokIcon from "@site/src/components/Icons/Tiktok";
|
||||
import RedditIcon from "@site/src/components/Icons/Reddit";
|
||||
import DiscordIcon from "@site/src/components/Icons/Discord";
|
||||
@@ -135,7 +129,7 @@ function Footer() {
|
||||
<div className="mt-4 mb-10 grid grid-cols-4 gap-4 self-start md:my-0 md:grid-cols-8 md:self-end">
|
||||
<a
|
||||
aria-label="GitHub Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://github.com/OpenBB-finance/OpenBBTerminal"
|
||||
@@ -144,7 +138,7 @@ function Footer() {
|
||||
</a>
|
||||
<a
|
||||
aria-label="LinkedIn Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://www.linkedin.com/company/openbb-finance/"
|
||||
@@ -153,7 +147,7 @@ function Footer() {
|
||||
</a>
|
||||
<a
|
||||
aria-label="Twitter Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://twitter.com/openbb_finance"
|
||||
@@ -162,7 +156,7 @@ function Footer() {
|
||||
</a>
|
||||
<a
|
||||
aria-label="Tiktok Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://www.tiktok.com/@openbb"
|
||||
@@ -171,7 +165,7 @@ function Footer() {
|
||||
</a>
|
||||
<a
|
||||
aria-label="Reddit Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://www.reddit.com/r/openbb/"
|
||||
@@ -180,7 +174,7 @@ function Footer() {
|
||||
</a>
|
||||
<a
|
||||
aria-label="Discord Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href="https://discord.gg/xPHTuHCmuV"
|
||||
@@ -189,7 +183,7 @@ function Footer() {
|
||||
</a>
|
||||
<a
|
||||
aria-label="Youtube Link"
|
||||
className="_btn !h-8 !w-8 p-0"
|
||||
className="h-8 w-8 dark:hover:!text-white hover:text-grey-700"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
href="https://www.youtube.com/channel/UCaeFEx-W16IuxRsHlM1ywBQ"
|
||||
|
||||
BIN
website/static/img/sdk_bg_light.png
vendored
Normal file
BIN
website/static/img/sdk_bg_light.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 916 KiB |
BIN
website/static/img/terminal_bg_light.png
vendored
Normal file
BIN
website/static/img/terminal_bg_light.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Reference in New Issue
Block a user