Last active
March 22, 2022 11:39
-
-
Save cp-sumi-k/1b2a707cee649675c9ed98eb8cf3f78e to your computer and use it in GitHub Desktop.
https://medium.com/canopas/automation-dynamic-sitemap-generation-with-golang-api-584f6c53ea9c - automate sitemap generation using shell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -e | |
BASE_URL=$1 | |
BASE_API_URL=$2 | |
API_URL="$BASE_API_URL/sitemap?baseUrl=$BASE_URL" | |
xml=$(curl -X GET --header "Accept: */*" $API_URL) | |
echo $xml >> public/sitemap.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment