datahub/docs-website/docusaurus.config.js

250 lines
6.8 KiB
JavaScript
Raw Normal View History

require("dotenv").config();
const isSaas = process.env.DOCUSAURUS_IS_SAAS === "true";
module.exports = {
title: process.env.DOCUSAURUS_CONFIG_TITLE || "DataHub",
2021-06-24 22:21:21 -07:00
tagline: "A Metadata Platform for the Modern Data Stack",
url: process.env.DOCUSAURUS_CONFIG_URL || "https://datahubproject.io",
baseUrl: process.env.DOCUSAURUS_CONFIG_BASE_URL || "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.ico",
organizationName: "datahub-project", // Usually your GitHub org/user name.
projectName: "datahub", // Usually your repo name.
stylesheets: [
"https://fonts.googleapis.com/css2?family=Manrope:wght@400;600&display=swap",
],
noIndex: isSaas,
customFields: {
isSaas: isSaas,
},
themeConfig: {
...(!isSaas && {
announcementBar: {
id: "announcement",
content: `
<div style="
display: flex;
gap: 2em;
justify-content: center;
align-items: center;
">
<div style="
display: flex;
align-items: center;
gap: 1em;
">
<img src="/img/acryl-logo-white-mark.svg" style="
max-height: 35px;
">
<p style="
margin-bottom: 0;
"><strong>Managed DataHub</strong><span> &nbsp;Acryl Data delivers an easy to consume DataHub platform for the enterprise</span></p></div>
<a href="https://www.acryldata.io/datahub-beta" target="_blank" class="button button--primary">Sign up for Managed DataHub </a>
</div>
`,
backgroundColor: "#070707",
textColor: "#ffffff",
isCloseable: false,
},
}),
navbar: {
2021-10-21 15:49:44 -05:00
title: null,
logo: {
alt: "DataHub Logo",
src: `img/${
isSaas ? "acryl" : "datahub"
}-logo-color-light-horizontal.svg`,
srcDark: `img/${
isSaas ? "acryl" : "datahub"
}-logo-color-dark-horizontal.svg`,
},
items: [
{
to: "docs/",
activeBasePath: "docs",
label: "Docs",
position: "right",
},
{
to: "docs/demo",
label: "Demo",
position: "right",
},
2021-11-17 18:51:56 -06:00
{
href: "https://blog.datahubproject.io/",
label: "Blog",
position: "right",
},
{
href: "https://feature-requests.datahubproject.io/",
label: "Feature Requests",
position: "right",
},
{
2022-01-17 16:23:25 -06:00
href: "https://feature-requests.datahubproject.io/roadmap",
2021-11-17 18:51:56 -06:00
label: "Roadmap",
position: "right",
},
{
href: "https://slack.datahubproject.io",
2021-10-21 15:49:44 -05:00
"aria-label": "Slack",
position: "right",
2021-10-21 15:49:44 -05:00
className: "item__icon item__slack",
},
{
href: "https://github.com/datahub-project/datahub",
2021-10-21 15:49:44 -05:00
"aria-label": "GitHub",
position: "right",
2021-10-21 15:49:44 -05:00
className: "item__icon item__github",
},
2021-11-17 18:51:56 -06:00
2021-10-21 15:49:44 -05:00
{
href: "https://www.youtube.com/channel/UC3qFQC5IiwR5fvWEqi_tJ5w",
"aria-label": "YouTube",
position: "right",
className: "item__icon item__youtube",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Introduction",
to: "docs/",
},
{
label: "Quickstart",
to: "docs/quickstart",
},
{
label: "Features",
to: "docs/features",
},
],
},
{
title: "Community",
items: [
{
label: "Slack",
href: "https://slack.datahubproject.io",
},
{
label: "YouTube",
href: "https://www.youtube.com/channel/UC3qFQC5IiwR5fvWEqi_tJ5w",
},
2021-11-17 18:51:56 -06:00
{
label: "Blog",
href: "https://blog.datahubproject.io/",
},
{
label: "Town Halls",
to: "docs/townhalls",
},
{
label: "Adoption",
to: "docs/#adoption",
},
],
},
{
title: "More",
items: [
{
label: "Demo",
2021-03-07 10:46:27 -08:00
to: "docs/demo",
},
{
label: "Roadmap",
2022-01-17 16:23:25 -06:00
href: "https://feature-requests.datahubproject.io/roadmap",
},
{
label: "Contributing",
to: "docs/contributing",
},
{
label: "GitHub",
href: "https://github.com/datahub-project/datahub",
},
2021-11-17 18:51:56 -06:00
{
label: "Feature Requests",
href: "https://feature-requests.datahubproject.io/",
},
],
},
],
copyright: `Copyright © 2015-${new Date().getFullYear()} DataHub Project Authors.`,
},
prism: {
// theme: require('prism-react-renderer/themes/github'),
// darkTheme: require('prism-react-renderer/themes/dracula'),
additionalLanguages: ["ini"],
},
algolia: {
appId: "RK0UG797F3",
apiKey: "39d7eb90d8b31d464e309375a52d674f",
indexName: "datahubproject",
// contextualSearch: true,
// searchParameters: {},
// debug: true,
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
path: "genDocs",
sidebarPath: require.resolve("./sidebars.js"),
...(!isSaas && {
editUrl: "https://github.com/datahub-project/datahub/blob/master/",
}),
numberPrefixParser: false,
// TODO: make these work correctly with the doc generation
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
blog: false,
theme: {
customCss: [
isSaas
? require.resolve("./src/styles/acryl.scss")
: require.resolve("./src/styles/datahub.scss"),
require.resolve("./src/styles/global.scss"),
],
},
},
],
],
plugins: [
[
"@docusaurus/plugin-ideal-image",
{ quality: 100, sizes: [320, 640, 1280, 1440, 1600] },
],
2021-10-21 15:49:44 -05:00
"docusaurus-plugin-sass",
[
"docusaurus-graphql-plugin",
{
schema: "./graphql/combined.graphql",
routeBasePath: "/docs/graphql",
},
2021-10-21 15:49:44 -05:00
],
// '@docusaurus/plugin-google-gtag',
// [
// require.resolve("@easyops-cn/docusaurus-search-local"),
// {
// // `hashed` is recommended as long-term-cache of index file is possible.
// hashed: true,
// language: ["en"],
// docsDir: "genDocs",
// blogDir: [],
// },
// ],
],
};