{{- define "main" -}} {{- $githubConfig := .Site.Params.github -}}
{{- if $githubConfig.id -}}
{{- .Title -}}
{{- $githubColors := .Site.Data.luna.githubColors -}} {{- $apiURL := print "https://api.github.com/users/" $githubConfig.id "/repos?per_page=100&type=owner" -}} {{- $githubData := getJSON $apiURL -}} {{- range sort $githubData "stargazers_count" "desc" -}} {{- if and (eq .owner.login $githubConfig.id) (gt .stargazers_count $githubConfig.minStars) -}}
{{- .name -}}
{{- or .description "暫無描述" -}}
{{- .stargazers_count -}}
{{- if .language -}}
{{- .language -}}
{{- end -}}
{{- .forks -}}
{{- end -}} {{- end -}}
{{- else -}} {{- warnf "!!! GitHub ID not set, Please check your config file" -}}
ERROR: {{- T "github.config" -}}
{{- end -}}
{{- end -}}