Skip to content

Conversation

@DanilaFe
Copy link
Contributor

@DanilaFe DanilaFe commented Sep 29, 2025

This PR builds on https://github.com/chapel-lang/chapel-blog/pull/281 to insert documentation links. In this PR, I do the following things:

  • Write a new script, check_doc_links.py, which validates the links in the cache. In particular, it loads the pages and tries to find the corresponding fragment of the page.
  • Make adjustments to insert_links.py to avoid emitting links that go nowhere (caught by check_doc_links.py). In some cases this is due to custom wrangling that we do.
  • Use the updated insert_links.py to generate an initial set of links-to-insert.
  • Adjust the CSS to look better.
image

To address some of @bradcray's concerns, this PR also adds a CI check to verify that links in the link cache are valid.

@bradcray
Copy link
Member

@DanilaFe : Q: How hard would it be to make the links to the docs be relative rather than absolute? Wondering from the perspectives of:

  • testing when the website's down (doesn't happen often, but is biting me today)
  • having the link checking potentially be done completely locally without involving a web server
  • permitting the ability to changes to docs and/or blogs before pushing docs changes to the live site

@DanilaFe
Copy link
Contributor Author

DanilaFe commented Nov 3, 2025

It should be pretty easy. Right now, I have logic that hardcodes the chapel-lang.org URL, but I'm sure I can adjust it for a predefined relative path like ../../. For local link checking, though, not sure if just switching to relative paths would be enough. Probably need to make the link checker script be aware that we are using file:// URLs.

@bradcray
Copy link
Member

bradcray commented Nov 3, 2025

I'm pretty sure some of the desktop-based link checkers I've used will make sure that an <a href = "../../foo/bar.html"> link is valid, complaining if it's not. I can double-check, though.

@bradcray
Copy link
Member

bradcray commented Nov 3, 2025

Oh wait, I'm realizing you're probably talking about the link checking you've set up, not a more general link-checking script…?

@DanilaFe
Copy link
Contributor Author

DanilaFe commented Nov 3, 2025

Yes, I'm referring to the link checking script I'm checking in with this PR (and which would run with CI after this PR merges)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants