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

Add note about having to run astro build before astro preview #5604

Merged

Conversation

hirasso
Copy link
Contributor

@hirasso hirasso commented Dec 5, 2023

Description (required)

Yesterday I got bitten by not having completely understood that astro preview doesn't automatically build the project. This PR adds a caution box to save others some time:

CleanShot 2023-12-05 at 10 02 52@2x

Related issues & labels (optional)

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Dec 12, 2023 11:07am

@astrobot-houston
Copy link
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@sarah11918 sarah11918 added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Dec 11, 2023
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution, @hirasso ! We appreciate you taking the time to add some helpful content for the next person! 🙌

I have edited the format of your content to be more in line with the rest of our docs. We rarely add notes, which are for tangential information, and almost never add cautions which are for truly alarming/security issues to watch out for.

We prefer to incorporate important content into the main text itself, instead of new content being "oh, and another thing!" or "Oh, and note this!" This makes for a better reading experience, and if it's important content, it should be said right the first time.

I've reviewed our documentation both on astro build and astro preview and added a bit of extra context right in the description to show that preview is meant to be used in conjunction with build. Rather than a scary warning message, I have linked the two together.

I do think this is helpful extra context to have, and we are happy you contributed it! Welcome to Team Docs! 🥳

@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Dec 11, 2023
@hirasso
Copy link
Contributor Author

hirasso commented Dec 11, 2023

Hi Sarah! Thanks for your help with this. Appreciate it!

After reading through the updated text, I must confess that I would still not understand that astro preview doesn't run astro build automatically 😅. It's probably absolutely clear to you, but for an outsider with no concept of Astro's internals it would be helpful to at least add a little something mentioning this fact.

@hirasso
Copy link
Contributor Author

hirasso commented Dec 11, 2023

As an aside note: very interesting to read your thoughts about when to use a note/caution. I just plain love the Astro docs! ❤️

@sarah11918
Copy link
Member

Hi @hirasso, See what you think now! I tried to add a little bit more context in both the opening line and the next paragraph.

@hirasso
Copy link
Contributor Author

hirasso commented Dec 12, 2023

@sarah11918 now it's much more clear! Ready to be merged I'd say 😊

dreyfus92 added a commit that referenced this pull request Jan 14, 2024
…mdx` (#6363)

* i18n(fr) Update reading-time.mdx

Just for translator tracker because the PR #5766 should have been [ignore]

* Update astro-pages.mdx

* Update framework-components.mdx

* Update layouts.mdx

* Update routing.mdx

* Update editor-setup.mdx

* Update configuring-astro.mdx

* Update cloudflare.mdx

* Update deno.mdx

* Update netlify.mdx

* Update vercel.mdx

* Update imports.mdx

* Update auto.mdx

* Update manual.mdx

* Update cli-reference.mdx

Update and del some parts

* Update cli-reference.mdx

Update fiule with PR #5512 #5651 #5604 #5765 #6040 #6043 #6109 #6267

* Update auto.mdx

* Update cloudflare.mdx

fix PR #5284

* Update markdown-content.mdx

* Update auto.mdx

* Update src/content/docs/fr/core-concepts/astro-pages.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/astro-pages.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/astro-pages.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/framework-components.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/framework-components.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/guides/markdown-content.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/install/manual.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/install/manual.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/reference/cli-reference.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
ematipico pushed a commit that referenced this pull request Jan 26, 2024
)


Co-authored-by: Elian <hello@elian.codes>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
ematipico pushed a commit that referenced this pull request Jan 26, 2024
…mdx` (#6363)

* i18n(fr) Update reading-time.mdx

Just for translator tracker because the PR #5766 should have been [ignore]

* Update astro-pages.mdx

* Update framework-components.mdx

* Update layouts.mdx

* Update routing.mdx

* Update editor-setup.mdx

* Update configuring-astro.mdx

* Update cloudflare.mdx

* Update deno.mdx

* Update netlify.mdx

* Update vercel.mdx

* Update imports.mdx

* Update auto.mdx

* Update manual.mdx

* Update cli-reference.mdx

Update and del some parts

* Update cli-reference.mdx

Update fiule with PR #5512 #5651 #5604 #5765 #6040 #6043 #6109 #6267

* Update auto.mdx

* Update cloudflare.mdx

fix PR #5284

* Update markdown-content.mdx

* Update auto.mdx

* Update src/content/docs/fr/core-concepts/astro-pages.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/astro-pages.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/astro-pages.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/framework-components.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/core-concepts/framework-components.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/guides/markdown-content.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/install/manual.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/install/manual.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Update src/content/docs/fr/reference/cli-reference.mdx

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants