Skip to content

Commit 3aeb16a

Browse files
Switch to vitepress
* Add vitepress * Move src to src-vitepress * Fix pages * Add search * Add logo * Update theme * Rename vitepress-src to src * Add analytics * Add favicon * Fix build * Remove old theme * Add build to validate workflow * Optimised images with calibre/image-actions * Update dev container * Update lock file * Remove port forward * Update container --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 401b853 commit 3aeb16a

37 files changed

+1489
-1769
lines changed

.devcontainer/devcontainer.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
{
22
"image": "mcr.microsoft.com/devcontainers/universal:2",
3-
"postStartCommand": "mdbook serve",
4-
"forwardPorts": [3000],
3+
"postCreateCommand": "npm install -g pnpm && pnpm install",
4+
"postStartCommand": "pnpm dev",
55
"features": {
6-
"ghcr.io/eitsupi/devcontainer-features/mdbook:1": {}
6+
"ghcr.io/devcontainers-contrib/features/pnpm:2": {},
7+
"ghcr.io/devcontainers-contrib/features/markdownlint-cli2:1": {}
78
},
8-
"customizations":{
9-
"vscode":{
10-
"extensions":["DavidAnson.vscode-markdownlint"]
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"DavidAnson.vscode-markdownlint",
13+
"esbenp.prettier-vscode"
14+
]
1115
}
1216
}
1317
}
14-

.github/workflows/lint.yml

-22
This file was deleted.

.github/workflows/validate.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Lint
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.md'
6+
7+
concurrency:
8+
group: lint-${{ github.ref_name }}
9+
cancel-in-progress: true
10+
11+
env:
12+
CAIDO_PNPM_VERSION: 9
13+
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v4
22+
23+
- name: Lint
24+
uses: DavidAnson/markdownlint-cli2-action@510b996878fc0d1a46c8a04ec86b06dbfba09de7 # v15
25+
with:
26+
globs: '**/*.md'
27+
28+
build:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout Repo
33+
uses: actions/checkout@v4
34+
35+
- name: Setup pnpm
36+
uses: pnpm/[email protected]
37+
with:
38+
version: ${{ env.CAIDO_PNPM_VERSION }}
39+
40+
- name: Install dependencies
41+
run: pnpm install --frozen-lockfile
42+
43+
- name: Run build
44+
run: pnpm build
45+
46+

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
book
22
bin
33
.DS_Store
4+
5+
.vitepress/dist
6+
.vitepress/cache
7+
node_modules/

