jlong/serve

"serve export" exports layout directory

Opened this issue · 6 comments

From the examples I've seen, and from the default project you get when you run "serve create project", the best practice seems to be to create a /views/layouts/default.html.erb file for the overall page layout. When you come to export the project to html, a /layouts/default.html file is also exported. Changing the file-name to _defaults.html.erb prevents this from happening, but it kind of feels like a weird and unexpected extra step to have to go to in order to create a clean export.

I think either the docs need to clarify what's going on here, or the export function should treat the /layouts/ folder as special in some way, regardless of what the files inside are named.

Addendum: here's a nice, live, example of the problem: http://get-serve.com/layouts/default.html

Huh, interesting. @jlong any opinion on this? I don't really like the idea of making the layouts directory special, but maybe we could allow dropping a "crumb" in a directory to indicate it shouldn't be exported?

A .serve-ignore file?

So one approach would be a top-level file (like .serve-ignore) that specifies globs. Another (simpler) approach would be to allow dropping a .no-export file in a directory to have it not be exported.

Either's fine with me.

I like the .no-export idea.