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

content collections tutorial #10035

Merged
merged 12 commits into from
Nov 21, 2024
Merged

Conversation

sarah11918
Copy link
Member

@sarah11918 sarah11918 commented Nov 15, 2024

Description (required)

This removes the individual "Extend the tutorial with Content Collections" tutorial and instead add a "bonus/optional" section to the existing blog tutorial

Closes #10025

In particular:

  • at this draft stage, provides TWO alternatives (we need to choose only one!) for adding this to the tutorial: as "6.4" or as an optional unit 7
  • lightly edits text for context, now that it is part of the existing tutorial
  • includes create astro updates introduced in create-astro updates astro#12083 (minimal option must be chosen via template flag, is no longer a menu item; Typescript template is automatically set to strict)
  • Includes a redirect
  • updates the tutorial extension as a "next step" card at the end of the tutorial

Still to do:

  • update any code samples as necessary now that the template uses the strict TypeScript setting
  • choose a strategy for where this content is added (new unit? Bonus after Congratulations?)
  • make sure the redirect is correct for our chosen location of the new content!
  • delete the tutorials folder and the add-content-collections.mdx files in other languages. (Is it helpful to keep them for translators because much of the content will be the same as the new file added here?)

For Translators

  • the /tutorials/add-content-collections.mdx file has been deleted but you may wish to go back and find this file from v4 as the basis for your new 6-islands/4.mdx file. It is not identical but it is very similar. You will have to check closely for small changes. You can use the diff in this PR for en/tutorials/add-content-collections.mdx -> en/tutorial/6-islands/4.mdx

Follow up after this PR:

  • update the github repo for the blog tutorial code content-layer branch

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit e54df5b
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/673f58e11615f2000843d0f5
😎 Deploy Preview https://deploy-preview-10035--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sarah11918 sarah11918 added tutorial Content/UI for the Build a Blog Tutorial information architecture reorganizes content on the site 5.0.0-beta labels Nov 15, 2024
@ArmandPhilippot
Copy link
Contributor

at this draft stage, provides TWO alternatives (we need to choose only one!) for adding this to the tutorial: as "6.4" or as an optional unit 7

I'd say an unit 7 could be better:

  • Because this part seems a bit long.
  • If we want to encourage people to use Content Collections instead of the layout: property in the frontmatter of MD files. But, in both cases, it might seem weird after the "Congratulations" part.

Suggestion:

  • Make a Content Collection (optional) could be a separate unit, just after Check in: Unit 6 - Astro Islands.
  • We move Congratulations (6.3) in an unit 8.
  • We add a CardLink at the beginning of unit 7 Make a Content Collection (optional), with something like Skip this optional unit.

It's just an idea... maybe it can be improved. And it depends on the intention: to discourage the use of layout: or not.

@sarah11918
Copy link
Member Author

So one immediate problem with a Unit 7 (and holy cow, no unit 8!!) is how our tracker was designed to fit 6 units 😅

Screenshot 2024-11-15 16 09 37

Also, as you yourself said, the tutorial is LONG. And all you can see when you start is the unit numbers, not for example, that the last one is optional... This is why I am leaning towards being in Chapter 6 (even if the unit title is a little weird for that) and specifically showing it AFTER congratulations in that way.

@sarah11918
Copy link
Member Author

If we want to encourage people to use Content Collections instead of the layout: property in the frontmatter of MD files

Well, we want to give them the option of learning it, but think of how many Astro sites are 1 page portfolios that don't need a collection! (And a lot of new concepts specific to that feature.) That's in part why the tutorial emphasizes the file-based routing and had an additional add-on for those who do have sets of data to manage.

So, I would say it's not necessarily a given that the tutorial should push towards collections, but should make it available.

@ArmandPhilippot
Copy link
Contributor

Hmm yes seen like that... maybe in unit 6 but before "Congratulations" with a link that allows you to skip this step and that targets "Congratulations"? I don't know, it just seems weird to me to add content after "Congratulations". But there are movies that add content after the credits so... 😅

@sarah11918
Copy link
Member Author

Secret bonus track!! 😄

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Nov 18, 2024
@github-actions github-actions bot removed the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Nov 18, 2024
@astrobot-houston
Copy link
Contributor

astrobot-houston commented Nov 20, 2024

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/tutorial/1-setup/2.mdx Source changed, localizations will be marked as outdated.
en/tutorial/3-components/4.mdx Source changed, localizations will be marked as outdated.
en/tutorial/5-astro-api/1.mdx Source changed, localizations will be marked as outdated.
en/tutorial/5-astro-api/2.mdx Source changed, localizations will be marked as outdated.
en/tutorial/5-astro-api/3.mdx Source changed, localizations will be marked as outdated.
en/tutorial/6-islands/4.mdx Localization added, will be marked as complete.
es/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
es/tutorials/add-content-collections.mdx Localization removed, will be marked as missing. 🔄️
fr/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
fr/tutorials/add-content-collections.mdx Localization removed, will be marked as missing. 🔄️
it/tutorials/add-content-collections.mdx Localization removed, will be marked as missing. 🔄️
ja/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
ko/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
ko/tutorials/add-content-collections.mdx Localization removed, will be marked as missing. 🔄️
pt-br/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
ru/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
ru/tutorials/add-content-collections.mdx Localization removed, will be marked as missing. 🔄️
zh-cn/guides/content-collections.mdx Localization changed, will be marked as complete. 🔄️
zh-cn/tutorials/add-content-collections.mdx Localization removed, will be marked as missing. 🔄️
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@sarah11918
Copy link
Member Author

OK, thanks to @ArmandPhilippot for evaluating the code samples and making the neccessary updates!

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Nov 20, 2024
@sarah11918 sarah11918 marked this pull request as ready for review November 20, 2024 14:39
Copy link
Contributor

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@sarah11918 sarah11918 merged commit b082c9c into 5.0.0-beta Nov 21, 2024
10 checks passed
@sarah11918 sarah11918 deleted the content-collections-tutorial branch November 21, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0.0-beta i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! information architecture reorganizes content on the site tutorial Content/UI for the Build a Blog Tutorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants