Default partials_dir to 'partials' #1220

Closed
barraponto opened this Issue Mar 19, 2014 · 18 comments

Projects

None yet

7 participants

@barraponto
Contributor

I'm under the impression that layouts_dir defaults to layouts, but partials_dir doesn't default to partials. Which would be awesome and consistent :)

@tdreyno
Member
tdreyno commented Mar 20, 2014

Would be, but it'd also be backwards incompatible :(

We're kind of stuck with the current behavior.

@barraponto
Contributor

What about Middleman 4?

@tdreyno
Member
tdreyno commented Mar 21, 2014

Seems like a good idea for v4

@bhollis
Member
bhollis commented Mar 22, 2014

Why do we even have a partials_dir? What is it for?

@barraponto
Contributor

@bhollis to group all your partial files in a single folder. some of us are crazy organizers, we need that.

@bhollis
Member
bhollis commented Mar 22, 2014

But why? What's wrong with just referring to them by path?

@barraponto
Contributor

You mean, typing partial partials/footer instead of partial footer? Because we can. Also, less room for tyops.

@bhollis
Member
bhollis commented Mar 22, 2014

Yeah, typing the path, just like you do in Rails (which has no partials_dir). This seems like an feature for a tiny bit of convenience for a small segment of users. Any savings it offers can be easily replicated by a helper in config.rb.

@bhollis
Member
bhollis commented Mar 22, 2014

I guess what I'm saying is that my vote would be to remove this feature in v4.

@kidwm
kidwm commented Mar 22, 2014

@bhollis how about switch the behavior by setting :partials_dir or not, just like what we done in #1176 ?

@lolmaus
Contributor
lolmaus commented Mar 22, 2014

I vote for proper partials and main content dir configuration. I have to use a helper so that i don't write 'partials/' five hundred times.

@bhollis
Member
bhollis commented Mar 22, 2014

@lolmaus yes, that's what helpers are for. @kidwm my whole objection to this feature is that I do not want to have to maintain, test, and document this extra feature.

@kidwm
kidwm commented Mar 22, 2014

@bhollis I know that you've done what i asked not only to layouts but also to partials in #1185.
So I reckon it makes sense that partials also have the default path which get higher loading priority.

@Aupajo
Aupajo commented Mar 24, 2014

I place my partials in directories that give them context, a la Rails. Having a directory named partials seems like an unnecessary addition that is trivial for people to add if they want it anyway.

@barraponto
Contributor

I can live without a default partials_dir, but please don't take away that setting.

@lewiseason

So... this option been removed? Per:

Partials should live next to content, or be addressed with absolute paths.

Is this an "opinionated framework" opinion, or is there a technical reason I should be doing it this way?

@tdreyno
Member
tdreyno commented May 16, 2016

People didn't like grouping their partials. Some did, but most didn't, so now we allow partials to be placed anywhere, not just 1 directory.

@tdreyno tdreyno closed this May 16, 2016
@lewiseason

So quite the opposite? Excellent. Thanks for clarifying

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