Hostwiki / wikijs-sitemap

Sitemap for Wiki.js
MIT License
11 stars 2 forks source link

Feature Request: Blacklists #11

Open imp1sh opened 8 months ago

imp1sh commented 8 months ago

In wikijs you can set fine grained privileges for sites and paths. When there are pages that cannot be seen by the public but only by authorized personel, they still appear in the sitemap.xml. Please offer a environment variable that carries a list of paths that won't appear in the sitemap.

Philipinho commented 8 months ago

I will create time to work on this. PRs are welcomed too.

Philipinho commented 6 months ago

What do you think of tag-based exclusion? I suggest implementing an environment variable that specifies tags for exclusion.

For instance, if you want to exclude pages marked as private or secret, you would set EXCLUDED_TAGS=private, secret in the environment variable. Then, simply tag any new pages you don't want indexed with private or secret to automatically exclude them from the sitemap.

This method seems more clearer and easier to manage compared to editing paths, as it eliminates the need to update the environment variable each time you create new pages.

imp1sh commented 6 months ago

Usually it's not single pages that are set to private but paths. I'd much rather see an environment variable (list) where the user can set paths that should not be included in the sitemap.xml.

Philipinho commented 6 months ago

If we have EXCLUDED_PATHS=/path/to/marketing, should it exclude all pages down the path? For example /path/to/marketing/sales/schedule is excluded too because it is under marketing.

imp1sh commented 6 months ago

If you'd ask me I'd say yes, block everything below a given path, except when there are whitelists that allow it (override). Like it is handled in robots.txt.

Philipinho commented 6 months ago

I will work on the EXCLUDED_PATHS option soon. Thank you for your input.