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

Check command global #683

Merged
merged 5 commits into from
May 27, 2019
Merged

Check command global #683

merged 5 commits into from
May 27, 2019

Conversation

marcusklaas
Copy link
Contributor

@marcusklaas marcusklaas commented May 16, 2019

This is take two of #663. Instead of checking links at a page level, they are all gathered and then checked asynchronously.

Testing this was hard. I replaced the site level tests by a test ensuring that the right links are collected, but wasn't quite sure how to do the link check testing at a site level. Would be very grateful for any pointers in this area!

Dead link errors look this now:

marcusklaas@localhost ~/fully_faithful_eu> zola check
Checking site...
Failed to check the site
Error: Dead link in /home/marcusklaas/fully_faithful_eu/content/fantasy-league-data.md to ../fantasy-league-introduction: relative URL without a base
Dead link in /home/marcusklaas/fully_faithful_eu/content/pulldown-cmark.md to https://githudb.com/raphlinus/pulldown-cmark: error trying to connect

Doing a site check takes 2.8 seconds compared to a 7.5 second site build on zola 0.6.


IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.

The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

@marcusklaas marcusklaas mentioned this pull request May 16, 2019
3 tasks
@marcusklaas
Copy link
Contributor Author

Oh, and syntax highlighting is now disabled for the check command!

@Keats
Copy link
Collaborator

Keats commented May 20, 2019

The code itself looks good!

The only thing is that I'm thinking it should be enhanced to check for the internal links (with anchors)/relative links as well. There is an upcoming change to internal links (#686), I'll update this PR myself afterwards if necessary

@Keats Keats merged commit 0d96420 into getzola:next May 27, 2019
@Keats
Copy link
Collaborator

Keats commented May 27, 2019

I'm not sure how to test that either to be honest :/ I have seen a couple of things to change after trying it locally but no need to hold up the merge

@Keats
Copy link
Collaborator

Keats commented May 27, 2019

The only thing is that it looks like you forgot to push a commit formatting the output to the console? It doesn't have the link and the uses {:?} for the result.

@marcusklaas
Copy link
Contributor Author

You're absolutely right. I forgot to push that commit. I'll open a new PR for it.

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