Skip to content
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

Merged
merged 7 commits into from
Jan 4, 2023
Merged

[docs] Document base #5693

merged 7 commits into from
Jan 4, 2023

Conversation

sarah11918
Copy link
Member

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!

@sarah11918 sarah11918 requested a review from a team as a code owner December 29, 2022 14:59
@changeset-bot
Copy link

changeset-bot bot commented Dec 29, 2022

⚠️ No Changeset found

Latest commit: df74441

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 460 to 461
* <a href="/docs/about/>About</a>
* <img src="/docs/image.png">
Copy link
Contributor

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?

Suggested change
* <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">

Copy link
Member Author

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?

Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Member

@natemoo-re natemoo-re left a 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!

@sarah11918 sarah11918 removed the request for review from a team January 4, 2023 20:41
@sarah11918 sarah11918 merged commit 5df4a89 into main Jan 4, 2023
@sarah11918 sarah11918 deleted the sarah11918-patch-1 branch January 4, 2023 20:50
@unional
Copy link

unional commented Sep 25, 2024

Is there a way to make this work with hero?

---
hero:
  actions:
    - text: Getting Started
      link: /guides/getting-started/ # <-- not adjusted with `base`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants