Merge pull request #49 from langflow-ai/docs-add-docusaurus
docs: add docusaurus scaffold and packages
This commit is contained in:
commit
10d4f67914
19 changed files with 27283 additions and 1 deletions
266
.github/workflows/deploy-docs-draft.yml
vendored
Normal file
266
.github/workflows/deploy-docs-draft.yml
vendored
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
name: Pull Request Docs Draft
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/deploy-docs-draft.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: "! github.event.pull_request.head.repo.fork"
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: yarn
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
|
||||
- name: Validate Branch Names
|
||||
run: |
|
||||
# Check if branch names contain invalid characters. Only alphanumeric, _, -, ., and / are allowed.
|
||||
validate_branch_name() {
|
||||
local branch_name="$1"
|
||||
if [[ ! "$branch_name" =~ ^[a-zA-Z0-9/_\.-]+$ ]]; then
|
||||
echo "Error: Branch name contains invalid characters. Only alphanumeric, _, -, ., and / are allowed."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
validate_branch_name "${{ github.event.pull_request.head.ref }}"
|
||||
|
||||
- name: Extract Branch Names
|
||||
id: extract_branch
|
||||
run: |
|
||||
# Extract and transform branch names
|
||||
extract_branch() {
|
||||
local input_branch="$1"
|
||||
# Check if input_branch starts with "refs/heads/"
|
||||
if [[ "$input_branch" == refs/heads/* ]]; then
|
||||
# Remove "refs/heads/" prefix safely using parameter expansion
|
||||
branch_name="${input_branch#refs/heads/}"
|
||||
echo "$branch_name"
|
||||
else
|
||||
echo "$input_branch"
|
||||
fi
|
||||
}
|
||||
|
||||
# Transform branch names in form of `refs/heads/main` to `main`
|
||||
draft_branch=$(extract_branch "${{ github.event.pull_request.head.ref }}")
|
||||
|
||||
# Replace / with - in the draft branch name to use as a directory name
|
||||
draft_directory=$(echo "$draft_branch" | tr / -)
|
||||
|
||||
# Safe echo to $GITHUB_OUTPUT
|
||||
{
|
||||
echo "draft_branch=$draft_branch"
|
||||
echo "draft_directory=$draft_directory"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set Draft URL
|
||||
id: draft_url
|
||||
if: success()
|
||||
run: |
|
||||
echo "url=${{ vars.DOCS_DRAFT_BASE_URL }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/index.html" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd docs && yarn install
|
||||
|
||||
- name: Build website
|
||||
if: success()
|
||||
run: |
|
||||
set -o pipefail
|
||||
cd docs
|
||||
yarn build |& tee $GITHUB_WORKSPACE/build.log
|
||||
env:
|
||||
BASE_URL: /langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}
|
||||
FORCE_COLOR: 0 # Disable color output
|
||||
# SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_DRAFT_SEGMENT_PUBLIC_WRITE_KEY }}
|
||||
|
||||
- name: Check Build Result
|
||||
id: buildLogFail
|
||||
if: failure()
|
||||
run: |
|
||||
MULTILINE_LOG=$(cat $GITHUB_WORKSPACE/build.log)
|
||||
echo "BUILD_FAILURE<<EOF" >> $GITHUB_ENV
|
||||
echo $MULTILINE_LOG >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
- name: Hide Previous Build Comments
|
||||
if: ${{ github.event.pull_request.number && (success() || failure()) }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
# Get all comments on the PR that match our build comments
|
||||
comments=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
|
||||
--jq '.[] | select(.body | test("Build failure! :x:|Build successful! :white_check_mark:")) | .node_id')
|
||||
|
||||
# Minimize each matching comment using GraphQL API
|
||||
if [[ -n "$comments" ]]; then
|
||||
echo "Found previous build comments to hide"
|
||||
while IFS= read -r comment_id; do
|
||||
if [[ -n "$comment_id" ]]; then
|
||||
echo "Minimizing comment: $comment_id"
|
||||
gh api graphql \
|
||||
--field id="$comment_id" \
|
||||
--field classifier="OUTDATED" \
|
||||
--raw-field query='
|
||||
mutation($id: ID!, $classifier: ReportedContentClassifiers!) {
|
||||
minimizeComment(input: { subjectId: $id, classifier: $classifier }) {
|
||||
minimizedComment {
|
||||
isMinimized
|
||||
}
|
||||
}
|
||||
}' || echo "Failed to minimize comment $comment_id, continuing..."
|
||||
echo
|
||||
fi
|
||||
done <<< "$comments"
|
||||
else
|
||||
echo "No previous build comments found to hide"
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Assemble Build Success Comment
|
||||
if: success()
|
||||
run: |
|
||||
build_success_comment="Build successful! :white_check_mark:"
|
||||
build_success_comment+="\nDeploying docs draft."
|
||||
|
||||
echo "BUILD_SUCCESS_COMMENT<<EOF" >> $GITHUB_ENV
|
||||
echo -e "$build_success_comment" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
- name: Create Build Success Comment
|
||||
if: success()
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: "${{ env.BUILD_SUCCESS_COMMENT }}"
|
||||
reactions: rocket
|
||||
|
||||
- name: Create Build Failure Comment
|
||||
if: failure()
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
Build failure! :x:
|
||||
> ${{ env.BUILD_FAILURE }}
|
||||
reactions: confused
|
||||
|
||||
- name: Find Comment
|
||||
id: fc
|
||||
if: success()
|
||||
uses: peter-evans/find-comment@v3
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body-includes: Build successful!
|
||||
direction: last
|
||||
|
||||
- name: Configure AWS CLI
|
||||
if: success()
|
||||
run: |
|
||||
aws configure set aws_access_key_id ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
|
||||
aws configure set aws_secret_access_key ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
|
||||
aws configure set region us-west-2
|
||||
|
||||
- name: Check for New Assets
|
||||
run: |
|
||||
set -o pipefail
|
||||
echo "Checking for new assets." |& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
echo "aws s3 sync docs/build/assets/ s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/assets/ --size-only --dryrun --no-progress" | tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
aws s3 sync docs/build/assets/ "s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/assets/" --size-only --dryrun --no-progress | tee $GITHUB_WORKSPACE/assets.log
|
||||
|
||||
- name: Determine Standard or Full Publish
|
||||
id: check_full_publish
|
||||
run: |
|
||||
# Determine if a full publish is required because of new assets.
|
||||
if grep -qE '(upload:|delete:)' "$GITHUB_WORKSPACE/assets.log"; then
|
||||
echo "New assets. Perform full publish: true" | tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
echo "perform_full_publish=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "No new assets. Perform full publish: false" | tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
echo "perform_full_publish=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Deploy to S3
|
||||
if: success()
|
||||
run: |
|
||||
set -o pipefail
|
||||
cd docs
|
||||
mkdir langflow-drafts
|
||||
mv build langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}
|
||||
cd langflow-drafts
|
||||
|
||||
# Records the repository that originally triggered the build so we can post back
|
||||
# comments upon clean up of a stale draft if it still has an open pull request.
|
||||
echo "${{ github.event.repository.full_name }}" > ${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository
|
||||
|
||||
s3_params=(
|
||||
# Hide upload progress for a cleaner sync log
|
||||
--no-progress
|
||||
--delete
|
||||
--exclude "*"
|
||||
--include "${{ steps.extract_branch.outputs.draft_directory }}/*"
|
||||
)
|
||||
|
||||
if [[ "${{ steps.check_full_publish.outputs.perform_full_publish }}" == "false" ]]; then
|
||||
s3_params+=(--size-only)
|
||||
fi
|
||||
|
||||
echo "Deploying draft to S3." |& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
echo "aws s3 sync . s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts ${s3_params[@]}" |& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
aws s3 sync . "s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts" "${s3_params[@]}" |& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
|
||||
# Update .github_source_repository file metadata to mark last modified time of the draft.
|
||||
# This will allow us to later determine if a draft is stale and needs to be cleaned up.
|
||||
echo "Marking last modified time of the draft." |& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
echo "aws s3 cp --metadata '{\"touched\": \"now\"}' \
|
||||
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository \
|
||||
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository" \
|
||||
|& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
|
||||
aws s3 cp --metadata '{ "touched": "now" }' \
|
||||
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository \
|
||||
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository \
|
||||
|& tee -a $GITHUB_WORKSPACE/deploy.log
|
||||
|
||||
- name: Invalidate CloudFront Cache
|
||||
if: success()
|
||||
run: |
|
||||
invalidation_batch="{ \"Paths\": { \"Quantity\": 1, \"Items\": [\"/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/*\"] }, \"CallerReference\": \"langflow-docs-draft-files-$(date +%s)\" }"
|
||||
|
||||
echo $invalidation_batch | jq . |& tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
echo "Creating invalidation." |& tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
invalidation_id=$(aws cloudfront create-invalidation --distribution-id "${{ vars.DOCS_DRAFT_CLOUD_FRONT_DISTRIBUTION_ID }}" --invalidation-batch "$invalidation_batch" --query 'Invalidation.Id' --output text |& tee -a "$GITHUB_WORKSPACE/deploy.log")
|
||||
|
||||
echo "Awaiting invalidation." |& tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
aws cloudfront wait invalidation-completed --distribution-id "${{ vars.DOCS_DRAFT_CLOUD_FRONT_DISTRIBUTION_ID }}" --id "$invalidation_id" |& tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
echo "Invalidation complete." |& tee -a "$GITHUB_WORKSPACE/deploy.log"
|
||||
|
||||
- name: Update Comment
|
||||
if: ${{ steps.fc.outputs.comment-id != '' }}
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
body: |
|
||||
Deploy successful! [View draft](${{ steps.draft_url.outputs.url }})
|
||||
reactions: hooray
|
||||
|
||||
- name: Upload Deploy Log
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: deploy.log
|
||||
path: ${{ github.workspace }}/deploy.log
|
||||
43
.github/workflows/deploy-gh-pages.yml
vendored
Normal file
43
.github/workflows/deploy-gh-pages.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/**'
|
||||
# Review gh actions docs if you want to further define triggers, paths, etc
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: yarn
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd docs && yarn install
|
||||
- name: Build website
|
||||
run: cd docs && yarn build
|
||||
# env:
|
||||
# SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_PROD_SEGMENT_PUBLIC_WRITE_KEY }}
|
||||
|
||||
# Popular action to deploy to GitHub Pages:
|
||||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Build output to publish to the `gh-pages` branch:
|
||||
publish_dir: ./docs/build
|
||||
# The following lines assign commit authorship to the official
|
||||
# GH-Actions bot for deploys to `gh-pages` branch:
|
||||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
|
||||
# The GH actions bot is used by default if you didn't specify the two fields.
|
||||
# You can swap them out with your own user credentials.
|
||||
25
docs/.gitignore
vendored
Normal file
25
docs/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Override parent .gitignore to allow package management files
|
||||
!package.json
|
||||
!package-lock.json
|
||||
!yarn.lock
|
||||
41
docs/README.md
Normal file
41
docs/README.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Website
|
||||
|
||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
yarn
|
||||
```
|
||||
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
## Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```bash
|
||||
USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```bash
|
||||
GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
title: Configuration
|
||||
slug: /configure/configuration
|
||||
---
|
||||
|
||||
# Configuration
|
||||
|
||||
OpenRAG supports multiple configuration methods with the following priority:
|
||||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
title: Docker Deployment
|
||||
slug: /get-started/docker
|
||||
---
|
||||
|
||||
# Docker Deployment
|
||||
|
||||
## Standard Deployment
|
||||
48
docs/docs/get-started/intro.mdx
Normal file
48
docs/docs/get-started/intro.mdx
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
title: What is OpenRAG?
|
||||
slug: /
|
||||
---
|
||||
|
||||
# OpenRAG Introduction
|
||||
|
||||
Let's discover **Docusaurus in less than 5 minutes**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Get started by **creating a new site**.
|
||||
|
||||
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
|
||||
|
||||
### What you'll need
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Generate a new site
|
||||
|
||||
Generate a new Docusaurus site using the **classic template**.
|
||||
|
||||
The classic template will automatically be added to your project after you run the command:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic
|
||||
```
|
||||
|
||||
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
|
||||
|
||||
The command also installs all necessary dependencies you need to run Docusaurus.
|
||||
|
||||
## Start your site
|
||||
|
||||
Run the development server:
|
||||
|
||||
```bash
|
||||
cd my-website
|
||||
npm run start
|
||||
```
|
||||
|
||||
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
|
||||
|
||||
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
|
||||
|
||||
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
|
|
@ -1,8 +1,13 @@
|
|||
---
|
||||
title: Terminal Interface (TUI)
|
||||
slug: /get-started/tui
|
||||
---
|
||||
|
||||
# OpenRAG TUI Guide
|
||||
|
||||
The OpenRAG Terminal User Interface (TUI) provides a streamlined way to set up, configure, and monitor your OpenRAG deployment directly from the terminal.
|
||||
|
||||

|
||||

|
||||
|
||||
## Launch
|
||||
|
||||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
title: Troubleshooting
|
||||
slug: /reference/troubleshooting
|
||||
---
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
## Podman on macOS
|
||||
119
docs/docusaurus.config.js
Normal file
119
docs/docusaurus.config.js
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
// @ts-check
|
||||
// `@type` JSDoc annotations allow editor autocompletion and type checking
|
||||
// (when paired with `@ts-check`).
|
||||
// There are various equivalent ways to declare your Docusaurus config.
|
||||
// See: https://docusaurus.io/docs/api/docusaurus-config
|
||||
|
||||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
|
||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'OpenRAG',
|
||||
tagline: 'Open Source RAG Platform',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
|
||||
future: {
|
||||
v4: true, // Improve compatibility with the upcoming Docusaurus v4
|
||||
},
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://langflow-ai.github.io',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: process.env.BASE_URL ? process.env.BASE_URL : '/openrag/',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'langflow-ai', // Usually your GitHub org/user name.
|
||||
projectName: 'openrag', // Usually your repo name.
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internationalization, you can use this field to set
|
||||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||||
// may want to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: './sidebars.js',
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/openrag/openrag/tree/main/docs/',
|
||||
routeBasePath: '/',
|
||||
},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
// Replace with your project's social card
|
||||
image: 'img/docusaurus-social-card.jpg',
|
||||
navbar: {
|
||||
title: 'OpenRAG',
|
||||
logo: {
|
||||
alt: 'OpenRAG Logo',
|
||||
src: 'img/logo.svg',
|
||||
href: '/',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
href: 'https://github.com/openrag/openrag',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Documentation',
|
||||
items: [
|
||||
{
|
||||
label: 'Getting Started',
|
||||
to: '/',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/openrag/openrag',
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/openrag',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} OpenRAG. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
export default config;
|
||||
17565
docs/package-lock.json
generated
Normal file
17565
docs/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
47
docs/package.json
Normal file
47
docs/package.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "openrag-docs",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.8.1",
|
||||
"@docusaurus/preset-classic": "3.8.1",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.8.1",
|
||||
"@docusaurus/tsconfig": "3.8.1",
|
||||
"@docusaurus/types": "3.8.1",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 3 chrome version",
|
||||
"last 3 firefox version",
|
||||
"last 5 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
65
docs/sidebars.js
Normal file
65
docs/sidebars.js
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
// @ts-check
|
||||
|
||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
||||
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
|
||||
@type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
|
||||
*/
|
||||
const sidebars = {
|
||||
tutorialSidebar: [
|
||||
{
|
||||
type: "category",
|
||||
label: "Get Started",
|
||||
items: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "get-started/intro",
|
||||
label: "Introduction"
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "get-started/docker",
|
||||
label: "Docker Deployment"
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "get-started/tui",
|
||||
label: "Terminal Interface (TUI)"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Configuration",
|
||||
items: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "configure/configuration",
|
||||
label: "Environment Variables"
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Reference",
|
||||
items: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "reference/troubleshooting",
|
||||
label: "Troubleshooting"
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default sidebars;
|
||||
30
docs/src/css/custom.css
Normal file
30
docs/src/css/custom.css
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #2e8555;
|
||||
--ifm-color-primary-dark: #29784c;
|
||||
--ifm-color-primary-darker: #277148;
|
||||
--ifm-color-primary-darkest: #205d3b;
|
||||
--ifm-color-primary-light: #33925d;
|
||||
--ifm-color-primary-lighter: #359962;
|
||||
--ifm-color-primary-lightest: #3cad6e;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #25c2a0;
|
||||
--ifm-color-primary-dark: #21af90;
|
||||
--ifm-color-primary-darker: #1fa588;
|
||||
--ifm-color-primary-darkest: #1a8870;
|
||||
--ifm-color-primary-light: #29d5b0;
|
||||
--ifm-color-primary-lighter: #32d8b4;
|
||||
--ifm-color-primary-lightest: #4fddbf;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
0
docs/static/.nojekyll
vendored
Normal file
0
docs/static/.nojekyll
vendored
Normal file
237
docs/static/img/OpenRAG_TUI_2025-09-10T13_04_11_757637.svg
vendored
Normal file
237
docs/static/img/OpenRAG_TUI_2025-09-10T13_04_11_757637.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 35 KiB |
BIN
docs/static/img/favicon.ico
vendored
Normal file
BIN
docs/static/img/favicon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
1
docs/static/img/logo.svg
vendored
Normal file
1
docs/static/img/logo.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="22" viewBox="0 0 24 22" fill="currentColor" class="h-6 w-6"><path d="M13.0486 0.462158H9.75399C9.44371 0.462158 9.14614 0.586082 8.92674 0.806667L4.03751 5.72232C3.81811 5.9429 3.52054 6.06682 3.21026 6.06682H1.16992C0.511975 6.06682 -0.0165756 6.61212 0.000397655 7.2734L0.0515933 9.26798C0.0679586 9.90556 0.586745 10.4139 1.22111 10.4139H3.59097C3.90124 10.4139 4.19881 10.2899 4.41821 10.0694L9.34823 5.11269C9.56763 4.89211 9.8652 4.76818 10.1755 4.76818H13.0486C13.6947 4.76818 14.2185 4.24157 14.2185 3.59195V1.63839C14.2185 0.988773 13.6947 0.462158 13.0486 0.462158Z"></path><path d="M19.5355 11.5862H22.8301C23.4762 11.5862 24 12.1128 24 12.7624V14.716C24 15.3656 23.4762 15.8922 22.8301 15.8922H19.957C19.6467 15.8922 19.3491 16.0161 19.1297 16.2367L14.1997 21.1934C13.9803 21.414 13.6827 21.5379 13.3725 21.5379H11.0026C10.3682 21.5379 9.84945 21.0296 9.83309 20.392L9.78189 18.3974C9.76492 17.7361 10.2935 17.1908 10.9514 17.1908H12.9918C13.302 17.1908 13.5996 17.0669 13.819 16.8463L18.7082 11.9307C18.9276 11.7101 19.2252 11.5862 19.5355 11.5862Z"></path><path d="M19.5355 2.9796L22.8301 2.9796C23.4762 2.9796 24 3.50622 24 4.15583V6.1094C24 6.75901 23.4762 7.28563 22.8301 7.28563H19.957C19.6467 7.28563 19.3491 7.40955 19.1297 7.63014L14.1997 12.5868C13.9803 12.8074 13.6827 12.9313 13.3725 12.9313H10.493C10.1913 12.9313 9.90126 13.0485 9.68346 13.2583L4.14867 18.5917C3.93087 18.8016 3.64085 18.9187 3.33917 18.9187H1.32174C0.675616 18.9187 0.151832 18.3921 0.151832 17.7425V15.7343C0.151832 15.0846 0.675616 14.558 1.32174 14.558H3.32468C3.63496 14.558 3.93253 14.4341 4.15193 14.2135L9.40827 8.92878C9.62767 8.70819 9.92524 8.58427 10.2355 8.58427H12.9918C13.302 8.58427 13.5996 8.46034 13.819 8.23976L18.7082 3.32411C18.9276 3.10353 19.2252 2.9796 19.5355 2.9796Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
8775
docs/yarn.lock
Normal file
8775
docs/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue