diff --git a/README.md b/README.md index b4b722fe..e03f3a99 100644 --- a/README.md +++ b/README.md @@ -591,7 +591,7 @@ The `paige/icon` shortcode provides a web font icon. ``` {{< paige/icon class="" - name="" + title="" url="" >}} ``` @@ -602,8 +602,8 @@ Parameters:
class
Required. Position 0. String. <i> class. Example is bi bi-github.
-
name
-
Optional. String. The screen reader description. Example is GitHub.
+
title
+
Optional. String. The screen reader description and anchor title. Example is GitHub.
url
Optional. String. URL. Example is https://github.com/willfaught/paige. E-mails in URLs with a mailto: scheme are protected from web crawlers.
diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 1ed93e58..57709836 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -32,5 +32,5 @@ title: "Paige"

- {{< paige/icon class="bi bi-github" name="GitHub" url="https://github.com/willfaught/paige" >}} + {{< paige/icon class="bi bi-github" title="GitHub" url="https://github.com/willfaught/paige" >}}
diff --git a/exampleSite/content/shortcodes/icon.md b/exampleSite/content/shortcodes/icon.md index a3710266..9d0a7c4a 100644 --- a/exampleSite/content/shortcodes/icon.md +++ b/exampleSite/content/shortcodes/icon.md @@ -23,17 +23,17 @@ Result:

Icon: {{< paige/icon class="bi bi-github" >}}

-## Name parameter +## Title parameter Code: ```go-html-template -

Icon: {{}}

+

Icon: {{}}

``` Result: -

Icon: {{< paige/icon class="bi bi-github" name="GitHub" >}}

+

Icon: {{< paige/icon class="bi bi-github" title="GitHub" >}}

## Url parameter diff --git a/layouts/shortcodes/paige/icon.html b/layouts/shortcodes/paige/icon.html index 340b30dc..99c59471 100644 --- a/layouts/shortcodes/paige/icon.html +++ b/layouts/shortcodes/paige/icon.html @@ -1,5 +1,5 @@ {{ $class := .Get 0 | default (.Get "class") }} -{{ $name := .Get "name" }} +{{ $title := .Get "title" }} {{ $url := .Get "url" }} {{ if not $class }} @@ -8,10 +8,10 @@ {{ with $url }} - + {{ end }} - {{ with $name }}{{ . }}{{ end }} + {{ with $title }}{{ . }}{{ end }} {{ if $url }}