Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Agent-readable documentation

Production builds publish a curated AI-agent entry point at `/llms.txt`, exhaustive indexes at `/docs/llms.txt` and `/blog/llms.txt`, an optional single-file bundle at `/llms-full.txt`, and a clean Markdown representation beside each current documentation and blog URL (for example, `/docs/fga.md`). The HTML pages advertise these resources with `rel="alternate"` and `rel="describedby"` links.

`npm run build` validates that the generated indexes, Markdown pages, FAQ content, and discovery links stay in sync.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following will provide a step-by-step guide on how to get started with <Prod
description="This section is useful if you understand the basic concepts of {ProductName}, and want to learn how to get started."
/>

# Content
# Getting Started

<CardGrid
middle={[
Expand Down
2 changes: 1 addition & 1 deletion docs/content/interacting/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This section helps you integrate <ProductName format={ProductNameFormat.ShortFor
description="This section is useful if you have defined an authorization model and want to understand how to write authorization data to {ProductName} to represent the state of your system."
/>

# Content
# Interacting with the API

<CardGrid
bottom={[
Expand Down
2 changes: 1 addition & 1 deletion docs/content/modeling/building-blocks/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This section has guides that on the building blocks of authorization model.
]}
/>

# Content
# Authorization Model Building Blocks

<CardGrid
middle={[
Expand Down
4 changes: 2 additions & 2 deletions docs/content/modeling/migrating/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This section has guides that focus on migrating models and relations.
]}
/>

# Content
# Model Migrations

<CardGrid
middle={[
Expand All @@ -34,4 +34,4 @@ This section has guides that focus on migrating models and relations.
to: 'migrating/migrating-models',
},
]}
/>
/>
2 changes: 1 addition & 1 deletion docs/content/modeling/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can also check out the [Modeling Guide](https://www.youtube.com/watch?v=5Lwy
]}
/>

# Content
# Modeling Guides

<CardGrid
top={[
Expand Down
68 changes: 66 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@

import { themes } from "prism-react-renderer";
import * as path from "path";
import cleanAgentMarkdown from './scripts/clean-agent-markdown.mjs';

const isDev = process.env.NODE_ENV === 'development';

const baseUrl = process.env.BASE_URL ?? '/';
const configuredBasePath = (process.env.BASE_URL ?? '/').replace(/^\/+|\/+$/g, '');
const baseUrl = configuredBasePath ? `/${configuredBasePath}/` : '/';
const basePath = baseUrl === '/' ? '' : baseUrl.slice(0, -1);
/** @param {string} route */
const agentRoute = (route) => `${basePath}${route}`;

// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'OpenFGA',
tagline: 'Relationship-based access control made fast, scalable, and easy to use.',
url: 'https://openfga.dev',
baseUrl: baseUrl,
baseUrl,
trailingSlash: false,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand Down Expand Up @@ -144,6 +149,65 @@ import dev.openfga.sdk.api.configuration.ClientConfiguration;`,
],
plugins: [
require.resolve('./webpack-overrides.docusaurus-plugin'),
[
'@signalwire/docusaurus-plugin-llms-txt',
{
siteTitle: 'OpenFGA Documentation',
siteDescription:
'OpenFGA is a CNCF open source authorization system for fine-grained, relationship-based access control.',
depth: 1,
enableDescriptions: true,
includeOrder: [agentRoute('/docs/**'), agentRoute('/blog/**')],
optionalLinks: [
{
title: 'OpenFGA source repository',
url: 'https://github.com/openfga/openfga',
description: 'Server source, releases, deployment guidance, and issue tracker.',
},
{
title: 'OpenFGA SDKs',
url: 'https://github.com/orgs/openfga/repositories?q=topic%3Asdk',
description: 'Official client SDK repositories for supported programming languages.',
},
],
content: {
enableMarkdownFiles: true,
enableLlmsFullTxt: true,
relativePaths: false,
includeBlog: true,
includePages: true,
includeDocs: true,
includeVersionedDocs: false,
includeGeneratedIndex: false,
excludeRoutes: [
agentRoute('/404.html'),
agentRoute('/api/**'),
agentRoute('/blog'),
agentRoute('/blog/archive'),
agentRoute('/blog/authors/**'),
agentRoute('/blog/fine-grained-news-*'),
agentRoute('/blog/page/**'),
agentRoute('/blog/tags/**'),
agentRoute('/search'),
],
routeRules: [
{ route: agentRoute('/docs'), categoryName: 'Documentation' },
{ route: agentRoute('/blog'), categoryName: 'Blog' },
],
remarkStringify: {
bullet: '-',
emphasis: '_',
fences: true,
listItemIndent: 'one',
},
remarkGfm: true,
rehypeProcessTables: true,
beforeDefaultRehypePlugins: [cleanAgentMarkdown],
},
onRouteError: 'throw',
logLevel: 1,
},
],
[
'@docusaurus/plugin-client-redirects',
/** @type {import('@docusaurus/plugin-client-redirects').Options} */
Expand Down
Loading
Loading