From 9b84922135e5d1cbc750a6a051c565969aa13a11 Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Thu, 20 Nov 2025 20:46:53 +0100 Subject: [PATCH 1/7] ci: update GitHub actions - Update most GitHub actions to newer versions - Pin most actions to commit SHA for security --- .github/workflows/deploy-preview.yml | 10 +++++----- .github/workflows/deploy.yml | 12 ++++++------ .github/workflows/doc-detective.yml | 4 ++-- .github/workflows/ekline.yml | 4 ++-- .github/workflows/optimize.yml | 4 ++-- .github/workflows/update-common.yml | 4 ++-- .github/workflows/vale.yml | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 995f3425..11492ffc 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -12,10 +12,10 @@ jobs: name: Test deployment runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 with: fetch-depth: 0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 with: cache: npm @@ -30,7 +30,7 @@ jobs: POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} # - name: Upload Build Artifact - # uses: actions/upload-pages-artifact@v3 + # uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b #v4.0.0 # with: # path: build # deploy: @@ -51,10 +51,10 @@ jobs: # steps: # - name: Deploy to GitHub Pages # id: deployment - # uses: actions/deploy-pages@v4 + # uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4.0.5 # - name: Add deployment URL as comment on PR - # uses: actions/github-script@v7 + # uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd #v8.0.0 # with: # github-token: ${{ secrets.GITHUB_TOKEN }} # script: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e6f045ea..dea8799f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,10 +13,10 @@ jobs: name: Build Docusaurus runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 with: fetch-depth: 0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 with: cache: npm @@ -31,7 +31,7 @@ jobs: POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - name: Upload Build Artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b #v4.0.0 with: path: build @@ -53,7 +53,7 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4.0.5 sync_inkeep: name: Sync Content with Inkeep @@ -65,7 +65,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - name: Check for changes uses: dorny/paths-filter@v2 id: changes @@ -75,7 +75,7 @@ jobs: - 'docs/**' - name: Sync Sources if: steps.changes.outputs.docs == 'true' - uses: inkeep/pr-commenter-action@v10 + uses: inkeep/pr-commenter-action@84ccc7c74b72f628ec7e2b572e0cb7afd5898594 #v10 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: diff --git a/.github/workflows/doc-detective.yml b/.github/workflows/doc-detective.yml index 601959a5..0aa5fdc8 100644 --- a/.github/workflows/doc-detective.yml +++ b/.github/workflows/doc-detective.yml @@ -14,7 +14,7 @@ jobs: runTests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: doc-detective/github-action@v1 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 + - uses: doc-detective/github-action@7cd1f3609abc91634935dbc990bfa7b6e6326f71 #latest, May 7 2025 with: exit_on_fail: true diff --git a/.github/workflows/ekline.yml b/.github/workflows/ekline.yml index 01f71187..630e138d 100644 --- a/.github/workflows/ekline.yml +++ b/.github/workflows/ekline.yml @@ -10,8 +10,8 @@ jobs: name: runner / EkLine Reviewer (github-pr-review) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: ekline-io/ekline-github-action@v6 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 + - uses: ekline-io/ekline-github-action@6f79f8e33a245e231d3cc822e51a6a1d93d78638 #v6.46.2 with: content_dir: ./docs ek_token: ${{ secrets.ek_token }} diff --git a/.github/workflows/optimize.yml b/.github/workflows/optimize.yml index c80e58af..ba3433c1 100644 --- a/.github/workflows/optimize.yml +++ b/.github/workflows/optimize.yml @@ -9,11 +9,11 @@ jobs: name: SVGs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 # Uncomment the next 2 lines to select a branch for schedule or dispatch. # with: # ref: main - - uses: ericcornelissen/svgo-action@v3 + - uses: ericcornelissen/svgo-action@5ca1239218b08fb8fd2326bf6f5840d01abe021f #v3.1.6 with: svgo-version: 3 repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-common.yml b/.github/workflows/update-common.yml index d577fe05..6fc265e8 100644 --- a/.github/workflows/update-common.yml +++ b/.github/workflows/update-common.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 with: token: ${{ secrets.DD_DEP_UPDATE_TOKEN }} @@ -129,7 +129,7 @@ jobs: - name: Create release with detailed notes if: steps.commit.outputs.has_changes == 'true' - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe #v2.4.2 with: body: | # What's new diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index 9478f86d..fba8f417 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -11,13 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - name: Set up dependencies run: npm install -g mdx2vast - name: Run Vale - uses: errata-ai/vale-action@v2.1.1 + uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c #v2.1.1 with: files: "docs/" fail_on_error: false From ddd4687e0a50f70ed9cafff746bd3accd33f8916 Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Thu, 20 Nov 2025 20:51:09 +0100 Subject: [PATCH 2/7] ci: replace `dorny/paths-filter` action - Replace `dorny/paths-filter` with `tj-actions/changed-files` for maintained status. Use SHA pinning for security - Add `src/pages/**` to file watchlist --- .github/workflows/deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dea8799f..45a6c9e4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -66,15 +66,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - - name: Check for changes - uses: dorny/paths-filter@v2 - id: changes + - name: Check for changed pages + uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 + id: changed-pages with: - filters: | - docs: - - 'docs/**' + files: | + docs/** + src/pages/** - name: Sync Sources - if: steps.changes.outputs.docs == 'true' + if: steps.changed-pages.outputs.any_changed == 'true' uses: inkeep/pr-commenter-action@84ccc7c74b72f628ec7e2b572e0cb7afd5898594 #v10 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} From ae4a8ae733ea9a6cd02c5f85a1737c904c685feb Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:26:39 +0100 Subject: [PATCH 3/7] ci: rewrite SVG optimizer action `ericcornelissen/svgo-action` is deprecated, and should be replaced. There is no easy action to replace it; instead, use more targeted logic. --- .github/workflows/optimize-svg.yml | 47 ++++++++++++++++++++++++++++++ .github/workflows/optimize.yml | 19 ------------ 2 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/optimize-svg.yml delete mode 100644 .github/workflows/optimize.yml diff --git a/.github/workflows/optimize-svg.yml b/.github/workflows/optimize-svg.yml new file mode 100644 index 00000000..e57da084 --- /dev/null +++ b/.github/workflows/optimize-svg.yml @@ -0,0 +1,47 @@ +name: Optimize new SVG images +on: + pull_request: + branches: + - main +defaults: + run: + shell: bash +jobs: + svgs: + name: Optimize SVGs + runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + steps: + + - name: Checkout repository + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 + + - name: Check for changed SVGs + uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 + id: changed-files + with: + safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection. + files: | + **/*.svg + + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 + if: steps.changed-files.outputs.any_changed == 'true' + + - name: Optimize files + if: steps.changed-files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + npm install -g svgo + for file in ${ALL_CHANGED_FILES}; do + npx svgo --multipass "$file" --output "$file" + done + + - name: Commit optimized SVGs + if: steps.changed-files.outputs.any_changed == 'true' + uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #v7.0.0 + with: + commit_message: "auto: optimize SVGs" \ No newline at end of file diff --git a/.github/workflows/optimize.yml b/.github/workflows/optimize.yml deleted file mode 100644 index ba3433c1..00000000 --- a/.github/workflows/optimize.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Optimize -on: - # Comment the next line if you don't want the Action to run on Pull Requests. - pull_request: - branches: - - main -jobs: - svgs: - name: SVGs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - # Uncomment the next 2 lines to select a branch for schedule or dispatch. - # with: - # ref: main - - uses: ericcornelissen/svgo-action@5ca1239218b08fb8fd2326bf6f5840d01abe021f #v3.1.6 - with: - svgo-version: 3 - repo-token: ${{ secrets.GITHUB_TOKEN }} From 9ab05efd69217c3395d60be90846fc36360ecbb3 Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:30:05 +0100 Subject: [PATCH 4/7] ci: Make dependabot check GitHub actions monthly --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9d8f2d04..dc2dd9e7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,7 @@ updates: directory: "/" schedule: interval: weekly + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: monthly From 90f627cb9baafcafd6be89099ef166d7eec3d39b Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:35:39 +0100 Subject: [PATCH 5/7] ci: Remove unnecessary `fetch-depth` property from checkout actions --- .github/workflows/deploy-preview.yml | 3 +-- .github/workflows/deploy.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 11492ffc..67d558c9 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -13,8 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - with: - fetch-depth: 0 + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 with: cache: npm diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 45a6c9e4..976b8cea 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,8 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - with: - fetch-depth: 0 + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 with: cache: npm From 6974b8434103acf8fbd835609903668dba9bb638 Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:40:54 +0100 Subject: [PATCH 6/7] ci: Set bash as the default shell for actions that use it --- .github/workflows/deploy-preview.yml | 4 +++- .github/workflows/deploy.yml | 6 ++++-- .github/workflows/update-common.yml | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 67d558c9..8ebe3307 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -6,7 +6,9 @@ on: - main # Review gh actions docs if you want to further define triggers, paths, etc # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on - +defaults: + run: + shell: bash jobs: build: name: Test deployment diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 976b8cea..f58d5fcb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,14 +7,16 @@ on: # repository_dispatch: # TODO: Configure repository_dispatch event in update-common.yml # types: # - update-common-package-complete - +defaults: + run: + shell: bash jobs: build: name: Build Docusaurus runs-on: ubuntu-latest steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 - + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 with: cache: npm diff --git a/.github/workflows/update-common.yml b/.github/workflows/update-common.yml index 6fc265e8..b86202fd 100644 --- a/.github/workflows/update-common.yml +++ b/.github/workflows/update-common.yml @@ -10,7 +10,9 @@ on: description: 'The doc-detective-common version.' required: false default: 'latest' - +defaults: + run: + shell: bash jobs: update: permissions: From 51f2a33b807d050047341bf43d043c3996238525 Mon Sep 17 00:00:00 2001 From: AK <89195061+anaxite@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:27:54 +0100 Subject: [PATCH 7/7] chore (config): consolidate `markdown` config block There were two markdown blocks. Now there are one. --- docusaurus.config.ts | 378 +++++++++++++++++++++---------------------- 1 file changed, 188 insertions(+), 190 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index bcaa23d2..11174e69 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -4,201 +4,199 @@ import type * as Preset from "@docusaurus/preset-classic"; require("dotenv").config(); const config: Config = { - title: "Doc Detective", - tagline: "Keep your docs in sync with your product. Always.", - favicon: "img/favicon.ico", - staticDirectories: ["public", "static"], + title: "Doc Detective", + tagline: "Keep your docs in sync with your product. Always.", + favicon: "img/favicon.ico", + staticDirectories: ["public", "static"], - // Set the production url of your site here - url: "https://doc-detective.com", - // Set the // pathname under which your site is served - // For GitHub pages deployment, it is often '//' - baseUrl: "/", + // Set the production url of your site here + url: "https://doc-detective.com", + // Set the // pathname under which your site is served + // For GitHub pages deployment, it is often '//' + baseUrl: "/", - // GitHub pages deployment config. - // If you aren't using GitHub pages, you don't need these. - organizationName: "doc-detective", // Usually your GitHub org/user name. - projectName: "doc-detective.github.io", // Usually your repo name. - trailingSlash: false, - deploymentBranch: "gh-pages", + // GitHub pages deployment config. + // If you aren't using GitHub pages, you don't need these. + organizationName: "doc-detective", // Usually your GitHub org/user name. + projectName: "doc-detective.github.io", // Usually your repo name. + trailingSlash: false, + deploymentBranch: "gh-pages", - onBrokenLinks: "throw", - markdown: { - hooks: { - onBrokenMarkdownLinks: "warn", - }, - }, - // Even if you don't use internationalization, you can use this field to set - // useful metadata like html lang. For example, if your site is Chinese, you - // may want to replace "en" with "zh-Hans". - i18n: { - defaultLocale: "en", - locales: ["en"], - }, + onBrokenLinks: "throw", + markdown: { + mermaid: true, + hooks: { + onBrokenMarkdownLinks: "warn", + }, + }, + // Even if you don't use internationalization, you can use this field to set + // useful metadata like html lang. For example, if your site is Chinese, you + // may want to replace "en" with "zh-Hans". + i18n: { + defaultLocale: "en", + locales: ["en"], + }, - presets: [ - [ - "classic", - { - docs: { - sidebarPath: "./sidebars.ts", - // Please change this to your repo. - // Remove this to remove the "edit this page" links. - editUrl: - "https://github.dev/doc-detective/doc-detective.github.io/blob/main/", - }, - blog: { - showReadingTime: true, - // Please change this to your repo. - // Remove this to remove the "edit this page" links. - editUrl: - "https://github.dev/doc-detective/doc-detective.github.io/blob/main/", - }, - theme: { - customCss: "./src/css/custom.css", - }, - } satisfies Preset.Options, - ], - ], + presets: [ + [ + "classic", + { + docs: { + sidebarPath: "./sidebars.ts", + // Please change this to your repo. + // Remove this to remove the "edit this page" links. + editUrl: + "https://github.dev/doc-detective/doc-detective.github.io/blob/main/", + }, + blog: { + showReadingTime: true, + // Please change this to your repo. + // Remove this to remove the "edit this page" links. + editUrl: + "https://github.dev/doc-detective/doc-detective.github.io/blob/main/", + }, + theme: { + customCss: "./src/css/custom.css", + }, + } satisfies Preset.Options, + ], + ], - themeConfig: { - // Replace with your project's social card - image: "img/social-card.jpg", - navbar: { - title: "Doc Detective", - logo: { - alt: "Doc Detective Logo", - src: "img/logo.svg", - }, - items: [ - { - type: "docSidebar", - sidebarId: "docsSidebar", - position: "left", - label: "Get started", - }, - { - type: "docSidebar", - sidebarId: "referencesSidebar", - position: "left", - label: "References", - }, - // { to: "/app", label: "Action Builder (beta)", position: "left" }, - // {to: '/blog', label: 'Blog', position: 'left'}, - { to: "/support", label: "Support ❤️", position: "right" }, - { - type: "docSidebar", - sidebarId: "contributeSidebar", - position: "right", - label: "Contribute", - }, - { - href: "https://github.com/doc-detective", - label: "GitHub", - position: "right", - }, - ], - }, - footer: { - style: "dark", - links: [ - { - title: "Docs", - items: [ - { - label: "Get started", - to: "/docs/get-started/intro", - }, - ], - }, - { - title: "Community", - items: [ - { - label: "Discord", - href: "https://discord.gg/2M7wXEThfF", - }, - { - label: "LinkedIn", - href: "https://www.linkedin.com/company/doc-detective", - }, - ], - }, - { - title: "More", - items: [ - // { - // label: 'Blog', - // to: '/blog', - // }, - { - label: "GitHub", - href: "https://github.com/doc-detective", - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} Doc Detective.`, - }, - prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, - }, - inkeepConfig: { - baseSettings: { - apiKey: process.env.INKEEP_API_KEY, // required - integrationId: process.env.INKEEP_INTEGRATION_ID, // required - organizationId: process.env.INKEEP_ORGANIZATION_ID, // required - primaryBrandColor: "#00c122", // required -- your brand color, the widget color scheme is derived from this - organizationDisplayName: "Doc Detective", // required -- your organization name - // ...optional settings - theme: { - // stylesheetUrls: ['/path/to/stylesheets'], // optional - syntaxHighlighter: { - lightTheme: prismThemes.github, // optional -- pass in the Prism theme you're using - darkTheme: prismThemes.dracula, // optional -- pass in the Prism theme you're using - }, - }, - }, - modalSettings: { - // optional settings - }, - searchSettings: { - // optional settings - }, - aiChatSettings: { - // optional settings - // botAvatarSrcUrl: "/img/logo.svg", // use your own bot avatar - quickQuestions: [ - "How can I test my docs with Doc Detective?", - "What does a test look like?", - "What actions can Doc Detective perform?", - ], - }, - }, - } satisfies Preset.ThemeConfig, - plugins: [ - require.resolve("./src/plugins/webpack-browserify"), - ...(process.env.INKEEP_API_KEY - ? ["@inkeep/docusaurus/chatButton", "@inkeep/docusaurus/searchBar"] - : []), - ...(process.env.POSTHOG_API_KEY - ? [ - [ - "posthog-docusaurus", - { - apiKey: process.env.POSTHOG_API_KEY, - appUrl: "https://us.i.posthog.com", - enableInDevelopment: false, - }, - ], - ] - : []), - ], - markdown: { - mermaid: true, - }, - themes: ["@docusaurus/theme-mermaid", "docusaurus-json-schema-plugin"], + themeConfig: { + // Replace with your project's social card + image: "img/social-card.jpg", + navbar: { + title: "Doc Detective", + logo: { + alt: "Doc Detective Logo", + src: "img/logo.svg", + }, + items: [ + { + type: "docSidebar", + sidebarId: "docsSidebar", + position: "left", + label: "Get started", + }, + { + type: "docSidebar", + sidebarId: "referencesSidebar", + position: "left", + label: "References", + }, + // { to: "/app", label: "Action Builder (beta)", position: "left" }, + // {to: '/blog', label: 'Blog', position: 'left'}, + { to: "/support", label: "Support ❤️", position: "right" }, + { + type: "docSidebar", + sidebarId: "contributeSidebar", + position: "right", + label: "Contribute", + }, + { + href: "https://github.com/doc-detective", + label: "GitHub", + position: "right", + }, + ], + }, + footer: { + style: "dark", + links: [ + { + title: "Docs", + items: [ + { + label: "Get started", + to: "/docs/get-started/intro", + }, + ], + }, + { + title: "Community", + items: [ + { + label: "Discord", + href: "https://discord.gg/2M7wXEThfF", + }, + { + label: "LinkedIn", + href: "https://www.linkedin.com/company/doc-detective", + }, + ], + }, + { + title: "More", + items: [ + // { + // label: 'Blog', + // to: '/blog', + // }, + { + label: "GitHub", + href: "https://github.com/doc-detective", + }, + ], + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} Doc Detective.`, + }, + prism: { + theme: prismThemes.github, + darkTheme: prismThemes.dracula, + }, + inkeepConfig: { + baseSettings: { + apiKey: process.env.INKEEP_API_KEY, // required + integrationId: process.env.INKEEP_INTEGRATION_ID, // required + organizationId: process.env.INKEEP_ORGANIZATION_ID, // required + primaryBrandColor: "#00c122", // required -- your brand color, the widget color scheme is derived from this + organizationDisplayName: "Doc Detective", // required -- your organization name + // ...optional settings + theme: { + // stylesheetUrls: ['/path/to/stylesheets'], // optional + syntaxHighlighter: { + lightTheme: prismThemes.github, // optional -- pass in the Prism theme you're using + darkTheme: prismThemes.dracula, // optional -- pass in the Prism theme you're using + }, + }, + }, + modalSettings: { + // optional settings + }, + searchSettings: { + // optional settings + }, + aiChatSettings: { + // optional settings + // botAvatarSrcUrl: "/img/logo.svg", // use your own bot avatar + quickQuestions: [ + "How can I test my docs with Doc Detective?", + "What does a test look like?", + "What actions can Doc Detective perform?", + ], + }, + }, + } satisfies Preset.ThemeConfig, + plugins: [ + require.resolve("./src/plugins/webpack-browserify"), + ...(process.env.INKEEP_API_KEY + ? ["@inkeep/docusaurus/chatButton", "@inkeep/docusaurus/searchBar"] + : []), + ...(process.env.POSTHOG_API_KEY + ? [ + [ + "posthog-docusaurus", + { + apiKey: process.env.POSTHOG_API_KEY, + appUrl: "https://us.i.posthog.com", + enableInDevelopment: false, + }, + ], + ] + : []), + ], + themes: ["@docusaurus/theme-mermaid", "docusaurus-json-schema-plugin"], }; export default config;