mirror of
https://github.com/ivabus/www
synced 2024-11-10 06:45:16 +03:00
#215 lowercase all package links
This commit is contained in:
parent
059069eaf0
commit
f4149d16cd
5
.github/build-package-pages.sh
vendored
5
.github/build-package-pages.sh
vendored
|
@ -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')\"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<span class="package-install-no">>{{- .installs -}} installs</span> -->
|
||||
</p>
|
||||
</div>
|
||||
<a href="/+{{- .full_name -}}/">
|
||||
<a href="/+{{- lower .full_name -}}/">
|
||||
{{- partial "detail-btn.html" . -}}
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue