#215 lowercase all package links

This commit is contained in:
neil 2022-12-07 12:18:33 +08:00
parent 059069eaf0
commit f4149d16cd
2 changed files with 4 additions and 3 deletions

View file

@ -6,14 +6,15 @@ for row in $(jq -r '.[] | @base64' < "$1"); do
_jq() {
echo "${row}" | base64 --decode | jq -r "${1}"
}
full_name=$(_jq '.full_name')
full_name=$(_jq '.full_name' | tr '[:upper:]' '[:lower:]')
if [[ "$full_name" == *\/* ]] || [[ "$full_name" == *\\* ]]
then
mkdir -p "$2/+$full_name"
rm -rf "$2/+$full_name"
fi
touch "$2"/"+$(_jq '.full_name')".md
echo $full_name
touch "$2"/"+$full_name".md
content="---
type: page
title: \"$(_jq '.name')\"

View file

@ -19,7 +19,7 @@
<span class="package-install-no">>{{- .installs -}}&nbsp;installs</span> -->
</p>
</div>
<a href="/+{{- .full_name -}}/">
<a href="/+{{- lower .full_name -}}/">
{{- partial "detail-btn.html" . -}}
</a>
</div>