-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Document base #5693
[docs] Document base #5693
Conversation
|
packages/astro/src/@types/astro.ts
Outdated
* <a href="/docs/about/>About</a> | ||
* <img src="/docs/image.png"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe show how we'd write URLs that adapt to changing base URLs?
* <a href="/docs/about/>About</a> | |
* <img src="/docs/image.png"> | |
* <a href="{import.meta.env.BASE_URL}/about/">About</a> | |
* <img src="{import.meta.env.BASE_URL}/image.png"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we show this instead of using the base from the example? Or in addition to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd thought the literal base was clear enough, but it might not be. You could do one of each?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think /docs/
is clear enough, but using `${import.meta.env.BASE_URL}/image.png`
for the second example couldn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much more clear, thanks for sorting this out!
Is there a way to make this work with hero? ---
hero:
actions:
- text: Getting Started
link: /guides/getting-started/ # <-- not adjusted with `base` |
Changes
Closes three open Docs issues 😅 by incorporating everyone's feedback re: documenting base.
Was previously blocked by #4988 and so placeholder language to describe actual behaviour at the time was used.
This documents the intended, and now functioning, behaviour of
base
.Testing
No tests.
Docs
/cc @withastro/maintainers-docs for feedback!
/cc @matthewp for technical check!