Ignore "README" and "LICENSE" in Content/ to allow sub repositories #805
Replies: 2 comments 1 reply
-
Wonder if we should remove this warning completely now, I believe it was originally added to avoid user confusion regarding cc @bholmesdev |
Beta Was this translation helpful? Give feedback.
-
Update: we have a PR to remove the requirement for underscores on non-content files. So this use case should now work without raising a terminal warning 👍 Closing the discussion since this will be fixed in the next minor. If you still hit trouble once the minor is release, raise a bug report! |
Beta Was this translation helpful? Give feedback.
-
Body
Summary
Ignore the
README
&LICENSE
files in thecontent/
folder to allow sub repositories without this warning :Note: Prefix filename with an underscore is not enough, because GitHub will then ignore those files.
Background & Motivation
In order to separate my technical commits from content commits, I created a sub-repository for my blog. See original repo, see original's repo branch with the content sub-repo, see the content sub-repo.
I want to add
README.md
andLICENSE.md
like in every GitHub repo, but of course, this would cause an error with my Astro collections.I don't want to use the underscores system, because GitHub will then ignore my files. But I can't ask Astro to ignore these files automatically because users might want to use markdown files with these names.
Hence my compromise to ignore
README
andLICENSE
(without.md
extensions): no breaking change because these files are not supported by Astro; the possibility of creating sub repositories in content without warnings; GitHub will recognise those files.Minor drawback: GitHub will not enable Markdown formatting on these files. I'm okay with this limit.
Contribution
If the idea is accepted or an alternative is proposed, I am open to contributing and making a PR on this feature. I'm OK with TypeScript and GO, and already have made minor contributions to the Astro language server.
Goals
content/
folder without warningsBeta Was this translation helpful? Give feedback.
All reactions