Skip to content

Commit 0289260

Browse files
author
jdv
committed
some comments
1 parent d7b736c commit 0289260

4 files changed

Lines changed: 21 additions & 0 deletions

File tree

crowdsec-docs/docusaurus.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ const ACADEMY_URL = `https://academy.crowdsec.net/courses?${
5656
process.env.NODE_ENV === "production" ? "utm_source=docs&utm_medium=menu&utm_campaign=top-menu&utm_id=academydocs" : ""
5757
}`;
5858

59+
/** IF you make significant changes to the nav bar or side bars
60+
* make sure to have proper mapping in crowdsec-docs/src/sectionMap.ts */
61+
5962
const NAVBAR_ITEMS: NavbarItem[] = [
6063
{
6164
label: "Security Stack",

crowdsec-docs/sidebars.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
22

33
type SidebarConfig = SidebarsConfig[string];
44

5+
/** IF you make significant changes to the nav bar or side bars
6+
* make sure to have proper mapping in crowdsec-docs/src/sectionMap.ts */
7+
58
const sidebarsConfig: SidebarConfig = {
69
// By default, Docusaurus generates a sidebar from the docs folder structure
710
//tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

crowdsec-docs/sidebarsUnversioned.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
22

33
type SidebarConfig = SidebarsConfig[string];
44

5+
/** IF you make significant changes to the nav bar or side bars
6+
* make sure to have proper mapping in crowdsec-docs/src/sectionMap.ts */
7+
58
const sidebarsUnversionedConfig: SidebarConfig = {
69
ctiApiSidebar: [
710
{

crowdsec-docs/src/theme/DocRoot/Layout/index.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/**
2+
* CrowdSec Made Swizzled override of @docusaurus/theme-classic's DocRoot/Layout component.
3+
*
4+
* The original only renders the sidebar + main content area.
5+
* This override injects a custom SecondaryNavbar above that content, which adds:
6+
* - A breadcrumb trail (Home > Section > [current page path])
7+
* - A version dropdown (when multiple doc versions exist)
8+
*
9+
* Docusaurus picks this file automatically because it lives at
10+
* src/theme/DocRoot/Layout/index.tsx, shadowing the original in node_modules.
11+
*/
12+
113
import {
214
useActiveDocContext,
315
useActivePlugin,

0 commit comments

Comments
 (0)