Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docs.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "22"

- run: yarn
- run: cd documentation && yarn build
6 changes: 3 additions & 3 deletions .github/workflows/web.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "22"

- run: yarn
- run: cd www && yarn build
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
96 changes: 70 additions & 26 deletions documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,63 @@
// @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");
import { themes as prismThemes } from "prism-react-renderer";

/** @type {import('@docusaurus/types').Config} */
// Conditionally add posthog plugin only if API key is set
const plugins = [];
if (process.env.POSTHOG_API_KEY) {
plugins.push([
"posthog-docusaurus",
{
apiKey: process.env.POSTHOG_API_KEY,
appUrl: "https://app.posthog.com",
enableInDevelopment: false,
},
]);
}

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Conduit Platform",
tagline: "Less is more",
url: "https://mystifying-borg-373afd.netlify.app",
tagline: "The only Backend you'll ever need",
url: "https://getconduit.dev",
baseUrl: "/docs/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
onBrokenLinks: "warn",
favicon: "favicon.ico",
organizationName: "ConduitPlatform", // Usually your GitHub org/user name.
projectName: "Conduit", // Usually your repo name.
plugins: ["posthog-docusaurus", ["docusaurus2-dotenv", { systemvars: true }]],

// Auto-detect format: .mdx files support JSX, .md files use CommonMark
markdown: {
format: 'detect',
mdx1Compat: {
comments: true,
admonitions: true,
headingIds: true,
},
},

plugins,

presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: undefined,
sidebarPath: "./sidebars.js",
editUrl: "https://github.com/ConduitPlatform/Conduit-Website/tree/main/documentation/",
includeCurrentVersion: false, // disable 'next' version, enable for offline edits
showLastUpdateTime: true,
showLastUpdateAuthor: true,
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
customCss: [
"./src/css/custom.css",
"./src/css/components.css",
],
},
}),
],
Expand All @@ -40,11 +66,21 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
posthog: {
apiKey: `<${process.env.POSTHOG_API_KEY}>`,
appUrl: "<https://app.posthog.com>", // optional
enableInDevelopment: false, // optional
announcementBar: {
id: "v016_release",
content:
'Conduit v0.16 is now available! <a href="/docs/quickstart/installation">Get started</a>',
backgroundColor: "#07d9c4",
textColor: "#1F2034",
isCloseable: true,
},
// Algolia DocSearch - apply at https://docsearch.algolia.com/
// algolia: {
// appId: 'YOUR_APP_ID',
// apiKey: 'YOUR_SEARCH_API_KEY',
// indexName: 'conduit',
// contextualSearch: true,
// },
metadata: [
{
name: "title",
Expand All @@ -71,7 +107,7 @@ const config = {
items: [
{
type: "doc",
docId: "overview/intro",
docId: "intro",
position: "left",
label: "Docs",
},
Expand All @@ -88,7 +124,7 @@ const config = {
position: "left",
},
{
type: 'docsVersionDropdown',
type: "docsVersionDropdown",
position: "right",
},
{
Expand All @@ -106,16 +142,16 @@ const config = {
title: "Docs",
items: [
{
label: "Overview",
to: "/overview/intro",
label: "Introduction",
to: "/intro",
},
{
label: "Get Started",
to: "/get-started",
label: "Quick Start",
to: "/quickstart/installation",
},
{
label: "Modules",
to: "/modules",
to: "/modules/overview",
},
],
},
Expand All @@ -126,6 +162,10 @@ const config = {
label: "Discord",
href: "https://discord.com/invite/fBqUQ23M7g",
},
{
label: "Twitter",
href: "https://twitter.com/ConduitPlatform",
},
],
},
{
Expand All @@ -135,6 +175,10 @@ const config = {
label: "GitHub",
href: "https://github.com/ConduitPlatform/Conduit",
},
{
label: "Contributing",
to: "/resources/contributing",
},
],
},
],
Expand All @@ -148,10 +192,10 @@ const config = {
copyright: `Copyright © Conduit ${new Date().getFullYear()}. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};

module.exports = config;
export default config;
27 changes: 14 additions & 13 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,19 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^2.0.0-rc.1",
"@docusaurus/module-type-aliases": "^2.0.0-rc.1",
"@docusaurus/preset-classic": "^2.0.0-rc.1",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"docusaurus2-dotenv": "^1.4.0",
"posthog-docusaurus": "^1.0.3",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"@docusaurus/core": "^3.6.3",
"@docusaurus/preset-classic": "^3.6.3",
"clsx": "^2.1.1",
"posthog-docusaurus": "^2.0.1",
"prism-react-renderer": "^2.4.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.14",
"@tsconfig/docusaurus": "^1.0.4",
"typescript": "^4.5.2"
"@docusaurus/module-type-aliases": "^3.6.3",
"@docusaurus/tsconfig": "^3.6.3",
"@docusaurus/types": "^3.6.3",
"typescript": "^5.7.2"
},
"browserslist": {
"production": [
Expand All @@ -42,5 +40,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}
Loading