zhongwen-obsidian/config.yml
Jack Bond-Preston 4b18a5c037
vault update: 2024-06-16 18:55:01
Affected files:
config.yml
output/mod/arguments.yml
output/mod/capabilities.json
output/mod/config.yml
output/mod/graphers.json
output/mod/guid.txt
output/mod/html/dynamic_footer_inclusions.html
output/mod/html/dynamic_inclusions.html
output/mod/html/graph.template.html
output/mod/html/graph_full_page.template.html
output/mod/html/note.template.html
output/mod/modfile_dependencies.json
output/mod/paths.json
output/mod/user_config.yml
2024-06-16 18:55:01 +01:00

515 lines
20 KiB
YAML

##########################################################################
# PATHS #
##########################################################################
# The note that will be used as the index.html
# should be in obsidian_folder_path_str
# Can be absent when toggles/compile_md == False
# Use full path or relative path, but don't use ~/
obsidian_folder_path_str: 'C:/Users/jackb/Documents/obsidian/jack/'
obsidian_entrypoint_path_str: 'C:/Users/jackb/Documents/obsidian/jack/Index.md'
# Input and output path of markdown files
# This can be an absolute or a relative path (relative to the working directory when calling obsidianhtml)
# Use full path or relative path, but don't use ~/
md_folder_path_str: 'output/md'
# Markdown entrypoint path
# This has to be md_folder_path_str + '/index.md' when toggles/compile_md == True
# This can be an absolute or a relative path (relative to the working directory when calling obsidianhtml)
# Use full path or relative path, but don't use ~/
md_entrypoint_path_str: 'output/md/index.md'
# Output path of HTML files
# This can be an absolute or a relative path (relative to the working directory when calling obsidianhtml)
# Use full path or relative path, but don't use ~/
html_output_folder_path_str: 'output/html'
module_data_folder: 'output/mod'
##########################################################################
# GLOBAL #
##########################################################################
# verbosity_ranks = {
# "quiet": 0,
# "error": 10,
# "warning": 15,
# "deprecation": 20,
# "info": 30,
# "debug": 100,
# }
verbosity: info
##########################################################################
# MODULES #
##########################################################################
module_list:
preparation:
# - name: set_subfolder
# description: Overwrites html_url_prefix and related settings if --subfolder <value> is provided in the commandline
- name: process_config
description: Merges the user config with default config and runs checks.
- name: load_paths
description: Determine all paths of interest based on input.
- name: process_config_auto
description: Fills in auto values that can be read from the vault config.
- name: html_templater
description: Prepare and export templates used to create html output.
persistent: True
- name: load_graphers
persistent: True
- name: get_file_list
description:
- Basic file listing based on include_folder/exclude_glob combination
- Further filtering can be done in further modules
- name: parse_metadata
description:
- Gets the metadata of each markdown file, and stores it under metadata/<rel_filepath>.json
- name: copy_vault_to_tempdirectory
description:
- Copy vault to temporary directory, so that we can edit the obsidian notes themselves safely.
- Must be persistent!
persistent: True
- name: prepare_output_folders
description:
- Ensures the output folders are created
- Optionally removes previous output if it exists in the target directories
# - name: hydrate_file_list
# description:
# - Read and parse the selected files, then create a dict with info such as rel_path, full_path, html_rel_path, etc
convert_note_to_markdown: []
convert_markdown_to_html: []
finalize:
- name: resource_logger
description:
- Creates the log of which module resources were accessed by which module
- Requires persistent meta_module of the same name to work!
persistent: True
method: finalize
meta_modules_post:
- name: resource_logger
persistent: True
# Will create an extra file under module_data_folder/versions/<guid> with timestamp and module name
# for each module file written with the self.modfile(...).write() method.
# Used for debugging purposes.
keep_module_file_versions: False
# Use the name of the module as a key in the dict below
# For accurate configuration settings, consult the spec of the module in question.
# Defaults of the modules are shown in the commented blocks
module_config:
get_file_list:
include_glob:
value: "*.md"
exclude_glob:
value:
- ".obsidian/**/*"
- ".trash/**/*"
- ".DS_Store/**/*"
- ".git/**/*"
# prepare_output_folders:
# clean_existing:
# description: Files that exist in the output folders are deleted.
# value: True
# fail_on_existing:
# description:
# - Exit with error if output folders are not empty.
# - Does nothing if clean_existing = True!
# value: False
# filter_on_metadata:
# include_on:
# description: What metadata to include notes on. Empty list means True by default.
# value: [[]]
# exclude_on:
# description: What metadata to exclude on. Empty list means False by default
# value: [[]]
##########################################################################
# OPERATIONS #
##########################################################################
# When not an empty list, this setting will restrict the subfolders
# of the vault that will be included. This allows you to ensure that
# only those folders are included in the output. Links pointing to notes
# outside of the included folders will be treated as non-existent.
# Note that the obsidian_entrypoint_path_str needs to be in one of these folders.
# Paths should be relative to the vault root.
included_folders: []
# Exclude glob
# The paths are relative to obsidian_folder_path_str
# - Start with slash to target specific folder: /subfolder
# - Target any folder with name "subfolder": subfolder
# Glob patterns supported for copy_vault_to_tempdir_method: shutil, shutil_walk, and for rsync for as far as rsync supports it natively
# When turning off copy_vault_to_tempdir, glob patterns are fully supported.
# Rules are case sensitive if your filesystem is.
exclude_glob:
- "/.obsidian"
- "/.trash"
- "/.DS_Store"
- "/.git"
# Deprecated for exclude_glob
exclude_subfolders: '<DEPRECATED>'
# Number of links a note can be removed from the entrypoint note
# -1 for no max depth
# 0 means only the entrypoint note is processed
# 1 means only direct children are processed (and the entrypoint of course)
# and so forth. NOTE: DOES NOT APPLY TO INCLUSIONS!
max_note_depth: -1
# =============================== COPY VAULT SETTINGS ============================
# Safety feature: make a copy of the provided vault, and operate on that, so that bugs are less likely to affect the vault data.
# Should be fine to turn off if copying the vault takes too long / disk space is too limited.
# The tempdir is automatically removed on exit of the program.
copy_vault_to_tempdir: True
# Determines the function to use to copy your vault over to the tempdir.
# `default` will try to use rsync if it is installed, and otherwise use `shutil`
# `rsync` will do the same, but give a warning when it falls back to shutil
# `shutil` will just use shutil to copy. Use this when rsync is installed but is giving problems.
# `shutil_walk` will walk the directory tree manually, and call the copy function for each branch. This has been seen to work better on Macs in some cases.
copy_vault_to_tempdir_method: default
# Enable to print the files being copied
copy_vault_to_tempdir_follow_copy: false
# =============================== /COPY VAULT SETTINGS ============================
# ObsidianHtml needs to be able to discern between included notes and included files, because included files
# need to be treated differently. This is a configurable setting because we might've missed certain suffixes
# of files that are includable.
included_file_suffixes: ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'svg', 'mp4', 'webm', 'ogv', 'mov', 'mkv', 'mp3', 'wav', 'm4a', 'ogg', '3gp', 'flac', 'pdf']
video_format_suffixes: ['mp4', 'webm', 'ogv', 'mov', 'mkv']
audio_format_suffixes: ['mp3', 'webm', 'wav', 'm4a', 'ogg', '3gp', 'flac']
# files that should be included via an <embed> tag:
embeddable_file_suffixes: ['pdf']
# How to populate non-Markdown files in the output directory.
# Note that hard links do not work cross-filesystem, and some environments may need administrative rights to create links.
# Hard links are also more prone to data loss due to the sharing of inodes. `symlink` is a good safe bet, if your environment works with it.
# If you store your vault in a Git repository, you will need to modify `core.symlinks` in your gitconfig or else only the links will be committed; see `man git-config`.
# `default` is `copy` for backwards compatibility to avoid breaking configurations.
# `copy` simply copies the files from the input folder to the output.
# `symlink` creates a symbolic link, or soft link, that points to the input file.
# `hardlink` creates a hard link
copy_output_file_method: default
# If links should be fully resolved before linking.
# This is useful on filesystems that do not allow symlinks of symlinks, or where these nested links can affect permissions, like on some BSDs.
resolve_output_file_links: true
# Used to strip the http url hostpart of a link to get a relative link
# e.g. for value "https://git.com/user/repo/-/wikis/mywiki/" then:
# "https://git.com/user/repo/-/wikis/mywiki/folder/markdown.md" --> /folder/markdown.md
md_source_host_urls: []
##########################################################################
# HTML OUTPUT #
##########################################################################
# Will be inputted into the Html template as page title
# Not used anywhere else atm.
site_name: 'Obsidian-Html/Notes'
# Use when deploying to https://mydomain.com/html_prefix/ instead of https://mydomain.com/
# use '/html_prefix' (prepend slash, no slash at the end)
html_url_prefix: ''
# Provide the fullpath to a template file to use instead of standard template.
# Note that this file must contain at least "{content}" somewhere in the page.
html_template_path_str: ''
# Provide an array of custom inclusions (css, javascript, etc) that you would like to be included in the resultant html
html_custom_inclusions: []
html_custom_footer_inclusions: []
navbar_links: []
file_exports: []
# file_exports:
# - encoding: binary
# src: Resources/Includes/favicon.ico
# dst: favicon.ico
# - src: Resources/Includes/christmas_snowflakes.js
# dst: obs.html/static/christmas_snowflakes.js
##########################################################################
# OPTIONAL BEHAVIOR / FEATURES #
##########################################################################
toggles:
stdout_current_file: False
# Opt-in/-out of Obsidian->Md conversion, set to False when using proper markdown as input
compile_md: True
# Opt-in/-out of Md->Html conversion, set to False when only wanting to get proper markdown from Obsidian
compile_html: True
# For compatibility with vaults/notes that have the 'Strict Line Breaks' option enabled
# This is off by default in Obsidian; setting it to True will not insert <br> tags into multi-line paragraphs
# Can be true, false, or "auto". The latter will read the vault's app.json for the value.
strict_line_breaks: auto
# gitlab is case insensitive, this setting should be true when converting a wiki from that source
# might also be useful if you have markdown links in your vault
# note that this does not impact the output, Hello.md will be written to Hello.html
force_filename_to_lowercase: True
# Slugify all HTML links. Note this will affect most internal uses of filename as well, like when matching
# against exclusion lists.
slugify_html_links: False
# If this is false only the entrypoint and all its links (recursively) are processed
# if true all the notes will be processed
process_all: False
# Can be overwritten ad-hoc by using "obsidianhtml -i config.yml -v" (the -v option)
verbose_printout: False # deprecated for verbose
debug_filetree_keys: False
# This option should be False for Obsidian->Md, but can be True when compile_md == False
# Setting it to True will cause an error when two files with the same file name are found anywhere in the input folder
allow_duplicate_filenames_in_root: True
# Sometimes linked images that should be local (based on the path) cannot be found.
# Toggle this to False to disable warnings if that happens.
warn_on_skipped_image: True
warn_on_skipped_file: True
# This will skip emptying output folders, if you want to implement this yourself
no_clean: False
# Whether the markdown interpreter assumes relative path when no / at the beginning of a link
relative_path_md: True
# Whether the html paths will be relative.
# Note: This is only useful if you want to open the html locally on your machine without using a webserver
# and is generally not advised. This will also disable all features that need a webserver to function
# such as the graph view.
relative_path_html: False
# Whether external http anchor links should have a target of "_blank"
external_blank: False
# If alt text is specified, place it in a figure caption under the image.
img_alt_text_use_figure: True
# Will preserve inline tags. This will give polluted markdown output
preserve_inline_tags: True
# Will wrap inclusions with <div class="inclusion">{content}</div>
wrap_inclusions: False
features:
styling:
layout: documentation # documentation, tabs, minimal
header_template: full # <full, minimal> currently only supported for documentation layout
max_note_width: 120rem # not supported for layout: tabs
add_toc: '<DEPRECATED>' # add "[TOC]" (Table of Contents) when missing
toc_pane: '<DEPRECATED>' # removes table of contents from the note and puts it in the right pane (not supported for layout:tabs)
flip_panes: '<DEPRECATED>' # switch right and left pane around. (does nothing unless in documentation layout.)
add_dir_list: True # show directory contents in one of the panes (only documentation layout)
accent_color: '65, 76, 253'
loading_bg_color: '22, 22, 22'
theme_picker:
enabled: True
styling:
show_icon: True
smiles:
enabled: False
theme: dark # dark, light, oldschool, oldschool-dark, solarized, solarized-dark, matrix, github, carbon, cyberpunk, gruvbox, gruvbox-dark
width: "100%" # XXX%, XXXpx, XXX
height: "300px" # XXX%, XXXpx, XXX
code_highlight:
enabled: True
mermaid_diagrams:
enabled: True
strip_special_chars: False
callouts:
enabled: True
math_latex:
enabled: True
backlinks: # Show backlinks at the bottom of each note
enabled: True
embedded_note_titles:
enabled: True
hide_on_h1: True # don't add embedded title if the note starts with an h1
search:
enabled: True
add_files: True
try_preload: False # on page refresh, if search_data is stored in localStorage, it will init search, instead of waiting for the search panel to be opened.
styling:
show_icon: True
embedded_search:
enabled: False
tags_page:
enabled: True
styling:
show_icon: True
show_in_note_footer: True
dataview:
enabled: False
folder: 'obs.html/export' # relative to the vault being processed. this folder should always be in the vault
folder_notes:
enabled: False
placement: 'outside folder' # 'inside folder' , 'outside folder'
naming: 'folder name' # 'folder name', 'index', 'aurkibidea', 'etc'
eraser:
enabled: True
breadcrumbs:
enabled: False
# Include code to build the graph view per page
graph:
enabled: True # Include code to build the graph view per page (default: True)
templates:
- id: 2d
name: 2d
path: builtin<2d>
- id: 3d
name: 3d
path: builtin<3d>
styling:
show_icon: True
coalesce_force: '-30'
show_inclusions_in_graph: True
rss:
enabled: False
host_root: 'https://localhost:8000/'
styling:
show_icon: True
channel:
title: 'Notes'
website_link: '<https://your website.com>'
description: '<your description>'
language_code: 'en-us'
managing_editor: 'n/a'
web_master: 'n/a'
items:
selector:
match_keys: []
exclude_keys: []
include_subfolders: []
exclude_subfolders: ['.git','obs.html']
exclude_files: ['not_created.html', 'index.html']
description:
selectors:
- ['yaml','rss:description']
- ['first-paragraphs', 2, '<br/><br/>']
- ['first-header', 1]
title:
selectors:
- ['yaml','rss:title']
- ['first-header', 1]
- ['path', ['parent',1], '/', ['stem']]
publish_date:
selectors:
- ['yaml','rss:publish_date']
- ['yaml_strip','tags',['date/']]
iso_formatted: True
format_string: '' #'%Y-%m-%d'
default_value: ''
create_index_from_dir_structure:
enabled: True
verbose: False
rel_output_path: 'obs.html/dir_index.html'
styling:
show_icon: True
exclude_subfolders:
- ".git"
- "__src"
- "md"
- "obs.html"
exclude_files:
- ".gitignore"
- "favicon.ico"
- "not_created.html"
homepage_label: "index"
# Create a markdown file with links to notes that have one of the given tags.
create_index_from_tags:
enabled: False
verbose: False
rel_output_path: 'obs.html/tag_index.md'
homepage_label: "index"
use_as_homepage: False
add_links_in_graph_tree: True
tags: []
match_on_inline_tags: False
styling:
include_folder_in_link: False
sort:
method: 'none' # <key_value, creation_time, modified_time, none> ! created_time not available on Linux!
key_path: '' # empty for top level, use ':' to go down multiple levels
value_prefix: '' # in case of multiple values under key_path, match on this prefix, and then remove prefix
reverse: false # false/true reverses output
none_on_bottom: true # will put notes at the bottom that do not have the sort key, otherwise at the top
exclude_paths: # don't included these paths in the dir list
- ".gitignore"
table_of_contents:
add_toc_when_missing: False # add "[TOC]" (Table of Contents) when missing
only_show_for_multiple_headers: True # if there is only one header, don't show the TOC
side_pane: # only valid for documentation layout
left_pane:
enabled: True
close_if_empty: False
width: 20rem
contents: dir_tree # <toc, tag_tree, dir_tree, html_page> relevant features should be enabled and configured see docs
content_args:
rel_path: 'index.html' # used for html_page
div_selector: '.content' # used for html_page
strip_sub_divs: # used for html_page
- '.toc'
strip_tags: [] # used for tag_tree
right_pane:
enabled: True
close_if_empty: True
width: 16rem
contents: toc # <toc, tag_tree, dir_tree, html_page> relevant features should be enabled and configured see docs
content_args: # used for html_page
rel_path: 'index.html'
div_selector: '.content'
strip_sub_divs:
- '.toc'
footnote_md_extension:
enabled: True
post_processing: []
# post_processing:
# - module: md_markdown_callouts