View Source Magma.Vault.BaseVault (Magma v0.2.0)

Provides utilities to interact with predefined and custom base vaults.

A base vault is a preconfigured Obsidian vault that serves as a template when initializing a new Magma vault.

Creating a new base vault

If you are looking to create a new base vault (either a local one or as a contribution to the Magma project), ensure you include the required plugins from the default base vault:

Also, it's vital to copy the configurations of the Shell Commands and QuickAdd plugins, as they include the integration with the respective Magma mix tasks.

Summary

Functions

Returns the path to a base vault.

Returns the path to a base vault and raises an error when the given base vault does not exist.

Types

@type theme() :: atom()

Functions

Link to this function

path(path_or_theme \\ nil)

View Source

Returns the path to a base vault.

Either the atom name of one of the predefined base vault in the priv/base_vault directory of Magma can be used or the path to a custom local base vault. If no base vault is given the default base vault is used.

# Get path for the default base vault
Magma.Vault.BaseVault.path()

# Get path for a predefined base vault
Magma.Vault.BaseVault.path(:custom_theme)

# Get path for a custom base vault
Magma.Vault.BaseVault.path("/path/to/custom/base/vault")
Link to this function

path!(path_or_theme \\ nil)

View Source

Returns the path to a base vault and raises an error when the given base vault does not exist.

Accepts the same arguments as path/1.