From 213880a1a3741466d2d58310439c95727f08084a Mon Sep 17 00:00:00 2001 From: sculptor189 Date: Sat, 10 Aug 2024 15:15:59 -0400 Subject: [PATCH] add rel attribute to button shortcode --- exampleSite/content/docs/shortcodes/index.it.md | 2 +- exampleSite/content/docs/shortcodes/index.ja.md | 2 +- layouts/shortcodes/button.html | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/docs/shortcodes/index.it.md b/exampleSite/content/docs/shortcodes/index.it.md index 4102673b..699c2a0f 100644 --- a/exampleSite/content/docs/shortcodes/index.it.md +++ b/exampleSite/content/docs/shortcodes/index.it.md @@ -104,7 +104,7 @@ New article! ## Button -`button` outputs a styled button component which can be used to highlight a primary action. It has two optional variables `href` and `target` which can be used to specify the URL and target of the link. +`button` outputs a styled button component which can be used to highlight a primary action. It has three optional variables `href`, `target` and `rel` which can be used to specify the URL, target and relation of the link. **Example:** diff --git a/exampleSite/content/docs/shortcodes/index.ja.md b/exampleSite/content/docs/shortcodes/index.ja.md index a93cc237..95734f0e 100644 --- a/exampleSite/content/docs/shortcodes/index.ja.md +++ b/exampleSite/content/docs/shortcodes/index.ja.md @@ -104,7 +104,7 @@ New article! ## Button -`button` outputs a styled button component which can be used to highlight a primary action. It has two optional variables `href` and `target` which can be used to specify the URL and target of the link. +`button` outputs a styled button component which can be used to highlight a primary action. It has three optional variables `href`, `target` and `rel` which can be used to specify the URL, target and relation of the link. **Example:** diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index c6a4c36b..8bddea14 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -2,6 +2,7 @@ class="!rounded-md bg-primary-600 px-4 py-2 !text-neutral !no-underline hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700" {{ with .Get "href" }}href="{{ . }}"{{ end }} {{ with .Get "target" }}target="{{ . }}"{{ end }} + {{ with .Get "rel" }}rel="{{ . }}"{{ end }} role="button" > {{ .Inner }}