From c4e30ca8845bcd14ec372a77621c2fa1721decc8 Mon Sep 17 00:00:00 2001 From: Rui Alves Date: Sun, 29 Sep 2024 11:09:14 +0100 Subject: [PATCH] docusaurus.config and sidebars converted to Typescript to allow for typings --- docs/docusaurus.config.js | 102 -------------------------------------- docs/docusaurus.config.ts | 102 ++++++++++++++++++++++++++++++++++++++ docs/sidebars.js | 87 -------------------------------- docs/sidebars.ts | 87 ++++++++++++++++++++++++++++++++ 4 files changed, 189 insertions(+), 189 deletions(-) delete mode 100644 docs/docusaurus.config.js create mode 100644 docs/docusaurus.config.ts delete mode 100644 docs/sidebars.js create mode 100644 docs/sidebars.ts diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js deleted file mode 100644 index 092db4200..000000000 --- a/docs/docusaurus.config.js +++ /dev/null @@ -1,102 +0,0 @@ -const path = require("path"); - -module.exports = { - title: "Frigate", - tagline: "NVR With Realtime Object Detection for IP Cameras", - url: "https://docs.frigate.video", - baseUrl: "/", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", - favicon: "img/favicon.ico", - organizationName: "blakeblackshear", - projectName: "frigate", - themes: ["@docusaurus/theme-mermaid"], - markdown: { - mermaid: true, - }, - themeConfig: { - algolia: { - appId: "WIURGBNBPY", - apiKey: "d02cc0a6a61178b25da550212925226b", - indexName: "frigate", - }, - docs: { - sidebar: { - hideable: true, - }, - }, - prism: { - additionalLanguages: ["bash", "json"], - }, - navbar: { - title: "Frigate", - logo: { - alt: "Frigate", - src: "img/logo.svg", - srcDark: "img/logo-dark.svg", - }, - items: [ - { - to: "/", - activeBasePath: "docs", - label: "Docs", - position: "left", - }, - { - href: "https://frigate.video", - label: "Website", - position: "right", - }, - { - href: "http://demo.frigate.video", - label: "Demo", - position: "right", - }, - { - href: "https://github.com/blakeblackshear/frigate", - label: "GitHub", - position: "right", - }, - ], - }, - footer: { - style: "dark", - links: [ - { - title: "Community", - items: [ - { - label: "GitHub", - href: "https://github.com/blakeblackshear/frigate", - }, - { - label: "Discussions", - href: "https://github.com/blakeblackshear/frigate/discussions", - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} Blake Blackshear`, - }, - }, - plugins: [path.resolve(__dirname, "plugins", "raw-loader")], - presets: [ - [ - "@docusaurus/preset-classic", - { - docs: { - routeBasePath: "/", - sidebarPath: require.resolve("./sidebars.js"), - // Please change this to your repo. - editUrl: - "https://github.com/blakeblackshear/frigate/edit/master/docs/", - sidebarCollapsible: false, - }, - - theme: { - customCss: require.resolve("./src/css/custom.css"), - }, - }, - ], - ], -}; diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts new file mode 100644 index 000000000..6dc417d26 --- /dev/null +++ b/docs/docusaurus.config.ts @@ -0,0 +1,102 @@ +import type * as Preset from '@docusaurus/preset-classic'; +import * as path from 'node:path'; + +module.exports = { + title: 'Frigate', + tagline: 'NVR With Realtime Object Detection for IP Cameras', + url: 'https://docs.frigate.video', + baseUrl: '/', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'warn', + favicon: 'img/favicon.ico', + organizationName: 'blakeblackshear', + projectName: 'frigate', + themes: ['@docusaurus/theme-mermaid'], + markdown: { + mermaid: true, + }, + themeConfig: { + algolia: { + appId: 'WIURGBNBPY', + apiKey: 'd02cc0a6a61178b25da550212925226b', + indexName: 'frigate', + }, + docs: { + sidebar: { + hideable: true, + }, + }, + prism: { + additionalLanguages: ['bash', 'json'], + }, + navbar: { + title: 'Frigate', + logo: { + alt: 'Frigate', + src: 'img/logo.svg', + srcDark: 'img/logo-dark.svg', + }, + items: [ + { + to: '/', + activeBasePath: 'docs', + label: 'Docs', + position: 'left', + }, + { + href: 'https://frigate.video', + label: 'Website', + position: 'right', + }, + { + href: 'http://demo.frigate.video', + label: 'Demo', + position: 'right', + }, + { + href: 'https://github.com/blakeblackshear/frigate', + label: 'GitHub', + position: 'right', + }, + ], + }, + footer: { + style: 'dark', + links: [ + { + title: 'Community', + items: [ + { + label: 'GitHub', + href: 'https://github.com/blakeblackshear/frigate', + }, + { + label: 'Discussions', + href: 'https://github.com/blakeblackshear/frigate/discussions', + }, + ], + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} Blake Blackshear`, + }, + }, + plugins: [path.resolve(__dirname, 'plugins', 'raw-loader')], + presets: [ + [ + '@docusaurus/preset-classic', + { + docs: { + routeBasePath: '/', + sidebarPath: require.resolve('./sidebars.js'), + // Please change this to your repo. + editUrl: 'https://github.com/blakeblackshear/frigate/edit/master/docs/', + sidebarCollapsible: false, + }, + + theme: { + customCss: require.resolve('./src/css/custom.css'), + }, + } satisfies Preset.Options, + ], + ], +}; diff --git a/docs/sidebars.js b/docs/sidebars.js deleted file mode 100644 index 9a6ba0df9..000000000 --- a/docs/sidebars.js +++ /dev/null @@ -1,87 +0,0 @@ -module.exports = { - docs: { - Frigate: [ - "frigate/index", - "frigate/hardware", - "frigate/installation", - "frigate/camera_setup", - "frigate/video_pipeline", - "frigate/glossary", - ], - Guides: [ - "guides/getting_started", - "guides/configuring_go2rtc", - "guides/ha_notifications", - "guides/ha_network_storage", - "guides/reverse_proxy", - ], - Configuration: { - "Configuration Files": [ - "configuration/index", - "configuration/reference", - { - type: "link", - label: "Go2RTC Configuration Reference", - href: "https://github.com/AlexxIT/go2rtc/tree/v1.9.4#configuration", - }, - ], - Detectors: [ - "configuration/object_detectors", - "configuration/audio_detectors", - ], - "Semantic Search": [ - "configuration/semantic_search", - "configuration/genai", - ], - Cameras: [ - "configuration/cameras", - "configuration/review", - "configuration/record", - "configuration/snapshots", - "configuration/motion_detection", - "configuration/birdseye", - "configuration/live", - "configuration/restream", - "configuration/autotracking", - "configuration/camera_specific", - ], - Objects: [ - "configuration/object_filters", - "configuration/masks", - "configuration/zones", - "configuration/objects", - "configuration/stationary_objects", - ], - "Extra Configuration": [ - "configuration/authentication", - "configuration/notifications", - "configuration/hardware_acceleration", - "configuration/ffmpeg_presets", - "configuration/tls", - "configuration/advanced", - ], - }, - Integrations: [ - "integrations/plus", - "integrations/home-assistant", - "integrations/api", - "integrations/mqtt", - "integrations/third_party_extensions", - ], - "Frigate+": [ - "plus/index", - "plus/first_model", - "plus/improving_model", - "plus/faq", - ], - Troubleshooting: [ - "troubleshooting/faqs", - "troubleshooting/recordings", - "troubleshooting/edgetpu", - ], - Development: [ - "development/contributing", - "development/contributing-boards", - ], - }, -}; diff --git a/docs/sidebars.ts b/docs/sidebars.ts new file mode 100644 index 000000000..f4567c442 --- /dev/null +++ b/docs/sidebars.ts @@ -0,0 +1,87 @@ +module.exports = { + docs: { + Frigate: [ + 'frigate/index', + 'frigate/hardware', + 'frigate/installation', + 'frigate/camera_setup', + 'frigate/video_pipeline', + 'frigate/glossary', + ], + Guides: [ + 'guides/getting_started', + 'guides/configuring_go2rtc', + 'guides/ha_notifications', + 'guides/ha_network_storage', + 'guides/reverse_proxy', + ], + Configuration: { + 'Configuration Files': [ + 'configuration/index', + 'configuration/reference', + { + type: 'link', + label: 'Go2RTC Configuration Reference', + href: 'https://github.com/AlexxIT/go2rtc/tree/v1.9.4#configuration', + }, + ], + Detectors: [ + 'configuration/object_detectors', + 'configuration/audio_detectors', + ], + 'Semantic Search': [ + 'configuration/semantic_search', + 'configuration/genai', + ], + Cameras: [ + 'configuration/cameras', + 'configuration/review', + 'configuration/record', + 'configuration/snapshots', + 'configuration/motion_detection', + 'configuration/birdseye', + 'configuration/live', + 'configuration/restream', + 'configuration/autotracking', + 'configuration/camera_specific', + ], + Objects: [ + 'configuration/object_filters', + 'configuration/masks', + 'configuration/zones', + 'configuration/objects', + 'configuration/stationary_objects', + ], + 'Extra Configuration': [ + 'configuration/authentication', + 'configuration/notifications', + 'configuration/hardware_acceleration', + 'configuration/ffmpeg_presets', + 'configuration/tls', + 'configuration/advanced', + ], + }, + Integrations: [ + 'integrations/plus', + 'integrations/home-assistant', + 'integrations/api', + 'integrations/mqtt', + 'integrations/third_party_extensions', + ], + 'Frigate+': [ + 'plus/index', + 'plus/first_model', + 'plus/improving_model', + 'plus/faq', + ], + Troubleshooting: [ + 'troubleshooting/faqs', + 'troubleshooting/recordings', + 'troubleshooting/edgetpu', + ], + Development: [ + 'development/contributing', + 'development/contributing-boards', + ], + }, +};