Wiki Link URL Normalizer
Convert local URLs into wiki links |
Type | XAR |
Category | API |
Developed by | |
Active Installs | 14 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
When saving wiki pages and XObjects, convert all links having absolute URLs into local wiki links if they point to the local wiki.
Features:
- Supports normalizing both page content and TextArea xproperties (when they're of type "fullyrendered", i.e. when they can contain wiki markup)
- Supports normalizing links inside Macros for some well-known macros: {{message}}, {{warning}}, {{info}}, {{error}}, {{success}}, {{cache}}, {{context}}, {{box}}, {{comment}}, {{container}}, {{todo}}.
- Supports normalizing local "view" URLs
- Supports normalizing local "download" URLs
- Supports subwikis and URL aliases
Wiki Link URL Normalizer 1.9.0+ The normalizer will also normalize references present in image blocks.
Example of entering a full URL in wiki syntax:
After save, if you edit the page again in wiki syntax:
Note that this also works in WYSIWYG. For example, you get the same result if you enter the following:
Custom filters
While the extension already convert a lot of URLs on its own, it's also possible to provide custom reference conversion. This allows disabling an automated conversion or convert references which are not matched by the standard conversion.
You can manipulate custom filters in the administration:
Limitations
- The full content is also normalized and not just the URLs. This means that you might see some differences in the diff. For example:
If you have originally:
{{info}}Hello{{/info}}After normalization you'll get:
{{info}}
Hello
{{/info}}Reason is that the canonical form for a macro is to have those extra new lines.
- If there's an URL reference (aka anchor) used in a local URL, then no normalization is performed.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Release Notes
v1.8.4
v1.8.3
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.0
v1.5
v1.4
v1.3
v1.2
v1.1.5
Added debug logs for easier debugging in production
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1
v1.0
Dependencies
Dependencies for this extension (org.xwiki.contrib:application-urlnormalizer-ui 1.9.0):
- org.xwiki.contrib:application-urlnormalizer-script 1.9.0