PageEntity
Represents a documentation page.
Instance Methods
Frontmatter
#
data
→ Hash
Merged data hash. Combines data
set in frontmatter
with any global default values.
Identity
#
id
→ String
Human-readable unique ID for the entity.
#
label
→ String
Titlized name for use in navigation etc.
Can be customized using the @label
tag where supported.
#
name
→ String
Parameter-safe entity name.
#
title
→ String
Page title, as defined in frontmatter.
Defaults to the page label
if not provided.
#
type
→ Symbol
Entity type identifier.
Paths
#
directory_path
→ Pathname
Full directory path for the entity file.
Aliases:
#
file_extension
→ String
Extension of the entity file.
#
file_name
(strip_ext = false)
→ String
Name of the entity file.
Includes file extension unless the strip_ext
argument is true
.
Arguments:
strip_ext
|
Boolean
|
Whether or not to remove the file extension |
#
file_path
→ Pathname
Full path to the entity file.
Aliases:
#
last_modified
→ Time
Time that the entity file was last modified.
#
lookup_path
→ String
Canonical reference path.
Used for generating URL paths and looking up entities.
Aliases:
#
relative_directory_path
→ Pathname
Relative directory path for the entity file.
Returned path is relative to the appropriate base directory (i.e. the preview directory for previews).
#
relative_file_path
→ Pathname
Relative path to the entity file.
Returned path is relative to the appropriate base directory (i.e. the preview directory for previews).
Aliases:
Predicates
#
header?
→ Boolean
Whether the page header will be shown.
Set via the header
frontmatter property.
#
landing?
→ Boolean
Whether the page is the default landing page.
Set via the landing
frontmatter property.
#
markdown?
→ Boolean
Whether the page content should be rendered with the Markdown renderer.
Set via the markdown
frontmatter property.
URLs
#
docs_path
→ String
The docs URL path for this page.
Aliases:
Visibility
#
visible?
→ Boolean
Whether or not the entity is visible (i.e. present in navigation).