Skip to content

Commit a3d6671

Browse files
committed
Merge branch 'main' of github.com:crowdsecurity/crowdsec-docs
2 parents 97934ae + 9474ccb commit a3d6671

File tree

17 files changed

+407
-66
lines changed

17 files changed

+407
-66
lines changed

.github/workflows/lint.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ jobs:
2222
run: npm ci
2323
working-directory: ./crowdsec-docs/
2424

25+
- name: Get Biome version from package.json
26+
id: biome-version
27+
run: |
28+
VERSION=$(node -p "require('./crowdsec-docs/package.json').devDependencies['@biomejs/biome']")
29+
echo "version=$VERSION" >> $GITHUB_OUTPUT
30+
2531
- name: Setup Biome
2632
uses: biomejs/setup-biome@v2
2733
with:
28-
version: latest
34+
version: ${{ steps.biome-version.outputs.version }}
2935

3036
- name: Run Biome
3137
run: biome ci .

biome.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
2+
"root": true,
3+
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
34
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
45
"files": {
56
"ignoreUnknown": false,
67
"includes": [
78
"crowdsec-docs/**/*.ts",
89
"crowdsec-docs/**/*.tsx",
910
"crowdsec-docs/**/*.css",
10-
"!**/node_modules/**",
11-
"!crowdsec-docs/plugins/**",
12-
"!crowdsec-docs/build/**"
11+
"!**/node_modules",
12+
"!crowdsec-docs/plugins",
13+
"!crowdsec-docs/build",
14+
"!**/.docusaurus"
1315
]
1416
},
1517
"formatter": {
@@ -31,6 +33,12 @@
3133
"recommended": true,
3234
"style": {
3335
"useImportType": "off"
36+
},
37+
"complexity": {
38+
"noImportantStyles": "off"
39+
},
40+
"suspicious": {
41+
"noUnknownAtRules": "off"
3442
}
3543
}
3644
},

crowdsec-docs/docs/appsec/intro.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ You can follow our quick start guides depending on your web server:
6666

6767
- [Nginx/OpenResty](/appsec/quickstart/nginxopenresty.mdx)
6868
- [Traefik](/appsec/quickstart/traefik.mdx)
69+
- [CrowdSec WAF with Nginx Reverse Proxy](/u/user_guides/waf_rp_howto)
6970

7071
Or consider learning more about the AppSec capabilities:
7172

crowdsec-docs/package-lock.json

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crowdsec-docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"serve": "docusaurus serve",
1313
"lint": "biome check",
1414
"format": "biome format",
15+
"migrate": "biome migrate --write",
1516
"write-translations": "docusaurus write-translations",
1617
"write-heading-ids": "docusaurus write-heading-ids"
1718
},
@@ -46,7 +47,7 @@
4647
"tailwindcss-animate": "^1.0.7"
4748
},
4849
"devDependencies": {
49-
"@biomejs/biome": "2.0.6",
50+
"@biomejs/biome": "2.2.0",
5051
"@docusaurus/module-type-aliases": "^3.8.1",
5152
"@docusaurus/tsconfig": "^3.8.1",
5253
"@docusaurus/types": "^3.8.1",

crowdsec-docs/sidebarsUnversioned.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,11 @@ const sidebarsUnversionedConfig: SidebarConfig = {
570570
},
571571
label: "Integrations",
572572
items: [
573+
"integrations/rawiplist",
573574
"integrations/checkpoint",
574575
"integrations/cisco",
575576
"integrations/f5",
576577
"integrations/fortinet",
577-
"integrations/genericfirewall",
578578
"integrations/juniper",
579579
"integrations/mikrotik",
580580
"integrations/opnsense",
@@ -629,6 +629,7 @@ const sidebarsUnversionedConfig: SidebarConfig = {
629629
"user_guides/consuming_fastly_logs",
630630
"user_guides/alert_context",
631631
"user_guides/log_centralization",
632+
"user_guides/waf_rp_howto",
632633
],
633634
gettingStarted: [
634635
{

crowdsec-docs/src/components/console-promo.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
1+
import { useHistory } from "@docusaurus/router";
12
import useBaseUrl from "@docusaurus/useBaseUrl";
23
import { Button } from "@site/src/ui/button";
34
import { Card, CardContent, CardHeader } from "@site/src/ui/card";
45
import React from "react";
56

67
const ConsolePromo = ({ ...props }): React.JSX.Element => {
78
const url = useBaseUrl(`/img/${props.image}`);
9+
const isExternal = /^(?:[a-z]+:)?\/\//i.test(props.link);
10+
const history = useHistory();
811
return (
912
<Card className="min-h-[200px] flex flex-col">
1013
<CardHeader className="flex-shrink-0">{props.title ? <h3 className="text-left">{props.title}</h3> : null}</CardHeader>
1114
<CardContent className="flex-row flex space-x-4 flex-1">
1215
<div className="flex-col flex justify-between flex-1">
1316
{props.description ? <p className="text-left text-base text-card-foreground">{props.description}</p> : null}
1417
<div className="text-left">
15-
<a href={props.link} target="_blank">
16-
<Button color="primary" className="w-full md:w-1/2">
17-
{props.text ?? "Get Started"}
18-
</Button>
19-
</a>
18+
<Button
19+
color="primary"
20+
className="w-full md:w-1/2"
21+
onClick={() => {
22+
if (isExternal) {
23+
window.open(props.link, "_blank", "noopener,noreferrer");
24+
} else {
25+
history.push(props.link);
26+
}
27+
}}
28+
>
29+
{props.text ?? "Get Started"}
30+
</Button>
2031
</div>
2132
</div>
2233

crowdsec-docs/src/css/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ html[data-theme="dark"] {
5757
}
5858

5959
/* IMAGE STYLES FOR PAGES*/
60-
.container img {
60+
main .container img:not(a img) {
6161
@apply border border-solid border-gray-300/80 dark:border-gray-300/80 rounded-lg p-2;
6262
}
6363

35.6 KB
Loading
41.9 KB
Loading

0 commit comments

Comments
 (0)