1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Alvin Bryan
54444a395c
Fixed OpenAPI URL renaming ()
## Problem

Our API docs are generated from a specfile that is hosted in
https://us.app.unleash-hosted.com/ushosted

By default the API docs UI will show that URL, which we don't want


![image](https://github.com/user-attachments/assets/c125cf6c-8c97-4a56-84a8-3989725d2e95)

## Previously

We ran a find-and-replace after the mdx files were generated with
`replace-in-file`

## Now

The previous solution is no longer possible because the openapi plugin
changed. Basically, before it generated markdown files that looked like
this:

```
# Create API Key

https://unleash-hosted/whatever

bla bla bla
```
Now it generates files that do not contain the URL and look like this:

```
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Configure project access"}
>
</Heading>
```
which themselves get compiled.

## Solution

This PR now downloads the specfile, makes a local copy, then an alters
the server URL in the copy, then uses that local file to generate the
docs.


![image](https://github.com/user-attachments/assets/039644a6-1e72-4145-9c67-9e6203b1673b)


I didn't want to make any changes to the actual spec logic because this
essentially just a plugin quirk

---

[PREVIEW
LINK](https://unleash-docs-git-alvin-fix-openapi-rename-unleash-team.vercel.app/reference/api/unleash/get-addon)
2024-11-14 11:07:23 +00:00
Alvin Bryan
8f18c2b194
Docusaurus 3.6 ()
Upgrading to Docusaurus 3.6 and v4.2 of the OpenAPI plugin (which is
quite a significant update)
2024-11-08 11:30:51 +00:00
Mark Fulton
b6a219dd36
docs/improve website README.md with local docs server installation step ()
Minor addition to set correct local dir context in terminal when setting
up a local docs instance

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-01-22 09:44:31 -05:00
Thomas Heartman
65d95e96df
meta: add note to generate openapi docs before starting local dev ()
This PR adds a small note to generate docs before running the docs
locally.
2023-10-16 07:49:42 -05:00
Thomas Heartman
5799d0c90f
docs: add info on how to troubleshoot and better errors ()
This PR adds some troubleshooting information to the website readme and
also makes it so that we get more readable errors in the build logs when
something goes wrong.
2023-09-21 11:46:39 +02:00
Tymoteusz Czech
573518e48d
Integrations - frontend adjustments ()
## About the changes
  - [x] Create a feature flag
  - [x] Rename page title
  - [x] Rename menu item
  - [x] Update frontend URL (add redirect from old one)


https://linear.app/unleash/issue/1-1263/integrations-frontend-adjustments
2023-08-22 14:40:38 +02:00
Drew Gorton
ebf35790fe
Update docs README.md to include yarn generate ()
Add missing `yarn generate` command to docs
2023-08-17 10:32:57 -05:00
Ivar Conradi Østhus
ffec4f6342 fix: rename websitev2 to website 2021-10-26 11:25:19 +02:00
Ivar Conradi Østhus
2a40edd7e6
fix: move CNAME to static 2021-02-17 20:23:50 +01:00
ivaosthu
868f43a3b2 fix: Also deploy README.md as part of docs 2020-02-20 08:34:21 +01:00
ivaosthu
8a53d8dca2 chore: Fix formatting all the things 2020-02-20 08:34:15 +01:00
ivaosthu
0c2d58b984 chore(documentation): Added Docusaurus with a website
fixes 
2020-02-20 08:34:14 +01:00