Skip to content

Repository files navigation

RW Backstage Plugins

Backstage plugins for embedding RW documentation sites.

PluginPackageDescription
Frontend@rwdocs/backstage-plugin-rwRenders RW documentation in the Backstage UI
Backend@rwdocs/backstage-plugin-rw-backendServes documentation pages via the Backstage backend
Search@rwdocs/backstage-plugin-search-backend-module-rwIndexes RW documentation for Backstage search
Common@rwdocs/backstage-plugin-rw-commonShared utilities used by the other plugins

Installation

# Frontend
yarn --cwd packages/app add @rwdocs/backstage-plugin-rw
# Backend
yarn --cwd packages/backend add @rwdocs/backstage-plugin-rw-backend
# Search (optional)
yarn --cwd packages/backend add @rwdocs/backstage-plugin-search-backend-module-rw

Backend Setup

Add the plugin to your backend in packages/backend/src/index.ts:

backend.add(import('@rwdocs/backstage-plugin-rw-backend'));

To enable search indexing, also add the search collator module:

backend.add(import('@rwdocs/backstage-plugin-search-backend-module-rw'));

Configuration

Add to your app-config.yaml:

# Local filesystem (development)rw:
projectDir: /path/to/your/docs# S3 storage (production)rw:
s3:
bucket: my-docs-bucketentity: my-componentregion: us-east-1
KeyRequiredDescription
rw.projectDirOne of projectDir or s3Local directory containing markdown files
rw.linkPrefixNoURL prefix for generated links (e.g. /rw-docs)
rw.s3.bucketYes (if using S3)S3 bucket name
rw.s3.entityYes (if using S3)Entity identifier (prefix) within the bucket
rw.s3.regionNoAWS region
rw.s3.endpointNoCustom S3 endpoint URL
rw.s3.bucketRootPathNoRoot path within the bucket

Search Configuration

The search collator runs on a schedule and indexes all entities annotated with rwdocs.org/ref. You can customize the schedule in app-config.yaml:

search:
collators:
rw:
schedule:
frequency: { minutes: 10 }timeout: { minutes: 15 }initialDelay: { seconds: 3 }

These are the default values — no configuration is needed unless you want to change them.

Frontend Setup

The frontend plugin registers automatically via the new Backstage frontend system. It provides:

  • A standalone page at /docs
  • An entity content tab ("Documentation") on catalog entity pages

No additional frontend configuration is required.

Development

yarn install
yarn workspace @rwdocs/backstage-plugin-rw run build
yarn workspace @rwdocs/backstage-plugin-rw-backend run build

Run the dev harness (frontend + backend) with yarn dev.

The backend persists its SQLite database (catalog, search index, …) under a .data/ directory at the repo root, so state survives restarts instead of being rebuilt from scratch each time. The directory is git-ignored. Delete it (rm -rf .data) for a clean database.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages