Skip to content
New: Customize your theme with an AI assistant. Read the guide

Content Collections & Routes

Techbyte’s content system is more advanced than a simple “one Markdown file equals one page” setup.

The project uses Astro content collections defined in:

  • src/content.config.ts

In the Sanity edition, this content is documents in your Sanity project instead of files, and the same routes read them. See Editable In Sanity.

Main Collections

Techbyte defines collections for:

  • pages
  • blog
  • services
  • projects
  • team
  • testimonial
  • sections
  • homepage
  • and more (about-us, contact, faq, pricing, author)

Several collections are configurable through config.toml:

[settings]
blogFolder = "blog"
serviceFolder = "services"
projectsFolder = "projects"
testimonialFolder = "testimonial"
teamFolder = "team"

That means route behavior and content lookup depend partly on config, not just file names. Note the singular key names: serviceFolder and testimonialFolder.

The Catch-All Static Page Route

Generic static pages are rendered by:

  • src/pages/[...lang]/[page].astro

That file:

  1. loads all entries from the pages collection
  2. creates static paths for each supported language
  3. uses SinglePageLayout.astro to render the body

So files like these:

  • src/content/pages/english/privacy-policy.md (.mdx in the Tina edition)
  • src/content/pages/english/terms-conditions.md (.mdx in the Tina edition)
  • src/content/pages/english/components.mdx

become localized routes through that catch-all page.

Reusable Sections Are Not Standalone Pages

Files in src/content/sections/<language>/ are usually not routed directly.

They are data sources for section components such as:

  • src/layouts/components/sections/HeroSection.astro
  • src/layouts/components/sections/AboutSection.astro
  • src/layouts/components/sections/ServicesSection.astro

This is why editing a section file changes multiple pages at once when that section is reused. Several sections also have a -two version, such as about-section-two.md. Home 02 uses most of them, and some inner pages use them too.

Adding A New Entry

Add a file to a language folder, such as src/content/services/english/, or use Create New in the Tina edition, or the + button in the Sanity edition. An entry exists in one language, so add one for every language.

A new entry with only a title won’t break the site, and it builds. Its card or page shows what you filled in, and images and other fields stay empty until you add them, so fill them in before you publish.

Route Generation Mental Model

Use this simple rule:

  • src/pages/... decides the route
  • src/content/... usually provides the data
  • src/layouts/components/... controls rendering

That separation is powerful, but it is also the main reason Techbyte feels more “app-like” than a basic Markdown theme.

Type something to search...