From 425293f1b74b572719cd795a72d8d29772eb47cc Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Wed, 29 Mar 2023 21:48:13 +0200 Subject: [PATCH 1/3] Add icons to external links --- layouts/shortcodes/extlink.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/extlink.html b/layouts/shortcodes/extlink.html index 26c8d00..71dca69 100644 --- a/layouts/shortcodes/extlink.html +++ b/layouts/shortcodes/extlink.html @@ -1 +1 @@ -{{ with .Get "href" }}{{ end }}{{ with .Get "text" }}{{ . }}{{ end }} \ No newline at end of file +{{ with .Get "href" }}{{ end }}{{ with .Get "icon" }} {{ end }}{{ with .Get "text" }}{{ . }}{{ end }} From 4b53a5be40733f77d30a5d0fa89d3bdcb81e045a Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Wed, 29 Mar 2023 21:54:09 +0200 Subject: [PATCH 2/3] Update README.md Add example how to reference icons in external links --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3544d7c..4d62bff 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,10 @@ You can also use `extlink` shortcode to create a link opening in new tab: ```markdown Visit as at {{}} ``` +Referencing and showing icons in front of the link text is possible with a new parameter `icon`: +```markdown +Visit as at {{}} +``` ### Customizing CSS Add a `custom_head.html`-file to your `layouts/partials`-directory. In there you may add a `