Replies: 9 comments 16 replies
-
|
+1 - I'm a huge fan of the overall direction / vision captured here. Need to sit with this before I can give more in-depth feedback on the specifics, but quick initial things that jumped out:
|
Beta Was this translation helpful? Give feedback.
-
|
Why keep content collections in core? |
Beta Was this translation helpful? Give feedback.
-
|
Initial thoughts as I am reading through this:
|
Beta Was this translation helpful? Give feedback.
-
|
Overall, I like the idea! I have one concern regarding If we impose a special directory, I wonder if our users will like it. A bit like Some people like having all their components (regardless where they are used) in a So, if we can find another mechanism or, at least, give the possibility to configure a path or something like that, I think that will reduce the reluctance of some! (based on your previous answer, this sounds like a possibility which is great!) I had another concern regarding Assuming that everything can work as before by assembling blocks, I would say it's a good idea! I always like the concept of a simple core and extendibility because this means this is easy to extend in core but also for others to work with that! And while I'm not the most involved in the core repo (ie. some things might escape me) I approve the idea! |
Beta Was this translation helpful? Give feedback.
-
|
I just want to note that one difficult aspect of this problem will be to expose more things to integrations, and allow integrations to talk to each other. For reference, nuxt modules are pretty powerful so maybe inspiration can be taken there |
Beta Was this translation helpful? Give feedback.
-
|
We should really define what "routing" actually means for this proposal. Without this definition, I question, for example, why middleware isn't part of core, while redirects and rewrite rely heavily to be in core. |
Beta Was this translation helpful? Give feedback.
-
|
I posted a scoped-down alternative proposal for the |
Beta Was this translation helpful? Give feedback.
-
One question coming to mind (maybe too early) is related to the Astro configuration. Right now, an integration receive the entire "top-level" Astro configuration through hooks. If moving some parts to integrations, would that behave differently? For example, if i18n becomes: export default defineConfig({
integrations: [
i18n({
// i18n configuration
})
starlight({
// Starlight configuration
}),
],
});What would become of the |
Beta Was this translation helpful? Give feedback.
-
|
I'm going to close this in favor of #1320 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Astro Minimal Core RFC
Summary
This RFC proposes reducing Astro's core framework scope to three primitives: routing, content, and islands. It also defines a simplified default file layout and moves non-core capabilities (for example middleware, i18n, and actions) to integrations.
Background & Motivation
Astro currently exposes multiple overlapping concepts for routing, rendering, and customization. This increases the amount of framework knowledge required to build and maintain applications, and makes core behavior less explicit.
This RFC addresses that by narrowing the core model and making extension boundaries clearer. Routing, content collections, and islands remain core. Non-core features, including middleware, i18n, and actions, are moved out of core and implemented through integrations.
Proposed layout:
In this model:
src/pages/defines routes and continues to support multiple page template formats.src/islands/is the canonical location for island components authored outside.astrofiles.src/app.tsis the application entrypoint for request interception and controlled rendering.content/remains core, with collections unchanged in principle.Goals
.astrotemplating formats insrc/pages/.src/app.ts) for request and rendering control.Example
Much of the complexity from Astro comes from the fact that request handling happens in multiple places; in the adapter, which hands it over to Astro, which then runs middleware, then pages, etc.
This simplifies things by removing middleware and giving the user an explicit place to handle requests and then call into Astro themselves.
This example shows the intended role of
src/app.ts:Beta Was this translation helpful? Give feedback.
All reactions