View Source Magma.View (Magma v0.2.0)
Utility module with helper functions for creating the content of Magma documents.
Summary
Functions
Creates an internal Obsidian link to the given document.
Creates an Obsidian transclusion of the given document or section.
Functions
Creates an internal Obsidian link to the given document.
The document can be given by name or as a Magma.Document
struct.
The optional second argument allows set an alternative label.
Examples
iex> Magma.View.link_to("Document")
"[[Document]]"
iex> Magma.View.link_to("Document", "Alt")
"[[Document|Alt]]"
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|]]"