Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

modethirteen/backstage-plugin-techdocs-addon-sourcegraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

5 Commits

Repository files navigation

Backstage TechDocs Addon for Sourcegraph

npm version

A module that extends Sourcegraph capabilities into Backstage TechDocs.

Getting started

This module is a Backstage TechDocs Addon plugin, which requires Backstage v1.2+. The plugin provides a component for embedding Sourcegraph Notebooks. Follow the official documentation for TechDocs Addons to use this addon.

import { SourcegraphNotebook } from 'backstage-plugin-techdocs-addon-sourcegraph';
// Sourcegraph instance domain (Required)
const domain = 'sourcegraph.example.com';
// pre-render callback (Optional)
const callback = ({
 // div wrapper for embedded Notebook
 container: HTMLDivElement,
 // embedded notebook iframe
 iframe: HTMLIFrameElement,
 // notebook id
 id: string,
 // non-embedded notebook url
 url: string
}) => {
 // ...some extra handling or DOM manipulation before attaching the
 // iframe to the container
 container.append(iframe);
});
<TechDocsAddons>
 <SourcegraphNotebook domain={domain} callback={callback} />
</TechDocsAddons>

Further resources

About

Backstage TechDocs Addon for Sourcegraph

Topics

Resources

License

Stars

Watchers

Forks

Contributors

AltStyle によって変換されたページ (->オリジナル) /