mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
docs: docusaurus setup
This commit is contained in:
parent
610526d6d7
commit
3119c20076
4 changed files with 22368 additions and 0 deletions
230
docs/docusaurus.config.ts
Normal file
230
docs/docusaurus.config.ts
Normal file
|
@ -0,0 +1,230 @@
|
|||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
import type * as Preset from "@docusaurus/preset-classic";
|
||||
import type { Config } from "@docusaurus/types";
|
||||
import type * as Plugin from "@docusaurus/types/src/plugin";
|
||||
import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
|
||||
|
||||
const config: Config = {
|
||||
title: 'Llama Stack',
|
||||
tagline: 'The open-source framework for building generative AI applications',
|
||||
url: 'https://reluctantfuturist.github.io',
|
||||
baseUrl: '/llama-stack/',
|
||||
onBrokenLinks: "warn",
|
||||
onBrokenMarkdownLinks: "warn",
|
||||
favicon: "img/favicon.ico",
|
||||
|
||||
// GitHub pages deployment config.
|
||||
organizationName: 'reluctantfuturist',
|
||||
projectName: 'llama-stack',
|
||||
trailingSlash: false,
|
||||
|
||||
presets: [
|
||||
[
|
||||
"classic",
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: require.resolve("./sidebars.ts"),
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl: 'https://github.com/meta-llama/llama-stack/tree/main/docs/',
|
||||
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
|
||||
},
|
||||
blog: false,
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
},
|
||||
} satisfies Preset.Options,
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
image: 'img/llama-stack.png',
|
||||
navbar: {
|
||||
title: 'Llama Stack',
|
||||
logo: {
|
||||
alt: 'Llama Stack Logo',
|
||||
src: 'img/llama-stack-logo.png',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'apiSidebar',
|
||||
position: 'left',
|
||||
label: 'API Reference',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/llamastack/llama-stack',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Docs',
|
||||
items: [
|
||||
{
|
||||
label: 'Getting Started',
|
||||
to: '/docs/getting_started/quickstart',
|
||||
},
|
||||
{
|
||||
label: 'Concepts',
|
||||
to: '/docs/concepts',
|
||||
},
|
||||
{
|
||||
label: 'API Reference',
|
||||
to: '/docs/api/llama-stack-specification',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/llama-stack',
|
||||
},
|
||||
{
|
||||
label: 'GitHub Discussions',
|
||||
href: 'https://github.com/llamastack/llama-stack/discussions',
|
||||
},
|
||||
{
|
||||
label: 'Issues',
|
||||
href: 'https://github.com/llamastack/llama-stack/issues',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/llamastack/llama-stack',
|
||||
},
|
||||
{
|
||||
label: 'PyPI',
|
||||
href: 'https://pypi.org/project/llama-stack/',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Meta Platforms, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
additionalLanguages: [
|
||||
'ruby',
|
||||
'csharp',
|
||||
'php',
|
||||
'java',
|
||||
'powershell',
|
||||
'json',
|
||||
'bash',
|
||||
'python',
|
||||
'yaml',
|
||||
],
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
hideable: true,
|
||||
},
|
||||
},
|
||||
// Language tabs for API documentation
|
||||
languageTabs: [
|
||||
{
|
||||
highlight: "python",
|
||||
language: "python",
|
||||
logoClass: "python",
|
||||
},
|
||||
{
|
||||
highlight: "bash",
|
||||
language: "curl",
|
||||
logoClass: "curl",
|
||||
},
|
||||
{
|
||||
highlight: "javascript",
|
||||
language: "nodejs",
|
||||
logoClass: "nodejs",
|
||||
},
|
||||
{
|
||||
highlight: "java",
|
||||
language: "java",
|
||||
logoClass: "java",
|
||||
},
|
||||
],
|
||||
} satisfies Preset.ThemeConfig,
|
||||
|
||||
plugins: [
|
||||
[
|
||||
"docusaurus-plugin-openapi-docs",
|
||||
{
|
||||
id: "openapi",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
llamastack: {
|
||||
specPath: "static/llama-stack-spec.yaml",
|
||||
outputDir: "docs/api",
|
||||
downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/llama-stack-spec.yaml",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
} satisfies Plugin.PluginOptions,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themes: [
|
||||
"docusaurus-theme-openapi-docs",
|
||||
[
|
||||
require.resolve("@easyops-cn/docusaurus-search-local"),
|
||||
{
|
||||
// Optimization for production
|
||||
hashed: true,
|
||||
|
||||
// Language settings
|
||||
language: ["en"],
|
||||
|
||||
// Content indexing settings
|
||||
indexDocs: true,
|
||||
indexBlog: false, // No blog in Llama Stack
|
||||
indexPages: true,
|
||||
|
||||
// Route configuration
|
||||
docsRouteBasePath: '/docs',
|
||||
|
||||
// Search behavior optimization for technical docs
|
||||
searchResultLimits: 8,
|
||||
searchResultContextMaxLength: 50,
|
||||
explicitSearchResultPath: true,
|
||||
|
||||
// User experience enhancements
|
||||
searchBarShortcut: true,
|
||||
searchBarShortcutHint: true,
|
||||
searchBarPosition: "right",
|
||||
|
||||
// Performance optimizations
|
||||
ignoreFiles: [
|
||||
"node_modules/**/*",
|
||||
],
|
||||
|
||||
// Exclude OpenAPI generated docs from search to avoid duplicates
|
||||
searchContextByPaths: [
|
||||
"docs",
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
22087
docs/package-lock.json
generated
Normal file
22087
docs/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
44
docs/package.json
Normal file
44
docs/package.json
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "docusaurus-template-openapi-docs",
|
||||
"version": "4.3.7",
|
||||
"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",
|
||||
"gen-api-docs": "docusaurus gen-api-docs",
|
||||
"clean-api-docs": "docusaurus clean-api-docs",
|
||||
"gen-api-docs:version": "docusaurus gen-api-docs:version",
|
||||
"clean-api-docs:version": "docusaurus clean-api-docs:version"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.8.1",
|
||||
"@docusaurus/preset-classic": "3.8.1",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.52.1",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"docusaurus-plugin-openapi-docs": "4.3.7",
|
||||
"docusaurus-theme-openapi-docs": "4.3.7",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
7
docs/tsconfig.json
Normal file
7
docs/tsconfig.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"extends": "@docusaurus/tsconfig",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [".docusaurus", "build"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue