Is there support for static sites defined locally
KommuSoft opened this issue · 4 comments
Is there a way to run the sitemap generator on a static site that is constructed locally. The idea is that this can then be used with continuous integration where the build script that first generates the static site runs the sitemap generator and then includes the sitemap in the end product.
The only think I can think of is to run a local webserver, for example through apache and edit the /etc/hosts
file to forward the site domain to the local host, and then generate the sitemap. While this can be done through continuous integration, it looks like a lot of overhead to generate a simple sitemap.
That's a good question. If someone put a gun to my head and made me do CI with this script, I'd set it up exactly as you're describing.
The /etc/hosts
part could be dealt with by adding a new flag along the lines of --force-localhost
which would send all requests to localhost alongside the regular domain header. For Apache, there are lighter things than Apache you could use for sending out html files (such as the built-in PHP server).
I'm open to other ideas.
What build system are you using such that you're unable to generate a sitemap at buildtime instead of using an archaic PHP script?
What build system are you using such that you're unable to generate a sitemap at buildtime instead of using an archaic PHP script?
It is a simple Makefile
with pandoc
:). So no special library. The idea is to make something lightweight that works on Travis, and now looking for an effective sitemap. But there are probably indeed better options :), I had to install php
with the travis file and to be honest, I'm not really a huge fan of languages at the top of the sigil cycle :P.
What do you think about a writing single bash script that iterates through your output files and adds them to an xml file?
Do you need the crawling?