Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default partials_dir to 'partials' #1220

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

Default partials_dir to 'partials' #1220

barraponto opened this issue Mar 19, 2014 · 18 comments

Comments

@barraponto
Copy link
Contributor

@barraponto barraponto commented Mar 19, 2014

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
Copy link
Member

@tdreyno tdreyno commented Mar 20, 2014

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

We're kind of stuck with the current behavior.

@barraponto
Copy link
Contributor Author

@barraponto barraponto commented Mar 21, 2014

What about Middleman 4?

@tdreyno
Copy link
Member

@tdreyno tdreyno commented Mar 21, 2014

Seems like a good idea for v4

@bhollis
Copy link
Member

@bhollis bhollis commented Mar 22, 2014

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

@barraponto
Copy link
Contributor Author

@barraponto barraponto commented Mar 22, 2014

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

@bhollis
Copy link
Member

@bhollis bhollis commented Mar 22, 2014

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

@barraponto
Copy link
Contributor Author

@barraponto barraponto commented Mar 22, 2014

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

@bhollis
Copy link
Member

@bhollis 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
Copy link
Member

@bhollis bhollis commented Mar 22, 2014

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

@kidwm
Copy link

@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
Copy link
Contributor

@lolmaus 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
Copy link
Member

@bhollis 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
Copy link

@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
Copy link

@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
Copy link
Contributor Author

@barraponto barraponto commented Mar 25, 2014

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

@lewiseason
Copy link

@lewiseason lewiseason commented May 15, 2016

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
Copy link
Member

@tdreyno 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
Copy link

@lewiseason lewiseason commented May 17, 2016

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.