diff --git a/README.md b/README.md index aaed03c..b788eef 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Additionally, it also provides the functionality to upload the static HTML files ```yaml name: Generate Static HTML files -uses: PLG-Works/ghost-static-website-generator@v2 +uses: PLG-Works/ghost-static-website-generator@v3 with: ghost_hosted_url: "https://content.yourdomain.com/blog" ghost_static_host_url: "https://yourdomain.com/blog" diff --git a/run.sh b/run.sh index cefaba5..57244e5 100755 --- a/run.sh +++ b/run.sh @@ -35,10 +35,15 @@ if [[ "${GHOST_HOSTED_BLOG_PATH}" != "${GHOST_STATIC_BLOG_PATH}" ]]; then exit 1 fi +GHOST_HOSTED_URL_WITHOUT_PROTOCOL=$(echo -e ${GHOST_HOSTED_URL} | sed -e 's/^https://') +GHOST_STATIC_HOST_URL_WITHOUT_PROTOCOL=$(echo -e ${GHOST_STATIC_HOST_URL} | sed -e 's/^https://') + echo "###########################################################" echo "GHOST_HOSTED_URL : ${GHOST_HOSTED_URL}" +echo "GHOST_HOSTED_URL_WITHOUT_PROTOCOL : ${GHOST_HOSTED_URL_WITHOUT_PROTOCOL}" echo "GHOST_HOSTED_BLOG_PATH : ${GHOST_HOSTED_BLOG_PATH}" echo "GHOST_STATIC_HOST_URL : ${GHOST_STATIC_HOST_URL}" +echo "GHOST_STATIC_HOST_URL_WITHOUT_PROTOCOL : ${GHOST_STATIC_HOST_URL_WITHOUT_PROTOCOL}" echo "GHOST_STATIC_BLOG_DOMAIN : ${GHOST_STATIC_BLOG_DOMAIN}" echo "GHOST_STATIC_HOST : ${GHOST_STATIC_HOST}" echo "GHOST_STATIC_BLOG_PATH : ${GHOST_STATIC_BLOG_PATH}" @@ -71,6 +76,7 @@ echo " " echo "***** Replace text with custom text started *****" declare -A REPLACE_CONTENT=( ["${GHOST_HOSTED_URL}"]="${GHOST_STATIC_HOST_URL}" + ["${GHOST_HOSTED_URL_WITHOUT_PROTOCOL}"]="${GHOST_STATIC_HOST_URL_WITHOUT_PROTOCOL}" ["\"url\": \"${GHOST_STATIC_HOST_URL}/\""]="\"url\": \"${GHOST_STATIC_HOST}/\"" ["\"@type\": \"WebSite\""]="\"@type\": \"WebPage\"" )