HiDeoo / starlight-links-validator

Starlight plugin to validate internal links
https://starlight-links-validator.vercel.app
MIT License
62 stars 5 forks source link

Ability to use outside of starlight #28

Closed steveoh closed 10 months ago

steveoh commented 10 months ago

Is your feature request related to a problem?

https://github.com/withastro/roadmap/discussions/739

Describe the solution you'd like

I would like internal link checking to be opt in with all astro websites and external links made available somehow so we could check their response codes.

Describe alternatives you've considered

nothing available at the moment during build time.

Additional Context

I have a discussion item open with astro but it has zero traction.

HiDeoo commented 10 months ago

Thanks for your feedback.

This validator is a Starlight plugin as it relies on the Starlight plugin API to get Starlight specific configuration informations to provide a better validation experience, specifically around the i18n features of Starlight. Such values are not available in contexts outside of the Starlight plugin API so some features will not be available if the validator was more generic.

I think a more generic validator for Astro (and no Starlight) could totally exists as an Astro integration, this does not have to be a part of Astro itself. It could even validate external links too like you mentioned (which is something I am not interested in doing in this validator).

steveoh commented 10 months ago

Would you mind sharing some of your knowledge on the subject and how it could be achieved as an integration in this discussion? https://github.com/withastro/roadmap/discussions/739

HiDeoo commented 10 months ago

Here are the few points I can think of that could help you to get started: