From 4e030066f051b3285ebedfe8d7eda7f3d07f94dd Mon Sep 17 00:00:00 2001
From: Will Faught
Date: Sun, 24 Sep 2023 18:45:02 -0700
Subject: [PATCH] Rename icon name to title
---
README.md | 6 +++---
exampleSite/content/_index.md | 2 +-
exampleSite/content/shortcodes/icon.md | 6 +++---
layouts/shortcodes/paige/icon.html | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)
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: {{* paige/icon class="bi bi-github" name="GitHub" */>}}
+Icon: {{* paige/icon class="bi bi-github" title="GitHub" */>}}
```
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 }}