Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature is introduced due to perf cost of the
external_link
filter. When use in renderer, it can be applied directly to links, instead of a filter which has to first parse the whole site content to look for links.To take advantage of the perf improvement,
external_link:
of the site config needs to be disabled.Configuration:
Some notes:
[]()
markdown syntax, not raw<a>
.external_link
as that works on<a>
element, not markdown.external_link
applies to every<a>
regardless the source is raw<a>
or[]()
(that is later rendered as<a>
)external_link
config, separate from theexternal_link
site config.external_link
, meaning both hexo and this renderer'sexternal_link
can be enabled at the same time. hexo'sexternal_link
does avoid duplicate attributes.isExternalLink
could not be used here as that utility uses site config (i.e.external_link
site config), whereas this plugin has its ownexternal_link
config.Ref: hexojs/hexo#3833 (comment)