Skip to content

Commit

Permalink
Improve contrast of code blocks in docs (langchain-ai#1815)
Browse files Browse the repository at this point in the history
* Tweak code block colors in docs

* Formatting
  • Loading branch information
jacoblee93 authored Jun 30, 2023
1 parent 89b1d8c commit 9a69650
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const path = require("path");

const examplesPath = path.resolve(__dirname, "..", "examples", "src");

const baseLightCodeBlockTheme = require("prism-react-renderer/themes/vsLight");
const baseDarkCodeBlockTheme = require("prism-react-renderer/themes/vsDark");

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "🦜️🔗 Langchain",
Expand Down Expand Up @@ -130,8 +133,20 @@ const config = {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
prism: {
theme: require("prism-react-renderer/themes/vsLight"),
darkTheme: require("prism-react-renderer/themes/vsDark"),
theme: {
...baseLightCodeBlockTheme,
plain: {
...baseLightCodeBlockTheme.plain,
backgroundColor: "#F5F5F5",
},
},
darkTheme: {
...baseDarkCodeBlockTheme,
plain: {
...baseDarkCodeBlockTheme.plain,
backgroundColor: "#222222",
},
},
},
image: "img/parrot-chainlink-icon.png",
navbar: {
Expand Down

0 comments on commit 9a69650

Please sign in to comment.