After long looking through the endless code of the Org I found a function that is responsible for parsing link and providing link object — org-element-link-parser .

To add extra parameters to parser I've used advice :filter-retun — it returns the value for the original function to the advice-function for the further processing.

( require 's ) ( require 'dash ) ( defun pelican/org-link-extra-attrs ( orig-fun &rest args ) "Post processor for parsing links" ( setq parser-result orig-fun ) ;;; Retrieving inital values that should be replaced ( setq raw-path ( plist-get ( nth 1 parser-result ) :raw-link )) ( setq path ( plist-get ( nth 1 parser-result ) :raw-link )) ;; Checking if link match the regular expression ( if ( string-match-p "^https?://.*|\s?:" raw-path ) ( progn ;; Retrieving and decoding parameters after the vertical bar ( setq results ( s-split "|" ( url-unhex-string raw-path ))) ;; URL cleanup ( setq raw-path ( car results )) ( setq path ( car ( s-split "|" path ))) ;; Splitting elements by colon and remove any empty values ( setq results ( --drop-while ( < ( length it ) 1 ) ( s-split ":" ( car ( -slice results 1 ))))) ;; Splitting key and value and trimming any spaces ( setq results ( --map ( s-split-up-to "\s" ( s-trim it ) 1 ) results )) ;; Updating the ouput with the new values ( setq orig-fun-cleaned ( plist-put ( nth 1 orig-fun ) :raw-link raw-path )) ( setq orig-fun-cleaned ( plist-put orig-fun-cleaned :path path )) ( list 'link ( -snoc orig-fun-cleaned :extra-attrs results ))) ;; Or returning original value of the function orig-fun )) ( advice-add 'org-element-link-parser :filter-return #' pelican/org-link-extra-attrs )

Now we need to add the support of the new attributes to the parser for the HTML exporting backend.