-
-
Notifications
You must be signed in to change notification settings - Fork 100
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-v5 #33
base: content-collections
Are you sure you want to change the base?
Conversation
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.
You did well to send me the link to this PR! I don't know how, but it seems I skipped a step ("Add client-side interactivity" in "Back on dry land")... I just noticed it when I cloned your branch and checked out the files.
I noticed two Typescript errors in src/components/ThemeIcon.astro
, I can't add suggestions since the file is not updated:
l44
: because ofreturn localStorage.getItem("theme");
the value is either a string or null and we get a Typescript error line 58 (setItem
). So either we add anif
beforel58
or we return a default value inl44
(e.g.?? "light"
).l68-69
: we getObject is possibly 'null'
, so we need a?
onl70
(?.addEventListener("click", handleToggleClick);
)
Do you want me to create a PR for the tutorial in docs?
Sorry for the mess here, I edited multiple time while I was doing the tutorial again... 👀
-
So I continued the tutorial where I left off earlier to see if I missed anything else... and it seems I added the types in individual steps but I forgot to add them in some
Final code sample
/Code check-in
snippets... -
Okay it's weird, I didn't skipped this step! When I follow the tutorial I don't have Typescript errors on
ThemeIcon.astro
... So I don't know if what I said before is useful... 😅 -
Tutorial done! 🎉 So except this weird thing, we're good and the code here seems to match the tutorial!
One last question, should the content-layer
branch exist or should we use content-collections
in the docs?
At the end of the tutorial we have a broken link: https://5-0-0-beta.docs.astro.build/en/tutorial/6-islands/4/ > "see the Content Collections branch of the tutorial repo" targets https://github.com/withastro/blog-tutorial-demo/tree/content-layer
Thanks for this! Please make a PR to this PR branch and I'll update this with all your changes as necessary! (A little tricky because I can't merge this one until Tuesday) |
Co-authored-by: Armand Philippot <[email protected]>
Done in #34 |
@ArmandPhilippot Absolutely! Please update the docs! And thank you! |
This updates the
content-collections
branch of the tutorial for v5 (beta).It will work as expected for v5, and can be updated to stable at any time, but is not important to do so immediately.