frontity / step-by-step-tutorial

Step-by-step tutorial designed to help you learn website development with Frontity.
https://tutorial.frontity.org/
Apache License 2.0
15 stars 10 forks source link

The "Using a single component for both posts and pages" subsection adds inconsistency to the tutorial #9

Closed juanmaguitar closed 3 years ago

juanmaguitar commented 3 years ago

I would remove the subsection Using a single component for both posts and pages because I think it creates some confusion about how the file /packages/my-first-theme/src/components/post.js should be

The /packages/my-first-theme/src/components/index.js is also affected depending on the way to manage posts & pages

So, for the sake of simplicity I would just stick the tutorial to using different components (<Page> & <Post>) to manage these different types of content

This would make no need of the warning info at the end of Display posts and pages separately and continuing the code from Styling the post info would be easier to follow

mburridge commented 3 years ago

I've removed this section and added a suggestion in 'other-things-to-do.md' to combine the <Post> and <Page> components into a single component with conditional display.