mirror of
https://github.com/ivabus/www
synced 2024-11-26 04:25:07 +03:00
#215 lowercase all package links
This commit is contained in:
parent
059069eaf0
commit
f4149d16cd
2 changed files with 4 additions and 3 deletions
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() {
|
_jq() {
|
||||||
echo "${row}" | base64 --decode | jq -r "${1}"
|
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" == *\\* ]]
|
if [[ "$full_name" == *\/* ]] || [[ "$full_name" == *\\* ]]
|
||||||
then
|
then
|
||||||
mkdir -p "$2/+$full_name"
|
mkdir -p "$2/+$full_name"
|
||||||
rm -rf "$2/+$full_name"
|
rm -rf "$2/+$full_name"
|
||||||
fi
|
fi
|
||||||
touch "$2"/"+$(_jq '.full_name')".md
|
echo $full_name
|
||||||
|
touch "$2"/"+$full_name".md
|
||||||
content="---
|
content="---
|
||||||
type: page
|
type: page
|
||||||
title: \"$(_jq '.name')\"
|
title: \"$(_jq '.name')\"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<span class="package-install-no">>{{- .installs -}} installs</span> -->
|
<span class="package-install-no">>{{- .installs -}} installs</span> -->
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<a href="/+{{- .full_name -}}/">
|
<a href="/+{{- lower .full_name -}}/">
|
||||||
{{- partial "detail-btn.html" . -}}
|
{{- partial "detail-btn.html" . -}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue