Skip to content

Commit

Permalink
Docusarus v3 upgrade (#489)
Browse files Browse the repository at this point in the history
* A mess

* Push temporary build fix

* Fix some docs

* NO BROKEN LINKS!!

* Audit update

* Remove unused deps

* Fixed no legacy deps required

* Fix code blocks copy with https:// in them

* Prism has changed to include format only, adding to config

* Set resizable column to false

* no need to inject react anymore

* Readd details

* Fix diff

* Fix diff

* Fix diff

* Fix diff

* Fix diff
  • Loading branch information
LaurenceJJones authored Nov 6, 2023
1 parent 7b566f9 commit 470ab5e
Show file tree
Hide file tree
Showing 60 changed files with 10,126 additions and 20,713 deletions.
2 changes: 1 addition & 1 deletion crowdsec-docs/blog/2020-08-04-crowdsec_firewall_freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ crowdsec-cli machines list
sudo cp /usr/local/etc/crowdsec-firewall-bouncer/crowdsec-firewall-bouncer.yaml.sample /usr/local/etc/crowdsec-firewall-bouncer/crowdsec-firewall-bouncer.yaml
```

* Add the new bouncer and it will generate the token for <your_api_key> to use
* Add the new bouncer and it will generate the token for `{your_api_key}` to use

```
crowdsec-cli bouncers add --name freebsd-pf-bouncer
Expand Down
6 changes: 5 additions & 1 deletion crowdsec-docs/docs/bouncers/misp-feed-generator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ Whether the feed is published or not. Refer to [MISP docs](https://github.com/MI

### `misp_feed_tags`

The tags to be added to the events generated by the feed. Refer to [MISP docs](https://github.com/MISP/misp-rfc/blob/243bec4f5b7c42f5c450c71b092032f431b56f25/misp-core-format/raw.md.txt#L1715). Example value: [{"exportable": true,"colour": "#ffffff","name": "tlp:white","id": "2" }]
The tags to be added to the events generated by the feed. Refer to [MISP docs](https://github.com/MISP/misp-rfc/blob/243bec4f5b7c42f5c450c71b092032f431b56f25/misp-core-format/raw.md.txt#L1715).

```bash title="Example Value"
[{"exportable": true,"colour": "#ffffff","name": "tlp:white","id": "2" }]
```

output_dir: ./crowdsec-misp-feed/

Expand Down
2 changes: 1 addition & 1 deletion crowdsec-docs/docs/cscli/cscli_decisions_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Import decisions from a file or pipe

expected format:
csv : any of duration,reason,scope,type,value, with a header line
json : {"duration" : "24h", "reason" : "my_scenario", "scope" : "ip", "type" : "ban", "value" : "x.y.z.z"}
json : `{"duration" : "24h", "reason" : "my_scenario", "scope" : "ip", "type" : "ban", "value" : "x.y.z.z"}`

```
cscli decisions import [options] [flags]
Expand Down
2 changes: 1 addition & 1 deletion crowdsec-docs/docs/cti_api/integration_misp.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Install the fork via by following instructions given [here](https://github.com/M

### Configure the plugin

1. Navigate to plugin settings page at http://<your_misp_address>/servers/serverSettings/Plugin
1. Navigate to plugin settings page at `http://<your_misp_address>/servers/serverSettings/Plugin`

2. Click on Enrichment.

Expand Down
4 changes: 2 additions & 2 deletions crowdsec-docs/docs/expr/cti_helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Returns the background noise score associated to the given IP, from a scale of 0

#### `SmokeItem.GetBehaviors() []string`

Returns the list of [behaviors](/docs/next/cti_api/taxonomy#behaviors) associated to the IP. The list of behaviors is derived from the scenarios the IP triggered.
Returns the list of [behaviors](/cti_api/taxonomy/behaviors.mdx) associated to the IP. The list of behaviors is derived from the scenarios the IP triggered.

#### `SmokeItem.GetFalsePositives() []string`

Returns the list of eventual [false positive categories](/docs/next/cti_api/taxonomy#false-positives) associatted to the IP.
Returns the list of eventual [false positive categories](/cti_api/taxonomy/false_positives.mdx) associatted to the IP.

#### `SmokeItem.GetMaliciousnessScore() float32`

Expand Down
22 changes: 16 additions & 6 deletions crowdsec-docs/docs/getting_started/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,37 @@ While `curl | sudo bash` can be convenient for some, [alternative installation m
{label: 'CloudLinux', value: 'cloudlinux'},
]}>
<TabItem value="debian">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
```
</TabItem>

<TabItem value="centos7">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash
```
</TabItem>

<TabItem value="centos8">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash
```
</TabItem>

<TabItem value="amz">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash
```
</TabItem>

<TabItem value="openwrt">
OpenWRT packages are available in the official repositories.
</TabItem>

<TabItem value="cloudlinux">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | os=el dist=7 sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | os=el dist=7 sudo bash
```
</TabItem>
</Tabs>

Expand Down Expand Up @@ -96,7 +106,7 @@ Before installing the package, you might want to check [the ports that will be u
</TabItem>
</Tabs>

You now have the Security Engine running ! You can move forward and install a [remediation component](/bouncers/intro.md), or take a [tour](/getting_started/crowdsec_tour.md) of the software beforehand !
You now have the Security Engine running ! You can move forward and install a [remediation component](/bouncers/intro.md), or take a [tour](/getting_started/crowdsec_tour.mdx) of the software beforehand !

Directories:

Expand Down
2 changes: 1 addition & 1 deletion crowdsec-docs/docs/getting_started/install_freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You need to deploy a [bouncer](/bouncers/intro.md) to "apply" decisions.
:::


If all this sounds confusing, it might be a good moment to take a [tour](/getting_started/crowdsec_tour.md) of the software before continuing.
If all this sounds confusing, it might be a good moment to take a [tour](/getting_started/crowdsec_tour.mdx) of the software before continuing.

## Installing the firewall remediation component

Expand Down
2 changes: 1 addition & 1 deletion crowdsec-docs/docs/notification_plugins/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Required. Name of this config eg "slackreport". This should match with register

#### `format` :

Required. [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects. The go templates provide additional directives provide by [sprig](https://masterminds.github.io/sprig/) . eg "Received {{.len}} alerts"
Required. [go template](https://pkg.go.dev/text/template), which is fed a list of [Alert](https://pkg.go.dev/github.com/crowdsecurity/crowdsec@master/pkg/models#Alert) objects. The go templates provide additional directives provide by [sprig](https://masterminds.github.io/sprig/) . eg "Received ``{{.len}}`` alerts"

#### `group_wait` :

Expand Down
2 changes: 1 addition & 1 deletion crowdsec-docs/docs/parsers/patterns-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 10
# Patterns documentation

You will find here a generated documentation of all the patterns loaded by crowdsec.
They are sorted by pattern length, and are meant to be used in parsers, in the form %{PATTERN_NAME}.
They are sorted by pattern length, and are meant to be used in parsers, in the form `%{PATTERN_NAME}`.


## MONGO3_SEVERITY
Expand Down
31 changes: 20 additions & 11 deletions crowdsec-docs/docs/preview/preview_crowdsec_linux.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ sidebar_position: 1
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
const current = `1.5.0~rc4`; // change this to update current preview

:::warning
Before upgrading an installation, ensure you make a backup of your configuration files you can follow our guide [here](backup_guide/)
Expand Down Expand Up @@ -36,23 +35,33 @@ While `curl | sudo bash` can be convenient for some, [alternative installation m
{label: 'CloudLinux', value: 'cloudlinux'},
]}>
<TabItem value="debian">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.deb.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.deb.sh | sudo bash
```
</TabItem>

<TabItem value="centos7">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | sudo bash
```
</TabItem>

<TabItem value="centos8">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | sudo bash
```
</TabItem>

<TabItem value="amz">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | sudo bash
```
</TabItem>

<TabItem value="cloudlinux">
<CodeBlock className="language-bash">curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | os=el dist=7 sudo bash</CodeBlock>
```bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec-preview/script.rpm.sh | os=el dist=7 sudo bash
```
</TabItem>
</Tabs>

Expand All @@ -71,23 +80,23 @@ While `curl | sudo bash` can be convenient for some, [alternative installation m
{label: 'CloudLinux', value: 'cloudlinux'},
]}>
<TabItem value="debian">
<CodeBlock className="language-bash">apt install crowdsec={current}</CodeBlock>
<CodeBlock className="language-bash">apt install crowdsec=1.5.0~rc4</CodeBlock>
</TabItem>

<TabItem value="centos7">
<CodeBlock className="language-bash">yum install crowdsec-{current}</CodeBlock>
<CodeBlock className="language-bash">yum install crowdsec-1.5.0~rc4</CodeBlock>
</TabItem>

<TabItem value="centos8">
<CodeBlock className="language-bash">dnf install crowdse-{current}</CodeBlock>
<CodeBlock className="language-bash">dnf install crowdse-1.5.0~rc4</CodeBlock>
</TabItem>

<TabItem value="amz">
<CodeBlock className="language-bash">yum install crowdsec-{current}</CodeBlock>
<CodeBlock className="language-bash">yum install crowdsec-1.5.0~rc4</CodeBlock>
</TabItem>

<TabItem value="cloudlinux">
<CodeBlock className="language-bash">yum install crowdsec-{current}</CodeBlock>
<CodeBlock className="language-bash">yum install crowdsec-1.5.0~rc4</CodeBlock>
</TabItem>
</Tabs>

Expand Down
11 changes: 5 additions & 6 deletions crowdsec-docs/docs/preview/rollback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: Rollback to previous version
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
const currentRollback = `v1.4.6`

:::warning
We have tested upgrading and downgrading multiple times over our internal testng period, however, we cannot ensure every edge case has been covered if you value your data before upgrading ensure you follow our [backup guide](backup_guide)
Expand All @@ -25,31 +24,31 @@ If you want to rollback to a previous version of the security engine, you can do
]}>
<TabItem value="debian">
<CodeBlock className="language-bash">
apt install crowdsec={currentRollback}
apt install crowdsec=v1.4.6
</CodeBlock>
</TabItem>

<TabItem value="centos7">
<CodeBlock className="language-bash">
yum install crowdsec-{currentRollback}
yum install crowdsec-v1.4.6
</CodeBlock>
</TabItem>

<TabItem value="centos8">
<CodeBlock className="language-bash">
dnf install crowdse-{currentRollback}
dnf install crowdse-v1.4.6
</CodeBlock>
</TabItem>

<TabItem value="amz">
<CodeBlock className="language-bash">
yum install crowdsec-{currentRollback}
yum install crowdsec-v1.4.6
</CodeBlock>
</TabItem>

<TabItem value="cloudlinux">
<CodeBlock className="language-bash">
yum install crowdsec-{currentRollback}
yum install crowdsec-v1.4.6
</CodeBlock>
</TabItem>
</Tabs>
2 changes: 1 addition & 1 deletion crowdsec-docs/docs/user_guides/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The wizard is going to guide you through the following steps :

The process should take less than a minute, [please report if there are any issues](https://github.com/crowdsecurity/crowdsec/issues).

You are then ready to [take a tour](/getting_started/crowdsec_tour.md) of your freshly deployed CrowdSec !
You are then ready to [take a tour](/getting_started/crowdsec_tour.mdx) of your freshly deployed CrowdSec !

:::info

Expand Down
15 changes: 11 additions & 4 deletions crowdsec-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const { themes } = require('prism-react-renderer');

const path = require('path')

Expand All @@ -14,6 +13,13 @@ module.exports = {
favicon: 'img/crowdsec_no_txt.png',
organizationName: 'CrowdSec',
projectName: 'crowdsec-docs',
markdown: {
mdx1Compat: {
comments: true,
admonitions: true,
headingIds: true,
},
},
//plugins: [path.resolve(__dirname, 'plugins', 'matomo')],
stylesheets: [
{
Expand Down Expand Up @@ -158,8 +164,9 @@ module.exports = {
copyright: `Copyright © ${new Date().getFullYear()} CrowdSec`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: themes.github,
darkTheme: themes.dracula,
additionalLanguages: ['bash', 'yaml', 'json'],
},
},
presets: [
Expand Down
Loading

0 comments on commit 470ab5e

Please sign in to comment.