docs icon indicating copy to clipboard operation
docs copied to clipboard

Update images.mdx

Open alexnguyennz opened this issue 1 year ago • 3 comments

Description (required)

  • code block titles - MyImages implies a component but is in pages folder, add src/components/
  • formatting - same quotes and semicolons used in each code block, closing img and Image tags, spaces
  • add Output comment like other img and picture examples
  • making Image or Picture components multiline formatted if they're probably too long for one line (like other examples)

alexnguyennz avatar Mar 04 '24 19:03 alexnguyennz

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Apr 1, 2024 2:28pm

vercel[bot] avatar Mar 04 '24 19:03 vercel[bot]

I will have to check, but I don't think we typically show a closing tag for the regular HTML <img> tag, especially to further distinguish it from the components! Hang tight!

sarah11918 avatar Mar 10 '24 13:03 sarah11918

Hey I just had a check, there seems to be usages for both e.g.

<img> on other pages:

  • https://docs.astro.build/en/guides/migrate-to-astro/from-gatsby/#gatsby-image-plugin-to-astro
  • https://docs.astro.build/en/guides/migrate-to-astro/from-nextjs/#next-image-plugin-to-astro
  • https://docs.astro.build/en/guides/migrate-to-astro/from-nuxtjs/#nuxt-image-plugin-to-astro

<img /> on other pages:

  • https://docs.astro.build/en/reference/api-reference/#image-
  • https://docs.astro.build/en/reference/api-reference/#picture-

<img> seems to always be used in a sentence or outside of code otherwise /> is usually used e.g. https://github.com/search?q=repo%3Awithastro%2Fastro+%3Cimg&type=code

alexnguyennz avatar Mar 13 '24 20:03 alexnguyennz

Makes sense! Have put those through.

alexnguyennz avatar Mar 29 '24 20:03 alexnguyennz