From f4149d16cd5b0978bf4d1d15c5ed9f1fe5c34936 Mon Sep 17 00:00:00 2001
From: neil
Date: Wed, 7 Dec 2022 12:18:33 +0800
Subject: [PATCH] #215 lowercase all package links
---
.github/build-package-pages.sh | 5 +++--
src/layouts/partials/package-thumbnail.html | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.github/build-package-pages.sh b/.github/build-package-pages.sh
index 8f94f8e..7515ada 100755
--- a/.github/build-package-pages.sh
+++ b/.github/build-package-pages.sh
@@ -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')\"
diff --git a/src/layouts/partials/package-thumbnail.html b/src/layouts/partials/package-thumbnail.html
index d40a6b3..83df2c7 100644
--- a/src/layouts/partials/package-thumbnail.html
+++ b/src/layouts/partials/package-thumbnail.html
@@ -19,7 +19,7 @@
>{{- .installs -}} installs -->
-
+
{{- partial "detail-btn.html" . -}}