Replies: 1 comment
-
Duplicate of #480 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Similar to how exclusions work in
/pages
(https://docs.astro.build/en/core-concepts/routing/#excluding-pages) there could also be a way to have "silent" folders, to help organise pages. Such folders could for instance be prefixed with#
.Background & Motivation
In a project where you have a large number of pages, for example a blog, it becomes difficult to keep them all in one folder. Introducing folders today also affects the routes to the pages. Having a way to organise the files / pages while still having "flat" urls would be helpful.
Use case
You want to separate the posts you are working on from the ones that are already published
With the introduction of "silent" folders you could keep the posts you are working on in
/blog/#drafts/
and all the other files flat in/blog/
. You could also choose to organise the posts by year or year/month to keep the number of files per folder manageable (i.e./blog/#2023/#08/
).For blogs that already choose to include the date in the path, eg.
/blog/2023/some-blog-post
, the issue is less relevant.You have multiple people publishing to the same blog
With the introduction of "silent" folders you could have one folder per author. By utilising this you could also add limitations in who is allowed to commit changes to the respective folder (obviously out of scope for this RFC) through GitHub Actions or similar.
Example
The bullets below illustrate the relationship between folders/files and generated routes after the introduction of "silent" folders:
/blog/2023/some-blog-post
-> url:/blog/2023/some-blog-post
/blog/#2023/some-blog-post
-> url:/blog/some-blog-post
/blog/_2023/some-blog-post
-> url:EXCLUDED
(https://docs.astro.build/en/core-concepts/routing/#excluding-pages)Goals
#
in the generated paths when creating routes (probably added somewhere around here)Beta Was this translation helpful? Give feedback.
All reactions