docs: added fetching from notion (#2670)

* Added new Docusaurus instance that fetches automatically from Notion

* Add Github workflow to fetch docs from Notion

* Added legacy peer deps to solve dependency problems

* Fix git ignore and added pages
This commit is contained in:
Lucas Oliveira 2024-07-12 17:59:52 -03:00 • committed by GitHub
commit 3aa2513a86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
354 changed files with 20640 additions and 23291 deletions

View file

@ -1,9 +1,12 @@
const lightCodeTheme = require("prism-react-renderer/themes/github");
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const { remarkCodeHike } = require("@code-hike/mdx");
// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Langflow Documentation",
tagline: "Langflow is a GUI for LangChain, designed with react-flow",
favicon: "img/favicon.ico",
@ -22,12 +25,16 @@ module.exports = {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"@docusaurus/preset-classic",
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/", // Serve the docs at the site's root
sidebarPath: undefined, // `undefined` to create a fully autogenerated sidebar.
sidebarCollapsed: false,
beforeDefaultRemarkPlugins: [
[
remarkCodeHike,
@ -38,19 +45,21 @@ module.exports = {
},
],
],
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
path: "docs",
// sidebarPath: 'sidebars.js',
},
gtag: {
trackingID: "G-XHC7G628ZP",
anonymizeIP: true,
},
blog: false,
theme: {
customCss: [
require.resolve("@code-hike/mdx/styles.css"),
require.resolve("./src/css/custom.css"),
require.resolve("./css/custom.css"),
require.resolve("./css/docu-notion-styles.css"),
require.resolve(
"./css/gifplayer.css"
//"./node_modules/react-gif-player/dist/gifplayer.css" // this gave a big red compile warning which is seaming unrelated " Replace Autoprefixer browsers option to Browserslist config..."
),
],
},
}),
@ -72,10 +81,16 @@ module.exports = {
};
},
],
themes: ["mdx-v2"],
markdown: { format: "detect" },
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
sitemap: {
// https://www.sitemaps.org/protocol.html#xmlTagDefinitions
changefreq: "weekly",
priority: 0.5,
ignorePatterns: [],
},
navbar: {
hideOnScroll: true,
title: "Langflow",
@ -88,7 +103,6 @@ module.exports = {
{
position: "right",
href: "https://github.com/langflow-ai/langflow",
position: "right",
className: "header-github-link",
target: "_blank",
rel: null,
@ -96,7 +110,6 @@ module.exports = {
{
position: "right",
href: "https://twitter.com/langflow_ai",
position: "right",
className: "header-twitter-link",
target: "_blank",
rel: null,
@ -104,17 +117,12 @@ module.exports = {
{
position: "right",
href: "https://discord.gg/EqksyE2EX9",
position: "right",
className: "header-discord-link",
target: "_blank",
rel: null,
},
],
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 5,
},
colorMode: {
defaultMode: "light",
/* Allow users to chose light or dark mode. */
@ -122,6 +130,10 @@ module.exports = {
/* Respect user preferences, such as low light mode in the evening */
respectPrefersColorScheme: true,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
zoom: {
selector: ".markdown :not(a) > img:not(.no-zoom)",
background: {
@ -129,9 +141,6 @@ module.exports = {
},
config: {},
},
// prism: {
// theme: require("prism-react-renderer/themes/dracula"),
// },
docs: {
sidebar: {
hideable: true,
@ -139,3 +148,5 @@ module.exports = {
},
}),
};
module.exports = config;