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

REFACTOR: Improve performance and add support for HTML Links #22

Merged
merged 5 commits into from
Apr 30, 2024

Conversation

carbontwelve
Copy link
Contributor

This PR does two things:

  • refactored the global computed value so that it computes each files outbound links and while doing so populates the backlinks array of pages found linking to. This reduces an expensive loop over all pages for each page the backlinks was being computed for
  • added HTML link parser and test fixture running 11ty programatically so see the added functionality working in situ

... this has the same interface as the wikilink parser and makes the plugin aware of internal href links.
... this is because the computed value is executed for each file that 11ty parses and instead of looping over all files for _each_ file, it can populate the backlinks of files being linked to.

Removal of this loop on each file should speed up the plugin when used in large projects.
... this tests both the wikilink parsing and the html link parsing.
@carbontwelve carbontwelve merged commit 6406f6e into v1.1.0 Apr 30, 2024
@carbontwelve carbontwelve deleted the patch/enhanced-testing branch April 30, 2024 17:44
@carbontwelve carbontwelve mentioned this pull request May 2, 2024
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.

1 participant