Skip to content

Commit

Permalink
Merge pull request #6 from PLG-Works/ghost-changes
Browse files Browse the repository at this point in the history
New variable changes
  • Loading branch information
sunilkhedar authored Jan 27, 2023
2 parents 49b3306 + ae51cf8 commit ce978b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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\""
)
Expand Down

0 comments on commit ce978b7

Please sign in to comment.