@@ -31,6 +31,7 @@ This selects the type of button to display.
3131- ` template `
3232- ` issue `
3333- ` download `
34+ - ` view `
3435
3536#### ` user `
3637
@@ -50,20 +51,23 @@ The GitHub repo for the button link.
5051
5152- Type: ` string ` , ` true ` to enable
5253- Usage: ` optional ` for ` follow ` , ` watch ` , ` star ` , ` fork ` , ` issue `
54+ - Default: ` false `
5355
5456Attach the applicable number to the button for the specified type.
5557
5658#### ` dark `
5759
5860- Type: ` string ` , ` true ` to enable
5961- Usage: ` optional `
62+ - Default: ` false `
6063
6164Use the dark button theme if enabled, otherwise light theme.
6265
6366#### ` large `
6467
6568- Type: ` string ` , ` true ` to enable
6669- Usage: ` optional `
70+ - Default: ` false `
6771
6872Use a larger button if enabled.
6973
@@ -74,6 +78,46 @@ Use a larger button if enabled.
7478
7579Specify a branch other than master for the download.
7680
81+ #### ` icon `
82+ - Type: ` string `
83+ - Usage: ` optional `
84+
85+ Override the default icon for a button type. Valid icons are
86+ - ` mark-github `
87+ - ` heart `
88+ - ` eye `
89+ - ` star `
90+ - ` repo-forked `
91+ - ` repo-template `
92+ - ` issue-opened `
93+ - ` download `
94+
95+ #### ` text `
96+ - Type: ` string `
97+ - Usage: ` optional `
98+
99+ Override the default button text for a button type.
100+
101+ #### ` aria_label `
102+ - Type: ` string `
103+ - Usage: ` optional `
104+
105+ Override the default aria-label for a button type.
106+
107+ ## Defaults
108+
109+ | button | icon | text | path https://github.com | aria-label |
110+ | -------- | ------------- | ----------------- | ----------------------------------- | ----------------------------------------- |
111+ | follow | mark-github | Follow @` user ` | /` user ` | Follow @` user ` on GitHub |
112+ | sponsor | heart | Sponsor | /sponsors/` user ` | Sponsor @` user ` on GitHub |
113+ | watch | eye | Watch | /` user ` /` repo ` /subscription | Watch ` user ` /` repo ` on GitHub |
114+ | star | star | Star | /` user ` /` repo ` | Star ` user ` /` repo ` on GitHub |
115+ | fork | repo-forked | Fork | /` user ` /` repo ` /fork | Fork ` user ` /` repo ` on GitHub |
116+ | template | repo-template | Use this template | /` user ` /` repo ` /generate | Use this template ` user ` /` repo ` on GitHub |
117+ | issue | issue-opened | Issue | /` user ` /` repo ` /issues | Issue ` user ` /` repo ` on GitHub |
118+ | download | download | Download | /` user ` /` repo ` /archive/` branch ` .zip | Download ` user ` /` repo ` on GitHub |
119+ | view | mark-github | ` repo ` | /` user ` /` repo ` | View ` user ` /` repo ` on GitHub |
120+
77121## Examples
78122
79123Follow button and Follow button with followers count:
@@ -119,6 +163,7 @@ All buttons:
119163{{< github_button button="template" user="statropy" repo="github-button-hugo-shortcode" >}}
120164{{< github_button button="issue" user="statropy" repo="github-button-hugo-shortcode" count="true" >}}
121165{{< github_button button="download" user="statropy" repo="github-button-hugo-shortcode" >}}
166+ {{< github_button button="view" user="statropy" repo="github-button-hugo-shortcode" >}}
122167```
123168
124169## Install
0 commit comments