withastro / docs

Astro documentation
https://docs.astro.build/
MIT License
1.33k stars 1.48k forks source link

Consider updating the docgen.mjs script that updates configuration-reference #544

Closed Chrissdroid closed 2 years ago

Chrissdroid commented 2 years ago

Opening this issue about the docgen.mjs script to be able to auto-update configuration-reference.md as a scheduled github action.

Ideas mentioned with this:

sarah11918 commented 2 years ago

We have a live test-case available:

"The configuration documentation says the default value of trailingSlash is always. But it's wrong, the default value is ignore https://docs.astro.build/en/reference/configuration-reference/#trailingslash"

Chrissdroid commented 2 years ago

"The link inside the config ref is absolute, can cause issues with dev environnements and redirecting when unnecessary https://github.com/withastro/docs/blob/main/src/pages/en/reference/configuration-reference.md?plain=1#L266"

sarah11918 commented 2 years ago

Wait, is this the same as #209 @Chrissdroid ? or related? If so, maybe you can add info there.

Chrissdroid commented 2 years ago

Wait, i didn't know there was an issue already about this topic, it's related but does not cover what we're doing here

( at least with what i see on the issue )

Chrissdroid commented 2 years ago

we could merge this here for the first case but i think it's more suitable to make a separate thing for the "CLI Flag" automatisation

( which could be pushed toward with changes from this )

delucis commented 2 years ago

Good catch, @sarah11918. Do we prefer moving this to #209 to keep all docgen-related ideas in one place? I can copy this over to that issue in that case.

sarah11918 commented 2 years ago

I'll leave it to you to decide what makes your life easier @delucis !

If it's easier together because it's targeting the same script, perfectly fine to copy over stuff from here and just keep going ahead in #209 . If you want to keep the specific ideas separate, I have no problems having two different issues.

delucis commented 2 years ago

OK! I’ve moved this over there. That way if someone’s looking at one of these they might pick up the others if it makes sense to tackle more than one at once. Thanks so much for collating the different thoughts here @Chrissdroid 💜