mirror of
https://github.com/ivabus/www
synced 2024-11-26 03:55:06 +03:00
Merge branch 'website-version-3' of https://github.com/teaxyz/www into website-version-3
This commit is contained in:
commit
46764829d3
1 changed files with 5 additions and 4 deletions
9
.github/build-package-pages.sh
vendored
9
.github/build-package-pages.sh
vendored
|
@ -2,16 +2,17 @@
|
|||
# cmd: $ ./build-package-pages.sh srcJson targetPath
|
||||
# sample: $ .github/build-package-pages.sh src/data/packages.json src/content/packages'
|
||||
|
||||
for row in $(cat $1 | jq -r '.[] | @base64'); do
|
||||
for row in $(jq -r '.[] | @base64' < "$1"); do
|
||||
_jq() {
|
||||
echo ${row} | base64 --decode | jq -r ${1}
|
||||
echo "${row}" | base64 --decode | jq -r "${1}"
|
||||
}
|
||||
touch $2/$(_jq '.slug').md
|
||||
touch "$2"/"$(_jq '.slug')".md
|
||||
content="---
|
||||
type: page
|
||||
title: \"$(_jq '.name')\"
|
||||
maintainer: \"$(_jq '.maintainer')\"
|
||||
Description: \"$(_jq '.desc' | tr '\"' "'")\"
|
||||
layout: \"package-detail\"
|
||||
---"
|
||||
echo "$content" > $2/$(_jq '.slug').md
|
||||
echo "$content" > "$2"/"$(_jq '.slug')".md
|
||||
done
|
Loading…
Reference in a new issue