Shell script to replace JEKYLLER edge extension

#!/bin/bash echo "Enter Slug Name (all spaces will be replaced with -):" read slugInput slugName=`echo $slugInput | sed 's/ /-/g'` time=$(date "+%Y-%m-%d") slug="$time-$slugName" echo "File Name: $slug.md" echo "Enter Title:" read titleName postPath="/root/data/marioseixas.github.io/_posts/$slug.md" cat <<EOF > "$postPath" --- categories: - tags: - comment: info: aberto. date: '$time' type: post layout: post published: true slug: $slugName title: '$titleName' --- EOF xnedit "$postPath" echo "Uploading $slug.md to GitHub..." cd "/root/data/marioseixas.github.io" git add "_posts/$slug.md" git commit -m "Add new post: $titleName" git push origin main echo "Upload completed."

Comments (4)

Invalid comment data

Invalid comment data

Invalid comment data

Invalid comment data