mirror of
https://git.sr.ht/~magic_rb/website
synced 2024-11-23 08:37:39 +01:00
Add function to make https? links open in new tabs
Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
parent
9311eae63f
commit
033a14fbf0
9
make.el
9
make.el
|
@ -50,6 +50,15 @@
|
||||||
(defvar magic_rb/asset-include
|
(defvar magic_rb/asset-include
|
||||||
"\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\|woff2\\)")
|
"\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\|woff2\\)")
|
||||||
|
|
||||||
|
(defun org-export-add-target-blank-to-http-links (text backend info)
|
||||||
|
"Add target=\"_blank\" to external links."
|
||||||
|
(when (and
|
||||||
|
(org-export-derived-backend-p backend 'html)
|
||||||
|
(string-match "href=\"https?[^\"]+" text)
|
||||||
|
(not (string-match "target=\"" text)))
|
||||||
|
(string-match "<a " text)
|
||||||
|
(replace-match "<a target=\"_blank\" " nil nil text)))
|
||||||
|
|
||||||
(defun org-publish-sitemap-filtered (exclude)
|
(defun org-publish-sitemap-filtered (exclude)
|
||||||
"Publish sitemap filtered using EXCLUDE."
|
"Publish sitemap filtered using EXCLUDE."
|
||||||
(lambda (title list)
|
(lambda (title list)
|
||||||
|
|
Loading…
Reference in a new issue