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

feat: add graph search to check for broken links #145

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

nickwynja
Copy link
Contributor

This feature runs a link search against all files in the wiki and opens a loclist with any wiki links that point to non-existing files. It's good to check for broken links after a migration or to check if any red links need to be updated.

@lervag
Copy link
Owner

lervag commented Apr 19, 2021

Nice! I was just about to shut down and go to bed, so I'll review tomorrow. But I have actually been planning this feature for a long time, but never got around to it. Thanks!

@lervag lervag merged commit cd57635 into lervag:master Apr 20, 2021
@lervag
Copy link
Owner

lervag commented Apr 20, 2021

Thanks! I've made some minor adjustments, but this was a very high quality contribution! Much appreciated!

@lervag
Copy link
Owner

lervag commented Apr 20, 2021

Also, perhaps it should be added to the docs that this command can be slow? In my wiki of ~4500 files and 209000 lines of text, it took perhaps 45 seconds.

@nickwynja
Copy link
Contributor Author

Thanks! The code base is set up nicely so that helped with getting a good PR in. I'm happy to add some documentation about the slow processing. I was also starting to look at adding caching like the backlinks graph but that seemed a bit overcomplicated since this likely wouldn't be as frequent of a command as checking backlinks.

@nickwynja nickwynja deleted the red-links branch April 20, 2021 20:58
@lervag
Copy link
Owner

lervag commented Apr 20, 2021

Yes, great, that would be appreciated. I don't think it is necessary to optimize this part, really; I would say it is something one should not need to run often, and it is not a large drawback that it can be somewhat slow. Most people probably has a much smaller set of files than myself, so it should be faster. I guess.

I've already used this now to fix ~800 broken links :)

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