View Source Magma.View (Magma v0.2.0)

Utility module with helper functions for creating the content of Magma documents.

Summary

Functions

Link to this function

button(label, command, opts \\ [])

View Source
Link to this function

callout(text, type \\ "info")

View Source
Link to this function

delete_current_file_button()

View Source
Link to this function

include(document_or_section, subsection \\ nil, opts \\ [])

View Source
Link to this function

include_context_knowledge(concept)

View Source
Link to this function

transclude(document_or_target, section \\ nil)

View Source

Creates an Obsidian transclusion of the given document or section.

The document can be given by name or as a Magma.Document struct.

The optional second argument can be used to specify a specific section to be transcluded.

Examples

iex> Magma.View.transclude("Document")
"![[Document|]]"

iex> Magma.View.transclude("Document", "Section")
"![[Document#Section|]]"
Link to this function

transclude_concept(document, section \\ nil)

View Source
Link to this function

transclude_preview(document, section \\ nil)

View Source
Link to this function

transclude_prompt(document, section \\ nil)

View Source
Link to this function

transclude_prompt_result(document, section \\ nil)

View Source
Link to this function

transclude_version(document, section \\ nil)

View Source