mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 08:43:40 +00:00
17 lines
485 B
HTML
17 lines
485 B
HTML
{{ $type := .Get 0 }}
|
|
{{ $languages := readDir "node_modules/prismjs/components" }}
|
|
{{ $plugins := readDir "node_modules/prismjs/plugins" }}
|
|
|
|
{{ if eq $type "languages" }}
|
|
{{ range after 1 $languages -}}
|
|
{{ $lang := .Name | replaceRE ".*\\.min\\.js" "" | replaceRE "prism-([\\w-]*).js" "${1}" -}}
|
|
{{ if not (eq $lang "") }}
|
|
{{ $lang -}}
|
|
{{ end -}}
|
|
{{ end }}
|
|
{{ else if eq $type "plugins" }}
|
|
{{ range $plugins }}
|
|
{{ path.Base .Name -}}
|
|
{{ end }}
|
|
{{ end }}
|