Skip to main content

The example blog

Most examples in Concepts, Build and Look it up use one team blog. A few pages use their own example data, and the CLI pages add names of their own. Open this page when you meet a name in an example and want to know what it is.

The blog's posts are entries of the Blog post content type, and they live under /blog. The example post is AI 101, at /blog/ai-101. In Studio, the blog is a project named Blog.

The names the examples use, grouped by where each one lives. Avatar, BlogHero, BlogBody and PostCard are components in your code. The Blog post, Author and Topic page content types, the Author card global field and the entries AI 101 and Priya are in your stack. The Post hero, Post body, Related posts, Author card, Post byline and Post card sections and the Blog post, Featured post, Topic page and About templates are built in Studio. A footer pairs the names that look alike: BlogHero is not inside Post hero, Avatar is inside Author card, and PostCard is inside Post card.

Names in the examplesโ€‹

Components, sections and templates defines the words component, section and template.

KindNamesWhat to know
ProjectBlogThe Studio project. Studio saves its layouts in the stack's Compositions content type, and the project deploys to the production environment.
Content typesBlog post (blog_post), Author (author), Topic page (topic_page)Topic page has no entries.
Global fieldAuthor card (author_card)It has a name, a role, a photo and a link. Blog post and Topic page both use it.
EntriesAI 101, Getting started with prompts, ML basics, PriyaThe first three are Blog posts, and Priya is an Author. The examples preview AI 101 unless a page says otherwise.
ComponentsAvatar, BlogHero, BlogBody, PostCardComponents from the blog's code, registered with Studio. The Components tab shows Avatar and BlogHero as Avatar and Blog Hero. Avatar and BlogHero sit in a group named Blog ยท Components.
SectionsPost hero, Post body, Related posts, Post byline, Author card, Post cardBuilt in Studio from components. Other pages add a few more.
TemplatesBlog post, Featured post, Topic page, AboutThe first three are connected. About is freeform, at /about. The Blog post template holds Post hero, Post body and Related posts.

Example names that look alikeโ€‹

These names look alike, and some of them name two things at once.

  • BlogHero and Post hero. BlogHero is a component, and Post hero is a section. Post hero is built from Studio's Image and Header with Avatar, so it doesn't contain BlogHero.
  • Avatar, Author card and author_card. Avatar is a component that shows the author's round photo. Author card is the name of both a section and a global field, and author_card is the global field's UID. The Author card section holds Avatar with Studio's Header and Paragraph, bound to the author_card global field.
  • PostCard and Post card. PostCard is a component, and Post card is a section that holds it.
  • Blog and Blog post. Blog is the project. Blog post and Topic page are each both a content type and a template, and the template is connected to the content type. The docs write "the Blog post template" for the template.
  • Related posts and Related Posts. The Data Picker capitalizes each word of a field name, so the field Related posts shows there as Related Posts.

Where to go nextโ€‹

Report a problem with this page