Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
foo.txt
*.log
.DS_Store
dist/
dist/
.idea/
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ We use [mozilla/readability](https://github.com/mozilla/readability) to extract
sitefetch https://vite.dev --content-selector ".content"
```

### Follow domain redirects

You can opt-in to following domain redirects (e.g. from mywebsite.com to www.mywebsite.com):
```sitefetch
sitefetch https://vite.dev --follow-domain-redirects
```

### Sitemap crawler

Many websites include a special file `sitemap.xml` that lists all the pages on the website to help
search engines understand and crawl the site more efficiently. This is often done automatically for blogs,
documentation websites, and other types of sites managed through a CMS. It is usually not present for SPAs.

The sitemap crawler can be enabled through `--enable-sitemap`, although if a `sitemap.xml` is not present the site will be
crawled as normal:
```
sitefetch https://nextjs.org --enable-sitemap
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it simply be:

sitefetch https://example.com/sitemap.xml

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires that you know ahead of time if the site you're trying to crawl has a sitemap which requires making an additional request, see above comment. Happy to change it if you feel strongly about it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can just check if the input url ends with /sitemap.xml


## Plug

If you like this, please check out my LLM chat app: https://chatwise.app
Expand Down
Loading