Open
Description
Currently, all pages inside a theme can be renamed or disabled by the user, for example:
package/
└── src/
└── pages/
├── api/
│ ├── login.astro
│ └── logout.astro
└── index.astro
// astro.config.mjs
import { defineConfig } from 'astro/config';
import myTheme from 'my-theme';
export default defineConfig({
integrations: [
myTheme({
pages: {
"/": "/home",
"/logout": "/signout",
"/login": false
},
}),
]
});
The purpose of this overriding it to prevent user's from being locked-in to the pages the theme creates. But in some cases, a theme may want to opt out of this overriding. ATP should provide a way to prevent users from overriding a page.
Things to consider:
- This should be discouraged! Themes are meant to be overridable, this should only be used for advanced use-cases where an override could break a theme
- Maybe the theme provider could allow overriding of
.astro
pages but not API route.js
|.ts
- Users have two options when overriding a page: renaming and disabling. Can this API support the ability to rename, but not disable (and vice versa)?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo