Skip to content

FileRenderer

ContentRenderer is responsible for preparing and rendering the contents of files. It utilizes the Dataview API for data retrieval and an ExtractorDelegator for content extraction. It may extract the contents of specified files or files determined by a specified strategy

Methods

prepareContents()

prepareContents(strategy?): Promise<FileContents>

Higher-level extraction method where a specified strategy determines the files to be processed, then prepares and renders their contents.

Parameters

ParameterTypeDescription
strategy?StrategyMetadataThe extraction strategy to be used

Returns

A Promise that resolves to a FileContents object containing the prepared data

Source

source/retrieve/ContentRenderer.ts:37


prepareFileContents()

prepareFileContents(file?, strategy?): Promise<FileContents>

Prepares the contents of a file for rendering. This method extracts relevant data from the file, including metadata and content based on the specified strategy and evergreen status. It then formats this data into a structured object including the title, contents, and any block reference substitutions.

Parameters

ParameterTypeDescription
file?TFileThe file to be processed.
strategy?StrategyMetadataThe extraction strategy metadata to be used.

Returns

A Promise that resolves to a FileContents object containing the prepared data.

Source

source/retrieve/ContentRenderer.ts:102


Generated using typedoc-plugin-markdown and TypeDoc