platformsh / platformsh-docs

Platform.sh documentation. Templates available at https://github.com/platformsh-templates/
https://docs.platform.sh/
Creative Commons Attribution Share Alike 4.0 International
101 stars 320 forks source link

[Workflow] Linkchecker improvements #3240

Open gilzow opened 11 months ago

gilzow commented 11 months ago

Where on docs.platform.sh should be changed?

Scheduled link checker

What exactly should be updated?

This is mainly for me to have a record for future updates to the schedule linkchecker.

The linkchecker application does support adding your own Logger class, so we could theoretically add a Logger class for markdown and do that instead of exporting to xml and then converting from xml --> markdown

The linkchecker application also supports a configuration file that exposes more options than the command line, one of which is the ability to ignore certain warnings. Instead of excluding github urls as we are doing now, we could instead ignore http-rate-limited which is what we're running into with GitHub. It does not have the ability to ignore 403 responses so we would still need to deal with that separately. However, we would need to figure out how to retrieve the configuration file since right now we're not checking out this repository when we run the workflow. A separate config file would also give us some flexibility in how we manage URLs we want to exclude.

While linkchecker doesnt support ignoring specific server responses, it does however support plugins, so it's possible we could write our own plugin giving us the ability to ignore certain server responses.

Additional context

No response

gilzow commented 11 months ago

Per damz we should go ahead and ignore https://support.blackfire.io/

AnouckColson commented 11 months ago

@gilzow Agreed, the Blackfire support link will keep raising false positives (cf. https://github.com/platformsh/platformsh-docs/issues/3249), so if there's a way to ignore it, that would be awesome.