Curvea

Advanced

Content Pipeline Internals

The content system lives in:

src/content/contentSystem.js

Purpose

The content system turns Markdown files into page data and collection data.

Collection matching

The content system infers the collection name from the page folder.

Example:

src/pages/blog/[slug].csc

Collection:

blog

Content folder:

src/content/blog

Index handling

For an Index.csc page inside a collection folder, the content system creates a collection page with:

page.collection.items

The resolver also exposes this as collection when available.

Dynamic page handling

For a dynamic page such as [slug].csc, the content system creates one page per Markdown file.

Markdown parsing

Markdown files are parsed into:

  • frontmatter
  • rendered HTML content
  • table of contents
  • body text

Reading time

Reading time is based on 200 words per minute.

Sorting

Collection sorting is specific:

  • blog: date descending, then filename
  • docs: order ascending, then title, then filename
  • other collections: filename ascending

Draft behavior

The content pipeline receives includeDrafts.

  • dev passes true
  • build passes false