Documentation
¶
Overview ¶
Package paths resolves mdoc's per-user directories.
User-authored files (themes, and any future hand-edited config) live under an XDG-style config directory — $XDG_CONFIG_HOME/mdoc when set, otherwise ~/.config/mdoc — on every platform. That's deliberately the same friendly ~/.config path everywhere rather than os.UserConfigDir's platform default (e.g. ~/Library/Application Support on macOS), since users have to drop theme files in by hand and navigating to Library isn't ergonomic.
Regeneratable downloads (the Chromium snapshot) are NOT here — they stay in the system cache dir; see internal/browser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
ConfigDir returns mdoc's user config directory: $XDG_CONFIG_HOME/mdoc when that env var is set, otherwise ~/.config/mdoc.
func Display ¶
Display formats a path for showing to the user: made absolute, then with the home directory collapsed to "~" (e.g. "~/Github/mdoc/doc.md"). Paths outside the home directory, or anything that can't be resolved, are returned as the best absolute form available. This is presentation only — never feed the result back into file operations.
Types ¶
This section is empty.