-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add toc function to generate unique anchors * Sort keys, generate proper anchors for TOC * Fix templates, add 'back to top' links
- Loading branch information
Showing
11 changed files
with
126 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,7 @@ modules.xml | |
test.md | ||
test.html | ||
|
||
list.md | ||
list.html | ||
table.md | ||
table.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
{{- $l := .WithLicense -}} | ||
{{- $s := .WithStars -}} | ||
{{- $wl := .WithLicense -}} | ||
{{- $ws := .WithStars -}} | ||
{{- $wb := .WithBtt -}} | ||
{{- $a := .Anchors -}} | ||
{{- $s := .Stars -}} | ||
# awesome stars | ||
|
||
{{ .Credits.Text }}{{ .Credits.Link }} | ||
Total starred repositories: `{{ .Total }}` | ||
|
||
{{ if .WithToc }} | ||
{{- if .WithToc }} | ||
## Contents | ||
{{ range $key, $value := .Stars }} | ||
* [{{ $key }}](#{{ anchor $key }}) ({{ len $value }}) | ||
{{- end }} | ||
{{ range $key := .Keys }} | ||
- [{{ $key }}](#{{ with (index $a $key) }}{{ . }}{{ end }}) | ||
{{- end }} | ||
{{- end }} | ||
|
||
|
||
{{ range $key, $value := .Stars }} | ||
{{ range $key := .Keys }} | ||
## {{ $key }} | ||
{{ range $value }} | ||
- [{{- .NameWithOwner -}}]({{- .Url -}}) - {{ .Description }} | ||
{{- if $l }}{{ with .License}} \[*{{ . }}*\]{{ end }}{{ end -}} | ||
{{- if $s }} (⭐️{{ .Stars }}){{ end -}} | ||
{{ with (index $s $key) }}{{ range . }} | ||
- [{{- .NameWithOwner -}}]({{- .Url -}}) - {{ .Description }} | ||
{{- if $wl }}{{ with .License}} \[*{{ . }}*\]{{ end }}{{ end -}} | ||
{{- if $ws }} (⭐️{{ .Stars }}){{ end -}} | ||
{{- if .Archived }} *Archived!*{{ end -}} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if $wb }} | ||
|
||
**[⬆ back to top](#contents)**{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
{{- $l := .WithLicense -}} | ||
{{- $s := .WithStars -}} | ||
{{- $wl := .WithLicense -}} | ||
{{- $ws := .WithStars -}} | ||
{{- $wb := .WithBtt -}} | ||
{{- $a := .Anchors -}} | ||
{{- $s := .Stars -}} | ||
# awesome stars | ||
|
||
{{ .Credits.Text }}{{ .Credits.Link }} | ||
Total starred repositories: `{{ .Total }}` | ||
|
||
{{ if .WithToc }} | ||
{{- if .WithToc }} | ||
## Contents | ||
{{ range $key, $value := .Stars }} | ||
* [{{ $key }}](#{{ anchor $key }}) ({{ len $value }}) | ||
{{- end }} | ||
{{ range $key := .Keys }} | ||
- [{{ $key }}](#{{ with (index $a $key) }}{{ . }}{{ end }}) | ||
{{- end }} | ||
{{- end }} | ||
{{ range $key, $value := .Stars }} | ||
|
||
|
||
{{ range $key := .Keys }} | ||
## {{ $key }} | ||
{{ range $value }} | ||
| | {{ if $l }}| {{ end }}{{ if $s }}| {{ end }}| | ||
|-----|-----{{ if $l }}|:---:{{ end }}{{ if $s }}|----:{{ end }}| | ||
| [{{- .NameWithOwner -}}]({{- .Url -}}) | {{ .Description }} {{ if .Archived }}(*archived*){{ end }} {{ if $l }}| {{ with .License}}{{ . }}{{ else }}-{{ end }}{{ end }} {{ if $s }}| ⭐️{{ .Stars }}{{ end }} | | ||
{{ with (index $s $key) }}{{ range . }} | ||
| Name | Description {{ if $wl }} | License {{ end }}{{ if $ws }} | Stars {{ end }} | | ||
| ----- | -----{{ if $wl }} | :---:{{ end }}{{ if $ws }} |----:{{ end }} | | ||
| [{{- .NameWithOwner -}}]({{- .Url -}}) | {{ .Description }} {{ if .Archived }}(*archived*){{ end }} {{ if $wl }} | {{ with .License}}{{ . }}{{ else }}-{{ end }}{{ end }} {{ if $ws }}| ⭐️{{ .Stars }}{{ end }} | | ||
{{- end }} | ||
{{- end }} | ||
{{- if $wb }} | ||
|
||
**[⬆ back to top](#contents)**{{ end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters