Skip to content

Commit 4df6afe

Browse files
rr404jdv
andauthored
Updating firewall integrations doc (#1058)
* uniformization phase of firewall pages * better guide to integration creation * generalizing endpoint setup steps --------- Co-authored-by: jdv <julien@crowdsec.net>
1 parent 2cacca0 commit 4df6afe

27 files changed

+752
-716
lines changed

crowdsec-docs/plugins/extract-preprocessor.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ const buildIndex = () => {
4444

4545
let count = 0;
4646

47-
// Regex to find: <div data-extract="ID"> CONTENT </div>
47+
// Regex to find: <snippet-extract data-extract="ID"> CONTENT </snippet-extract>
4848
// We use [\s\S]*? to match content across multiple lines (lazy match)
49-
const extractRegex = /<div\s+data-extract=["']([^"']+)["'][^>]*>([\s\S]*?)<\/div>/g;
49+
const extractRegex = /<snippet-extract\s+data-extract=["']([^"']+)["'][^>]*>([\s\S]*?)<\/snippet-extract>/g;
5050

5151
allFiles.forEach(filePath => {
5252
try {
@@ -84,9 +84,9 @@ const preprocessor = ({ filePath, fileContent }) => {
8484
// 1. Ensure Index exists (runs once)
8585
buildIndex();
8686

87-
// 2. Regex to find: <div data-extract-copy="ID" />
88-
// Matches <div data-extract-copy="xyz"></div> OR <div data-extract-copy="xyz" />
89-
const copyRegex = /<div\s+data-extract-copy=["']([^"']+)["']\s*\/?>\s*(?:<\/div>)?/g;
87+
// 2. Regex to find: <snippet-extract data-extract-copy="ID" />
88+
// Matches <snippet-extract data-extract-copy="xyz"></snippet-extract> OR <snippet-extract data-extract-copy="xyz" />
89+
const copyRegex = /<snippet-extract\s+data-extract-copy=["']([^"']+)["']\s*\/?>\s*(?:<\/snippet-extract>)?/g;
9090

9191
// 3. Replace with content
9292
return fileContent.replace(copyRegex, (match, requestedId) => {

crowdsec-docs/sidebarsUnversioned.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,12 @@ const sidebarsUnversionedConfig: SidebarConfig = {
642642
label: "Integrations",
643643
items: [
644644
"integrations/rawiplist",
645+
"integrations/remediationcomponent",
646+
{
647+
type: "html",
648+
value: "<hr style='margin: 0.75rem 0; opacity: 0.35;' />",
649+
defaultStyle: false,
650+
},
645651
"integrations/checkpoint",
646652
"integrations/cisco",
647653
"integrations/f5",
@@ -651,7 +657,6 @@ const sidebarsUnversionedConfig: SidebarConfig = {
651657
"integrations/opnsense",
652658
"integrations/paloalto",
653659
"integrations/pfsense",
654-
"integrations/remediationcomponent",
655660
"integrations/sophos",
656661
],
657662
},
272 KB
Loading
269 KB
Loading
35.9 KB
Loading
40.7 KB
Loading
-74 KB
Loading
8.67 KB
Loading
9.11 KB
Loading
-71.6 KB
Loading

0 commit comments

Comments
 (0)