Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] exclude CUSTOMIZE.md in broken link check workflow #3054

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fedebotu
Copy link

As per the title, we should exclude CUSTOMIZE.md in the broken link check workflow.

If something was deleted from _pages, _posts, _projects etc (in my case, I deleted the dropdown.md), then the link-checker workflow would fail since it checks these template links from the CUSTOMIZE.md file. Since the latter only contains instructions, we can exclude it from the link checker :)

Copy link

netlify bot commented Mar 11, 2025

Deploy Preview for relaxed-lollipop-b6bc17 ready!

Name Link
🔨 Latest commit a838157
🔍 Latest deploy log https://app.netlify.com/sites/relaxed-lollipop-b6bc17/deploys/67cfb0bc9b32800008c91081
😎 Deploy Preview https://deploy-preview-3054--relaxed-lollipop-b6bc17.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@george-gca
Copy link
Collaborator

I am not sure if this is the best solution. I understand what you are saying, but this check in CUSTOMIZE.md also helps us make sure that our documentation points to the right places. I only removed README.md because it points to a lot of outside links that might not exist anymore. I think the best solution might be for you to also exclude CUSTOMIZE.md.

@fedebotu
Copy link
Author

but this check in CUSTOMIZE.md also helps us make sure that our documentation points to the right places

I see what you mean. However, since CUSTOMIZE.md is part of the documentation, it has to be checked only by the upstream repo alshedivat/al-folio/, while users don't need such checks, right?

I think the best solution might be for you to also exclude CUSTOMIZE.md.

So you are saying that my proposed change (excluding the file) is fine? Perhaps I didn't fully get your point 👀

@george-gca
Copy link
Collaborator

I see what you mean. However, since CUSTOMIZE.md is part of the documentation, it has to be checked only by the upstream repo alshedivat/al-folio/, while users don't need such checks, right?

Right, but I am not sure if we can do something to enable this only for the main repo.

So you are saying that my proposed change (excluding the file) is fine? Perhaps I didn't fully get your point 👀

I think that in your repo you should exclude the CUSTOMIZE.md file, and we should skip this PR. Unless there is some solution to check for these files only on our repo.

Maybe we should create a different check broken links that would run only on the main repo? Since this check is useful for the user when it is referencing files locally. What do you think?

@thoklei
Copy link

thoklei commented Mar 29, 2025

This may be overkill, but wouldn't it be better to check the final site itself instead of just the files? In my fork, I've changed the workflow to build the whole thing, serve it locally, and run lychee against the served website. This takes a minute, but has the advantage that I don't need to exclude anything, and all internal links and constructed links like those to social media are checked properly as well. This seems like a cleaner solution. Happy to share how I did it, if there is interest.

@george-gca
Copy link
Collaborator

We already have this check in our repo in .github/workflows/broken-links-site.yml. What I think it is best is to only enable this check if this is the main repo. Instead of adding CUSTOMIZE.md to the ignore, add this as a condition:

if: github.repository_owner == 'alshedivat'

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.

3 participants