-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor documentation architecture (#1264)
* Refactor documentation architecture Split into several `tab` and sections * Fix Fern's docs.yml after PR review Thank you Danny! Co-authored-by: dannysheridan <[email protected]> * Re-add quickstart in the overview tab It went missing after a refactoring of the doc architecture * Documentation writing * Adapt Makefile to fern documentation * Do not create overlapping page names in fern documentation This is causing 500. Thank you to @dsinghvi for the troubleshooting and the help! * Add a readme to help to understand how fern documentation work and how to add new pages * Rework the welcome view Redirects directly users to installation guide with links for people that are not familiar with documentation browsing. * Simplify the quickstart guide * PR feedback on installation guide A ton of refactoring can still be made there * PR feedback on ingestion * PR feedback on ingestion splitting * Rename section on LLM * Fix missing word in list of LLMs --------- Co-authored-by: dannysheridan <[email protected]>
- Loading branch information
1 parent
57a829a
commit 36f69ee
Showing
18 changed files
with
398 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Documentation of privateGPT | ||
|
||
The documentation of this project is being rendered thanks to [fern](https://github.com/fern-api/fern). | ||
|
||
Fern is basically transforming your `.md` and `.mdx` files into a static website: your documentation. | ||
|
||
The configuration of your documentation is done in the `./docs.yml` file. | ||
There, you can configure the navbar, tabs, sections and pages being rendered. | ||
|
||
The documentation of fern (and the syntax of its configuration `docs.yml`) is | ||
available there [docs.buildwithfern.com](https://docs.buildwithfern.com/). | ||
|
||
## How to run fern | ||
|
||
**You cannot render your documentation locally without fern credentials.** | ||
|
||
To see how your documentation looks like, you **have to** use the CICD of this | ||
repository (by opening a PR, CICD job will be executed, and a preview of | ||
your PR's documentation will be deployed in vercel automatically, through fern). | ||
|
||
The only thing you can do locally, is to run `fern check`, which check the syntax of | ||
your `docs.yml` file. | ||
|
||
## How to add a new page | ||
Add in the `docs.yml` a new `page`, with the following syntax: | ||
|
||
```yml | ||
navigation: | ||
# ... | ||
- tab: my-existing-tab | ||
layout: | ||
# ... | ||
- section: My Existing Section | ||
contents: | ||
# ... | ||
- page: My new page display name | ||
# The path of the page, relative to `fern/` | ||
path: ./docs/pages/my-existing-tab/new-page-content.mdx | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,92 @@ | ||
# Main Fern configuration file | ||
instances: | ||
- url: privategpt.docs.buildwithfern.com | ||
custom-domain: docs.privategpt.dev | ||
|
||
title: PrivateGPT | Docs | ||
|
||
# The tabs definition, in the top left corner | ||
tabs: | ||
overview: | ||
display-name: Overview | ||
icon: "fa-solid fa-home" | ||
installation: | ||
display-name: Installation | ||
icon: "fa-solid fa-download" | ||
manual: | ||
display-name: Manual | ||
icon: "fa-solid fa-book" | ||
recipes: | ||
display-name: Recipes | ||
icon: "fa-solid fa-flask" | ||
api-reference: | ||
display-name: API Reference | ||
icon: "fa-solid fa-file-contract" | ||
|
||
# Definition of tabs contents, will be displayed on the left side of the page, below all tabs | ||
navigation: | ||
- section: Getting started | ||
contents: | ||
- page: Welcome | ||
path: ./docs/pages/welcome.mdx | ||
- page: Quickstart | ||
path: ./docs/pages/quickstart.mdx | ||
- page: Installation | ||
path: ./docs/pages/installation.mdx | ||
- page: LLMs | ||
path: ./docs/pages/llms.mdx | ||
- page: Vector Stores | ||
path: ./docs/pages/vectordb.mdx | ||
- section: Usage | ||
contents: | ||
- page: UI manual | ||
path: ./docs/pages/ui.mdx | ||
- page: Ingestion & Doc mgmt | ||
path: ./docs/pages/ingestion.mdx | ||
- page: SDKs | ||
path: ./docs/pages/sdks.mdx | ||
- api: API Reference | ||
# The default tab | ||
- tab: overview | ||
layout: | ||
- section: Welcome | ||
contents: | ||
- page: Welcome | ||
path: ./docs/pages/overview/welcome.mdx | ||
- page: Quickstart | ||
path: ./docs/pages/overview/quickstart.mdx | ||
# How to install privateGPT, with FAQ and troubleshooting | ||
- tab: installation | ||
layout: | ||
- section: Getting started | ||
contents: | ||
- page: Installation | ||
path: ./docs/pages/installation/installation.mdx | ||
# Manual of privateGPT: how to use it and configure it | ||
- tab: manual | ||
layout: | ||
- section: Document management | ||
contents: | ||
- page: Ingestion | ||
path: ./docs/pages/manual/ingestion.mdx | ||
- page: Deletion | ||
path: ./docs/pages/manual/ingestion-reset.mdx | ||
- section: Storage | ||
contents: | ||
- page: Vector Stores | ||
path: ./docs/pages/manual/vectordb.mdx | ||
- section: Advanced Setup | ||
contents: | ||
- page: LLM Backends | ||
path: ./docs/pages/manual/llms.mdx | ||
- section: User Interface | ||
contents: | ||
- page: User interface (Gradio) Manual | ||
path: ./docs/pages/manual/ui.mdx | ||
# Small code snippet or example of usage to help users | ||
- tab: recipes | ||
layout: | ||
- section: Choice of LLM | ||
contents: | ||
# TODO: add recipes | ||
- page: List of LLMs | ||
path: ./docs/pages/recipes/list-llm.mdx | ||
# More advanced usage of privateGPT, by API | ||
- tab: api-reference | ||
layout: | ||
- section: Overview | ||
contents: | ||
- page : API Reference overview | ||
path: ./docs/pages/api-reference/api-reference.mdx | ||
- page: SDKs | ||
path: ./docs/pages/api-reference/sdks.mdx | ||
- api: API Reference | ||
|
||
navbar-links: | ||
# Definition of the navbar, will be displayed in the top right corner. | ||
# `type:primary` is always displayed at the most right side of the navbar | ||
navbar-links: | ||
- type: secondary | ||
text: Github | ||
url: "https://github.com/imartinez/privateGPT" | ||
- type: secondary | ||
text: Contact us | ||
url: "mailto:[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# API Reference |
4 changes: 3 additions & 1 deletion
4
fern/docs/pages/sdks.mdx → fern/docs/pages/api-reference/sdks.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.