INNER CODE UNIT · JavaScript
codeBlockTheme
graphiti-api/graphiti · website/docusaurus.config.js:4
const codeBlockTheme = (theme, backgroundColor) => ({
...theme,
plain: {...theme.plain, backgroundColor},
});
// Docusaurus prepends baseUrl to navbar and Link hrefs, but not to raw HTML
// like announcementBar content, so that markup has to build its own absolute
// paths. Always has a trailing slash.
const baseUrl = process.env.DOCS_BASE_URL || '/';
// The theme's strikethrough and underline on diff lines are inline styles, so
// CSS cannot undo them. Colour and the +/- signs already carry it.
const withoutDiffDecoration = (theme) => ({
...theme,
styles: theme.styles.map(({types, style}) =>
types.some((type) => type === 'inserted' || type === 'deleted')
? {types, style: {...style, textDecorationLine: undefined}}
: {types, style}