Skip to content

Following up on Davide's suggestion for fixing link checks#42

Merged
chrisb13 merged 10 commits into
mainfrom
fix-link-checking-and-ci
Jun 15, 2026
Merged

Following up on Davide's suggestion for fixing link checks#42
chrisb13 merged 10 commits into
mainfrom
fix-link-checking-and-ci

Conversation

@chrisb13

Copy link
Copy Markdown
Collaborator

@chrisb13

Copy link
Copy Markdown
Collaborator Author

@atteggiani on this point

@_Davide Marchegiani|784244 said:

For the errors on the marshallward websites (`https://www.marshallward.org/fortrancon2021/#/title-slide` etc.), those errors arise because there is a hash in the URL that the link checker thinks stands for a URL fragment, but it's not because the page is a presentation slide. Those pages should be added to a lychee-ignore.

I suggest you copy [this lychee_config.toml](https://github.com/ACCESS-NRI/documentation-infra/blob/main/.github/workflows/lychee_config.toml) to your website and add custom websites in the [exclude portion](https://github.com/ACCESS-NRI/documentation-infra/blob/00a0f248f1c18538bc4ff2adfedb5c149a5c61a7/.github/workflows/lychee_config.toml#L90).
You will also need to specify the path where you copy the `lychee_config.toml` in your [check_links.yaml](https://github.com/ACCESS-Community-Hub/decoding-om3/blob/fed714d09a84aabb7f31cbfff9add61be8d4d9b6/.github/workflows/check_links.yml#L25) workflow.

Okay, so I added the lychee_config.toml and Marshall website to it:

'^https://www.marshallward.org', # Often gives this error for the slide deck links: Cannot find fragment: Fragment not found in document. Check if fragment exists or page structure

lychee_config: './lychee_config.toml' # MODIFY: Uncomment to add lychee config path. If not included, the one from the ACCESS-NRI/documentation-infra repo gets used.

here?

(This relative path link doesn't work.)

@chrisb13

chrisb13 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

Ok, so I think i've done the changes you suggested. @atteggiani, can you please have a glance at the remaining ones:

Details ### Errors in /home/runner/work/decoding-om3/decoding-om3/docs_folder/404.html

Error: * [ERROR] error: | Error building URL for "/." (Attribute: Some("href")): Cannot convert path '/.' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/." (Attribute: Some("href")): Cannot convert path '/.' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/." (Attribute: Some("href")): Cannot convert path '/.' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/AOMSS_Lecture_Notes/" (Attribute: Some("href")): Cannot convert path '/AOMSS_Lecture_Notes/' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/assets/ACCESS_icon_HIVE.png" (Attribute: Some("href")): Cannot convert path '/assets/ACCESS_icon_HIVE.png' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/assets/ACCESS_icon_HIVE.png" (Attribute: Some("src")): Cannot convert path '/assets/ACCESS_icon_HIVE.png' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/assets/ACCESS_icon_HIVE.png" (Attribute: Some("src")): Cannot convert path '/assets/ACCESS_icon_HIVE.png' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/assets/stylesheets/main.4af4bdda.min.css" (Attribute: Some("href")): Cannot convert path '/assets/stylesheets/main.4af4bdda.min.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/assets/stylesheets/palette.06af60db.min.css" (Attribute: Some("href")): Cannot convert path '/assets/stylesheets/palette.06af60db.min.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/css/custom.css" (Attribute: Some("href")): Cannot convert path '/css/custom.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/fontello/css/fontello-codes.css" (Attribute: Some("href")): Cannot convert path '/fontello/css/fontello-codes.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/fontello/css/fontello-ie7-codes.css" (Attribute: Some("href")): Cannot convert path '/fontello/css/fontello-ie7-codes.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/fontello/css/fontello-ie7.css" (Attribute: Some("href")): Cannot convert path '/fontello/css/fontello-ie7.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/fontello/css/fontello.css" (Attribute: Some("href")): Cannot convert path '/fontello/css/fontello.css' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/season1/" (Attribute: Some("href")): Cannot convert path '/season1/' to a URI: To resolve root-relative links in local files, provide a root dir
Error: * [ERROR] error: | Error building URL for "/season2/" (Attribute: Some("href")): Cannot convert path '/season2/' to a URI: To resolve root-relative links in local files, provide a root dir

Any suggestions? I think these are the ones you thought might be trickier?

@atteggiani

atteggiani commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

From the link checker summary I can see there are still errors in the /home/runner/work/decoding-om3/decoding-om3/docs_folder/season1/index.html file (that corresponds to the season1 page):

  • The Github link https://github.com/ACCESS-NRI/access-spack-packages/blob/main/packages/access-om3/package.py seems to be broken, so it needs fixing
  • The links to the https://www.marshallward.org/ website are still being picked up, so the lychee-config is not being read properly:
    • # lychee_config: './lychee_config.toml' # MODIFY: Uncomment to add lychee config path. If not included, the one from the ACCESS-NRI/documentation-infra repo gets used.

      should be uncommented and updated to:
      lychee_config: './.github/workflows/lychee_config.toml' 

For the errors in the 404.html file, please disregard them for the moment.
I'm not sure why they are happening.

They might be related to the resolve-absolute-urls plugin not being run at build time, but I'm not yet sure why that is happening.

@chrisb13

chrisb13 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @atteggiani

  • The Github link https://github.com/ACCESS-NRI/access-spack-packages/blob/main/packages/access-om3/package.py seems to be broken, so it needs fixing

Good spot. Now fixed (the path has changed in more recent access-spack-packages) in 513dba2.

I think the 16 remaining errors are all associated with /home/runner/work/decoding-om3/decoding-om3/docs_folder/404.html. Of course if you think of a fix for the remaining 16 then feel free to implement.

Happy to merge then @atteggiani?

@chrisb13 chrisb13 marked this pull request as ready for review June 15, 2026 05:21
@chrisb13 chrisb13 self-assigned this Jun 15, 2026
@chrisb13 chrisb13 requested a review from atteggiani June 15, 2026 05:22
atteggiani
atteggiani previously approved these changes Jun 15, 2026

@atteggiani atteggiani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

Just a minor suggestion for the lychee config.

Feel free to merge after updating it.

Comment thread .github/workflows/lychee_config.toml Outdated
Co-authored-by: Davide Marchegiani <davide.marchegiani@gmail.com>
@chrisb13 chrisb13 merged commit 8400970 into main Jun 15, 2026
3 of 4 checks passed
@chrisb13 chrisb13 deleted the fix-link-checking-and-ci branch June 15, 2026 05:58
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