diff options
| author | Philipp Tanlak <philipp.tanlak@gmail.com> | 2025-11-24 20:54:57 +0100 |
|---|---|---|
| committer | Philipp Tanlak <philipp.tanlak@gmail.com> | 2025-11-24 20:57:48 +0100 |
| commit | b1e2c8fd5cb5dfa46bc440a12eafaf56cd844b1c (patch) | |
| tree | 49d360fd6cbc6a2754efe93524ac47ff0fbe0f7d /content/docs/configuration/depth.md | |
Docs
Diffstat (limited to 'content/docs/configuration/depth.md')
| -rw-r--r-- | content/docs/configuration/depth.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/content/docs/configuration/depth.md b/content/docs/configuration/depth.md new file mode 100644 index 0000000..d100470 --- /dev/null +++ b/content/docs/configuration/depth.md @@ -0,0 +1,24 @@ +--- +title: 'Depth' +weight: 2 +--- + +The `depth` config option allows you to specify how deep the scraping process should follow links from the initial URL. + +When no value is provided or `depth` is set to `0` link following is disabled and it will only scrape the initial URL. + +```javascript {filename="Configuration"} +export const config = { + url: "http://example.com/", + depth: 2, + // ... +}; +``` + +With the config provided in the example the scraper would follow links like this: + +``` +http://example.com/ (depth = 0, initial URL) +↳ http://example.com/deeply (depth = 1) + ↳ http://example.com/deeply/nested (depth = 2) +``` |