Our New Field
Our amazing title is pretty amazing, but one title does not a website make. Let's extend the schema a little, so we can get some more interesting content displayed.
Extend the Schema
Edit tina/config.ts, and add a new field to the my_first_collection schema.
Update Content from the Code Side
Now, just to do something a little different, go ahead and edit Hello-World.md file directly in your IDE.
Add some text to the body of the markdown file, like this:
TheisBodyproperty does what it says on the tin - it tells TinaCMS that this property is the "body" of the markdown content (ie, not in front-matter).
Display our New Content
- Edit the
app/awesome-content.tsxcomponent so it renders out the body content:
- Start up your app, navigate to
http://localhost:3000and you will see your incredible body on screen.
What about editing? Well, try going tohttp://localhost:3000/admin/index.htmland you'll see a new field has magically appeared in your visual editor. Hooray! 🙌 🎉