.vitepress/config.mts

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Caido",
6+
titleTemplate: "Documentation",
7+
description: "Official Caido Documentation",
8+
9+
srcDir: 'src',
10+
11+
head: [
12+
['link', { rel: 'icon', href: '/favicon.png' }],
13+
["script", { "data-api": "/stats/event", src: "/stats/script.js", "defer":"", "data-domain":"docs.caido.io" }]
14+
],
15+
ignoreDeadLinks: "localhostLinks",
16+
17+
themeConfig: {
18+
logo: '/logo.png',
19+
20+
search: {
21+
provider: 'local',
22+
},
23+
24+
nav: [
25+
{ text: 'Home', link: '/' },
26+
{ text: 'Quickstart', link: '/introduction' },
27+
],
28+
29+
sidebar: [
30+
{
31+
text: 'Introduction',
32+
link: '/introduction'
33+
},
34+
{
35+
text: 'Documentation Directory',
36+
link: '/doc_directory'
37+
},
38+
{
39+
text: 'FAQ',
40+
link: '/faq'
41+
},
42+
{
43+
text: 'Common Errors',
44+
link: '/common_errors'
45+
},
46+
{
47+
text: 'Report a Bug',
48+
link: '/report_bug'
49+
},
50+
{
51+
text: "Beginner's Guide",
52+
items: [
53+
{ text: 'Welcome to Caido', items: [
54+
{ text: 'Introduction to Caido', link: '/beginner_guide/welcome_to_caido/onboarding' }
55+
]
56+
},
57+
{ text: 'Setup', items: [
58+
{ text: 'Downloading and Installing', link: '/beginner_guide/setup/install' },
59+
{ text: 'Basic Configuration', link: '/beginner_guide/setup/config' },
60+
{ text: 'Uploading Files for Use in Automate', link: '/beginner_guide/setup/file_upload' }
61+
]
62+
},
63+
{ text: 'First Steps with Caido', items: [
64+
{ text: 'Creating Your First Project', link: '/beginner_guide/first_steps_with_caido/project' },
65+
{ text: 'Capturing and Inspecting Traffic', link: '/beginner_guide/first_steps_with_caido/traffic' },
66+
{ text: 'Forwarding and Modifying Requests Repeatedly', link: '/beginner_guide/first_steps_with_caido/replay' },
67+
{ text: 'Automating Brute-Forcing/Fuzzing', link: '/beginner_guide/first_steps_with_caido/automate' }
68+
]
69+
},
70+
{ text: 'Support', items: [
71+
{ text: 'Common Errors and Solutions', link: '/beginner_guide/getting_help/support' }
72+
]
73+
}
74+
]
75+
},
76+
{
77+
text: 'User Guide',
78+
items: [
79+
{ text: 'Installation', link: '/user_guide/installation' },
80+
{ text: 'Running on a VPS', link: '/user_guide/vps' },
81+
{ text: 'Running in Docker', link: '/user_guide/docker' }
82+
]
83+
},
84+
{
85+
text: 'Configuration',
86+
items: [
87+
{ text: 'Listening Address/Port', link: '/configuration/listening_address' },
88+
{ text: 'CA Certificate', link: '/configuration/import_ca_certificate' },
89+
{ text: 'Data Location', link: '/configuration/data_location' }
90+
]
91+
},
92+
{
93+
text: 'Show Case',
94+
items: [
95+
{ text: 'Overviews', link: '/show_case/overviews' },
96+
{ text: 'Interviews', link: '/show_case/interviews' },
97+
{ text: 'Tutorials', link: '/show_case/tutorials' }
98+
]
99+
},
100+
{
101+
text: 'Concepts',
102+
items: [
103+
{ text: 'Instances', link: '/concepts/instances' },
104+
{ text: 'HTTPQL', link: '/concepts/httpql' },
105+
{ text: 'Workflows', link: '/concepts/workflows', items: [
106+
{ text: 'Nodes', link: '/concepts/nodes' }
107+
]
108+
},
109+
{ text: 'Tabs', link: '/concepts/tabs' },
110+
{ text: 'Layout', link: '/concepts/layout' }
111+
]
112+
},
113+
{
114+
text: 'Features',
115+
items: [
116+
{ text: 'Overview', items: [
117+
{ text: 'Sitemap', link: '/features/overview/sitemap' },
118+
{ text: 'Scope', link: '/features/overview/scope' },
119+
{ text: 'Filters', link: '/features/overview/filters' }
120+
]
121+
},
122+
{ text: 'Proxy', items: [
123+
{ text: 'Intercept', link: '/features/proxy/intercept' },
124+
{ text: 'HTTP History', link: '/features/proxy/http_history' },
125+
{ text: 'WS History', link: '/features/proxy/ws_history' },
126+
{ text: 'Match & Replace', link: '/features/proxy/match_replace' }
127+
]
128+
},
129+
{ text: 'Testing', items: [
130+
{ text: 'Replay', link: '/features/testing/replay' },
131+
{ text: 'Automate', link: '/features/testing/automate' },
132+
{ text: 'Assistant', link: '/features/testing/assistant' },
133+
{ text: 'Workflows', link: '/features/testing/workflows', items: [
134+
{ text: 'Passive', link: '/features/testing/workflows/passive' },
135+
{ text: 'Convert', link: '/features/testing/workflows/convert' }
136+
]
137+
}
138+
]
139+
},
140+
{ text: 'Logging', items: [
141+
{ text: 'Search', link: '/features/logging/search' },
142+
{ text: 'Exports', link: '/features/logging/exports' }
143+
]
144+
},
145+
{ text: 'Workspace', items: [
146+
{ text: 'Files', link: '/features/workspace/files' },
147+
{ text: 'Projects', link: '/features/workspace/projects' },
148+
{ text: 'Backups', link: '/features/workspace/backups' }
149+
]
150+
}
151+
]
152+
},
153+
{
154+
text: 'Plugins',
155+
items: [
156+
{ text: 'Custom CSS', link: '/plugins/custom_css' },
157+
{ text: '(WIP) Custom JS', link: '/plugins/custom_js' },
158+
{ text: '(WIP) Custom Workflow Nodes', link: '/plugins/custom_workflow_nodes' }
159+
]
160+
},
161+
{
162+
text: 'Internals',
163+
items: [
164+
{ text: 'Files', link: '/internals/files' },
165+
{ text: 'Cloud', link: '/internals/cloud' },
166+
{ text: 'Authentication', link: '/internals/authentication' }
167+
]
168+
},
169+
{
170+
text: 'Community Contributions',
171+
link: '/contributions/documentation'
172+
}
173+
],
174+
175+
socialLinks: [
176+
{ icon: 'discord', link: 'https://links.caido.io/discord' },
177+
{ icon: 'twitter', link: 'https://twitter.com/caidoio' },
178+
{ icon: 'github', link: 'https://github.com/caido/caido' },
179+
]
180+
}
181+
})

.vitepress/theme/custom.css

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:root {
2+
--vp-c-brand-1: #daa04a;
3+
--vp-c-brand-2: #df3259;
4+
--vp-c-brand-3: #a0213e;
5+
6+
--vp-button-brand-active-bg: var(--vp-c-brand-3);
7+
}

.vitepress/theme/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
3+
4+
export default DefaultTheme

Makefile

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
MDBOOK_VERSION = 0.4.37
22

3-
build:
4-
mdbook build
5-
6-
run:
7-
mdbook serve
8-
93
lint:
10-
markdownlint-cli2 "**/*.md"
4+
pnpm lint
115

126
build-release:
13-
./bin/mdbook build
14-
15-
download-mdbook:
16-
mkdir -p bin
17-
curl -L https://github.com/rust-lang/mdBook/releases/download/v$(MDBOOK_VERSION)/mdbook-v$(MDBOOK_VERSION)-x86_64-unknown-linux-musl.tar.gz | tar xvz -C ./bin
18-
chmod +x ./bin/mdbook
7+
pnpm build
198

209
download-linter:
2110
npm install markdownlint-cli2 --global

book.toml

-18
This file was deleted.

package.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "documentation",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "vitepress dev",
8+
"build": "vitepress build",
9+
"preview": "vitepress preview",
10+
"lint": "markdownlint-cli2 src/**/*.md"
11+
},
12+
"keywords": [],
13+
"author": "",
14+
"license": "ISC",
15+
"devDependencies": {
16+
"vitepress": "^1.2.2"
17+
}
18+
}

0 commit comments

Comments
 (0)