diff --git a/.github/build-package-pages.sh b/.github/build-package-pages.sh index 8f94f8e..5774526 100755 --- a/.github/build-package-pages.sh +++ b/.github/build-package-pages.sh @@ -6,14 +6,16 @@ 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' | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/') if [[ "$full_name" == *\/* ]] || [[ "$full_name" == *\\* ]] then mkdir -p "$2/+$full_name" + # remove last folder rm -rf "$2/+$full_name" fi - touch "$2"/"+$(_jq '.full_name')".md + + touch "$2"/"+$full_name".md content="--- type: page title: \"$(_jq '.name')\" @@ -21,5 +23,5 @@ maintainer: \"$(_jq '.maintainer')\" Description: \"$(_jq '.desc' | tr '\"' "'")\" layout: \"package-detail\" ---" - echo "$content" > "$2"/"+$(_jq '.full_name')".md + echo "$content" > "$2"/"+$full_name".md done \ No newline at end of file diff --git a/src/layouts/partials/package-thumbnail.html b/src/layouts/partials/package-thumbnail.html index d40a6b3..e268138 100644 --- a/src/layouts/partials/package-thumbnail.html +++ b/src/layouts/partials/package-thumbnail.html @@ -19,12 +19,12 @@ >{{- .installs -}} installs -->

- + {{- partial "detail-btn.html" . -}}
- +