axitkhurana / buster

Brute force static site generator for Ghost
MIT License
802 stars 139 forks source link

sitemap is missing #26

Open shime opened 10 years ago

shime commented 10 years ago

sitemap.xml is missing from generated content.

currently I'm using this workaround to generate it:

npm install -g git://github.com/tmcw/sitemap-static.git 
cd static; sitemap-static --prefix=https://yourblogdomain.com | sed 's/index\.html//g' > sitemap.xml; cd -
fluke commented 10 years ago

@shime Till this is implemented we could write a git precommit script that runs before each commit. And automate this and the index.html fix you wrote.

shime commented 10 years ago

@kartikluke these workarounds are hacks (like this whole project). I would prefer a ghost plugin for github pages

ghost commented 10 years ago

I doubt it would be in their interest, but it would be pretty good - even though buster does the trick (for me atleast).

axitkhurana commented 9 years ago

@shime Buster will generate everything that is linked in the pages. Does Ghost generate sitemaps?

And yeah, this project is quite hacky, I should probably update the README to reflect how it generates static pages.

thedannywahl commented 9 years ago

as @axitkhurana has said Buster will generate everything that is linked in the pages.

Ghost does generate sitemaps, but it never links to them in any rendered page- it simply adds it to robots.txt. The quickest fix is to add links manually to your default.hbs file:

    {{! For buster }}
    <aside style="display:none;">
        <a href="/sitemap.xml">sitemap.xml</a>
        <a href="/sitemap-pages.xml">sitemap-pages.xml</a>
        <a href="/sitemap-posts.xml">sitemap-posts.xml</a>
        <a href="/sitemap-posts.xml">sitemap-authors.xml</a>
        <a href="/sitemap-tags.xml">sitemap-tags.xml</a>
        <a href="/sitemap.xsl">sitemap.xsl</a>
    </aside>

Of course buster could be told explicitly to look for sitemap.xml too knowing that it should exist.

joshgerdes commented 9 years ago

I added code to include the sitemap files in the generate function. It is in a pull request #57 if anyone is interested.