Skip to content

Instantly share code, notes, and snippets.

@Neil-Smithline
Created September 16, 2012 22:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neil-Smithline/3734671 to your computer and use it in GitHub Desktop.
Save Neil-Smithline/3734671 to your computer and use it in GitHub Desktop.
Octopress 2.0 Sitemap Merger
#!/bin/sh
HEADER=$(cat <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
EOF)
TRAILER='</urlset>'
echo "$HEADER"
cat "$@" | egrep -v '(xml version=|urlset xmlns=|</urlset>)'
echo "$TRAILER"
@Neil-Smithline
Copy link
Author

Documentation about this Gist can be found in Octopress issue 708.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment