struct

Plombir::Content::Document

Inherits Struct < Value < Object

Constructors

new(page : Page, frontmatter : Frontmatter::Document, route : Router::Route, collection : String)
Source

Class methods

excerpt(frontmatter : Frontmatter::Document, length : Int32 = 200) : String

Excerpt precedence: explicit excerpt: frontmatter, then the body up to <!--more-->, then the first ~200 characters cut at a word boundary. The fallback skips leading blank lines and ATX headings (the title already shows beside the listing). Operates on the raw Markdown body; templates decide how to render or strip it.

Source

Instance methods

collection

Owning collection name (e.g. "posts", "root").

Source
date
Source
description
Source
draft?

Whether the page is a draft (draft: true or _-prefixed).

Source
excerpt

Short summary; see .excerpt for precedence.

Source
layout
Source
output_path

Output path under dist/ (e.g. "posts/a/index.html").

Source
relative_path

Source path relative to content/ (e.g. "posts/a.md").

Source
tags
Source
title
Source
url

Pretty URL (e.g. "/posts/a/").

Source