The frontmatter type
This type includes all properties from T plus four additional properties:
content: The full markdown contentlocale: Language/region identifierslug: URL-friendly identifierfolder: Directory pathFor a version without the content property, see NavigationObject.
Creating an IndexObject with TechnicalNoteFrontmatter
const indexObj: IndexObject<TechnicalNoteFrontmatter> = {
All TechnicalNoteFrontmatter properties:
title: 'My Post',
description: 'A description',
date_created: '2025-01-01',
date_updated: '2025-01-02',
date_published: null,
pinned: false,
tags: ['javascript'],
Plus IndexObject-specific properties:
content: '# Markdown content here',
locale: 'en',
slug: '/technical-posts/my-post',
folder: 'technical-posts'
};
Represents a complete index object that extends frontmatter with additional metadata.
This type uses TypeScript's intersection (
&) to combine all properties from the generic frontmatter typeTwith index-specific properties.