docs
docs copied to clipboard
Document excluding pages and directories from build
Documents how to exclude pages or directories from being built by prefixing their name with an underscore.
Deploy Preview for astro-docs-2 ready!
Name | Link |
---|---|
Latest commit | adb3c0c8b1d0be7a912efb22fca723017462a4f6 |
Latest deploy log | https://app.netlify.com/sites/astro-docs-2/deploys/63190d909cc3fd00080bf4a6 |
Deploy Preview | https://deploy-preview-265--astro-docs-2.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
I think this looks good! Short and sweet! Just left one comment re: the header for the example. :)
(FYI @zadeviggers , I'm just waiting on this one until a larger PR on that Routing page is merged. Then, this will just be a tiny, non-conflicting addition to it.) :)
This is good documentation but I'm actually not sure if we meant for this feature to exist. If you're alright with sitting tight, I'd like to run this by our maintainers group and get their +1/-1 before we document.
I really hope this feature continues to exist, or my projects will become significantly more work than what I already have to do because I can't co-locate static assets with my content :heavy_plus_sign: :infinity:
In fact, please consider adding pattern-based allow/deny lists for Astro to process someday in the future :blush:
Poor @zadeviggers still waiting to hear whether he found an undocumented feature, or an easter egg, or what! Just wanted to let you know that I haven't forgotten about you, and I have added a label to prompt core to weigh in on this.
Lets bring this up on an RFC call! The feature has come up a few times before but was never decided on, since it already technically works the question really is just whether it's officially supported 👍
@tony-sull Should @zadeviggers make an official RFC proposal for this on withastro/rfc ?
One "gotcha" coming up: I suspect we're going to move this Routing page back into "Learn" (and out of API). We've already worked so hard to get the wording/diagram just right, but so much has changed and I can see there are already going to be some conflicts to resolve, even before we move the page...
I'm wondering whether it makes sense for @zadeviggers to capture these exact edits and stash them somewhere (in an RFC?!) and we close this PR since it still seems no where near getting the go-ahead to merge.
That way, the rest of the site can change, this page can move to an entirely new location... and maybe as a result of the RFC the team decides that they want to implement this slightly differently anyway, so we're waiting on those decisions before we know what to document?
What does everyone think?
Does @zadeviggers want to do that? It does seem like it might be a path to grabbing some of core's attention and getting a decision. But don't know if this feature is important enough to you that you would want to champion it in this way.
Well, THAT's a good point, too! Sorry, @zadeviggers , didn't mean to be putting RFCs in your mouth! ;)
Even if we end up closing this PR, the info is still "stashed" here, should we need it again. I just think this feels no where near close to being an actual thing to document yet, and I'm trying to think about how to proceed in light of that. Open to other ideas, too!
A problem with just documenting it as it currently happens to work (as I might tend to do for convenience) without a clear committment of future support is that people might build their entire projects around it not realizing that it's not a core/key thing and no one is working to ensure that it supported.
I think it makes sense to at least convert this to a draft.
@zadeviggers Would you like me to take on writing up an RFC? I think this feature or something like it would be super helpful and given it already exists I think it would be good to get a quick-ish 👍/👎 from the team.
@zadeviggers Would you like me to take on writing up an RFC? I think this feature or something like it would be super helpful and given it already exists I think it would be good to get a quick-ish 👍/👎 from the team.
Of course! Feel free to do whatever you want, no need to ask me first.
I think it makes sense to at least convert this to a draft.
@zadeviggers Would you like me to take on writing up an RFC? I think this feature or something like it would be super helpful and given it already exists I think it would be good to get a quick-ish 👍/👎 from the team.
Can you point me to the location of this RFC? Failed to find it in https://github.com/withastro/rfcs
I found this excluding feature to be confusing when used alongside Astro.glob
, since there's no pages generated when their names are prefixed with underscore, but you still have them listed in Astro.glob
's result, which means you'll have to filter them with code like:
allPosts
.filter((post) => {
return !post.file.split(path.sep).some((name) => name.startsWith('_'))
})