sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 346 forks source link

Disable layout for XML no longer works #628

Closed omichelsen closed 6 years ago

omichelsen commented 6 years ago

I have a sitemap.xml.jade file and in _data.json I have the following lines:

"sitemap": {
    "layout": false
},

This have been working great since I started using Harp, but now it stopped working. It will add the default layout template to the top of my XML file, and thus making it unreadable/invalid.

I didn't change anything in my source files, only upgraded Harp to the latest version (v0.25.0).

MartyO256 commented 6 years ago

Try adding the extension to the file name if you have a sitemap.xml.jade file:


"sitemap.xml": {
    "layout": false
},
omichelsen commented 6 years ago

That did the trick - thanks! 👍

Pectojin commented 6 years ago

This does not seem intentional. The documentation seems very explicit about this being supposed to work without the extension.

http://harpjs.com/docs/development/layout#no-layout