From bf80ced99c90e76ad63fb188d19cc42d6fe22280 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Thu, 23 Mar 2023 20:10:40 -0400 Subject: ship it --- openbb_terminal/terminal_helper.py | 34 +++++++++++++++++----------------- website/docusaurus.config.js | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/openbb_terminal/terminal_helper.py b/openbb_terminal/terminal_helper.py index b12bf34a908..e03845ca9ad 100644 --- a/openbb_terminal/terminal_helper.py +++ b/openbb_terminal/terminal_helper.py @@ -129,27 +129,27 @@ def update_terminal(): def open_openbb_documentation( - path, url="http://localhost/app/terminal", command=None, arg_type="" + path, url="https://my.openbb.dev/app/terminal", command=None, arg_type="" ): """Opens the documentation page based on your current location within the terminal. Make exceptions for menus that are considered 'common' by adjusting the path accordingly.""" if path == "/" and command is None: - path = "/how-to" + path = "/guides" command = "" elif "keys" in path: - path = "/guides?full=1&path=/quickstart/api-keys" + path = "/usage?full=1&path=/guides/api-keys" command = "" elif "settings" in path: - path = "/guides?path=/advanced/customizing-the-terminal" + path = "/usage?path=/guides/customizing-the-terminal" command = "" elif "featflags" in path: - path = "/guides?path=/advanced/customizing-the-terminal" + path = "/usage?path=/guides/customizing-the-terminal" command = "" elif "sources" in path: - path = "/guides?path=/advanced/changing-sources" + path = "/usage?path=/guides/changing-sources" command = "" elif "params" in path: - path = "/guides?path=/intros/portfolio/po" + path = "/usage?path=/intros/portfolio/po" command = "" else: if arg_type == "command": # user passed a command name @@ -157,32 +157,32 @@ def open_openbb_documentation( elif arg_type == "menu": # user passed a menu name if command in ["ta", "ba", "qa"]: menu = path.split("/")[-2] - path = f"/guides?path=/intros/common/{menu}" + path = f"/usage?path=/intros/common/{menu}" elif command == "forecast": command = "" - path = "/guides?path=/intros/forecast" + path = "/usage?path=/intros/forecast" else: - path = f"/guides?path=/intros/{path}" + path = f"/usage?path=/intros/{path}" else: # user didn't pass argument and is in a menu menu = path.split("/")[-2] path = ( - f"/guides?path=/intros/common/{menu}" + f"/usage?path=/intros/common/{menu}" if menu in ["ta", "ba", "qa"] - else f"/guides?path=/intros/{path}" + else f"/usage?path=/intros/{path}" ) if command: if command == "keys": - path = "/guides?full=1&path=/quickstart/api-keys" + path = "/usage?full=1&path=/guides/api-keys" command = "" elif "settings" in path or "featflags" in path: - path = "/guides?path=/advanced/customizing-the-terminal" + path = "/usage?path=/guides/customizing-the-terminal" command = "" elif "sources" in path: - path = "/guides?path=/advanced/changing-sources" + path = "/usage?path=/guides/changing-sources" command = "" elif command in ["record", "stop", "exe"]: - path = "/guides?path=/advanced/scripts-and-routines" + path = "/usage?path=/guides/scripts-and-routines" command = "" elif command in [ "intro", @@ -193,7 +193,7 @@ def open_openbb_documentation( "wiki", "news", ]: - path = "" + path = "/guides" command = "" elif command in ["ta", "ba", "qa"]: path = f"/guides?path=/intros/common/{command}" diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 18fef89ceed..1be81d021ce 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -34,8 +34,8 @@ const config = { { redirects: [ { - from: "/terminal/guides/intros/forecasting", - to: "/terminal/guides/intros/forecast", + from: "/terminal/usage/intros/forecasting", + to: "/terminal/usage/intros/forecast", }, ], }, -- cgit v1.2.3