Skip to content

Commit

Permalink
docs: update docs + improve theming
Browse files Browse the repository at this point in the history
  • Loading branch information
cestef committed Jun 15, 2024
1 parent 01cc57f commit ba3056d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 8 deletions.
29 changes: 28 additions & 1 deletion docs/src/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,36 @@ In most of our examples, [ffuf.me](http://ffuf.me) will be used as the target UR
rwalk http://ffuf.me/cd/recursion common.txt -d 3
```

Should output:
```ansi
✓ 200 /cd/recursion (dir)
└─ [0;38:2:1:255:165:0m✖ 403 /admin (dir)
 └─ [0;38:2:1:255:165:0m✖ 403 /users (dir)
 └─ ✓ 200 /96 (text/html)
```
```

##### Classic mode

For this example, we will try to find any path leading to a `development.log` or `class` file.

We will create a file named `files.txt` with the following content:

```txt
development.log
class
```

Then we can run:

```ansi
rwalk http://ffuf.me/cd/W1/FILE common.txt:W1 files.txt:FILE
```

Note that the `W1` and `FILE` keys are used to reference the wordlists in the command.

Should output:
```ansi
[0;38:2:1:255:165:0m⚠ 404 /cd (dir)
├─ ✓ 200 /basic/class (text/html)
└─ ✓ 200 /basic/development.log (text/html)
```
9 changes: 8 additions & 1 deletion docs/theme/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ function playground_text(playground, hidden = true) {
langs: Object.keys(bundledLanguages),
});

console.log(`available themes: ${Object.keys(bundledThemes).join("\n")}`);

let code_nodes = Array.from(document.querySelectorAll("code"))
// Don't highlight `inline code` blocks in headers.
.filter(function (node) {
Expand Down Expand Up @@ -211,7 +213,12 @@ function playground_text(playground, hidden = true) {
}
let html = highlighter.codeToHtml(block.textContent, {
lang: block.className.split("-")[1],
themes: { light: "github-light", dark: "github-dark" },
themes: {
light: "vitesse-light",
ayu: "ayu-dark",
dark: "vitesse-dark",
navy: "poimandres",
},
defaultColor: false,
});
if (parent.tagName === "PRE") {
Expand Down
33 changes: 27 additions & 6 deletions docs/theme/head.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,44 @@
border: 1px solid #eaecef;
}
html.coal .shiki,
html.navy .shiki,
html.ayu .shiki {
border: 1px solid #2d3748;
}
html.ayu .shiki span,
html.ayu .shiki,
html.coal .shiki span,
html.coal .shiki,
html.navy .shiki span,
html.navy .shiki {
html.coal .shiki {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
/* Optional, if you also want font styles */
font-style: var(--shiki-dark-font-style) !important;
font-weight: var(--shiki-dark-font-weight) !important;
text-decoration: var(--shiki-dark-text-decoration) !important;
}
html.navy .shiki span,
html.navy .shiki {
color: var(--shiki-navy) !important;
background-color: var(--shiki-navy-bg) !important;
/* Optional, if you also want font styles */
font-style: var(--shiki-navy-font-style) !important;
font-weight: var(--shiki-navy-font-weight) !important;
text-decoration: var(--shiki-navy-text-decoration) !important;
}
html.ayu .shiki span,
html.ayu .shiki {
color: var(--shiki-ayu) !important;
background-color: var(--shiki-ayu-bg) !important;
/* Optional, if you also want font styles */
font-style: var(--shiki-ayu-font-style) !important;
font-weight: var(--shiki-ayu-font-weight) !important;
text-decoration: var(--shiki-ayu-text-decoration) !important;
}
html.light .shiki,
html.light .shiki span{
html.light .shiki span,
html.rust .shiki,
html.rust .shiki span {
color: var(--shiki-light) !important;
background-color: var(--shiki-light-bg) !important;
/* Optional, if you also want font styles */
Expand Down

0 comments on commit ba3056d

Please sign in to comment.