You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing a set of blog posts there's a lot of extra work having to set layout for each post.
It would be great if there was a posibility to set a default layout in astro.cofig.mjs
Proposed Solution
Possible solutions
Extend astro.config.mjs with defaultLayout
Alternatives considered
One other possible solution would be having default layout.astro files in each folder, but this seems far more complex.
Risks, downsides, and/or tradeoffs
Added complexity. Opening up for having a default layout means the next step is having one per folder and so on. It might create unnecessary complexity.
Open Questions
Is astro.config.mjs the intended place for all settings? Could we have a per folder settings file? placing a layout.astro file in src/pages/posts for example.
Detailed Design
No response
Help make it happen!
I am willing to submit a PR to implement this change.
I am willing to submit a PR to implement this change, but would need some guidance.
I am not willing to submit a PR to implement this change.
The text was updated successfully, but these errors were encountered:
From my understanding of what _app.js It’s not really meant to solve the same thing, but definitely overlap. The app file is your general wrapper for everything. You might then want one design for pages and one design for blog posts. That’s where a default layout comes in. For the blog posts you’d not want to have to set a layout for each post.
Background & Motivation
Importing a set of blog posts there's a lot of extra work having to set
layout
for each post.It would be great if there was a posibility to set a default layout in astro.cofig.mjs
Proposed Solution
Possible solutions
Extend
astro.config.mjs
withdefaultLayout
Alternatives considered
One other possible solution would be having default layout.astro files in each folder, but this seems far more complex.
Risks, downsides, and/or tradeoffs
Added complexity. Opening up for having a default layout means the next step is having one per folder and so on. It might create unnecessary complexity.
Open Questions
Is
astro.config.mjs
the intended place for all settings? Could we have a per folder settings file? placing alayout.astro
file insrc/pages/posts
for example.Detailed Design
No response
Help make it happen!
The text was updated successfully, but these errors were encountered: