Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add rel attribute to button shortcode #1678

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exampleSite/content/docs/shortcodes/index.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/docs/shortcodes/index.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**

Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down