File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,10 +29,6 @@ class MkdocsNoteConfig(Config):
2929 - insert_num: The number of recent notes to insert
3030 """
3131
32- notes_template = config_opt .Type (str , default = "overrides/templates/default.md" )
33- """The template of the notes.
34- """
35-
3632 # Network Graph Configuration
3733 graph_config = config_opt .Type (
3834 dict ,
@@ -48,19 +44,3 @@ class MkdocsNoteConfig(Config):
4844 - name: Node naming strategy ("title" or "file_name")
4945 - debug: Enable debug logging for graph generation
5046 """
51-
52- # CLI-specific configuration
53- supported_extensions = config_opt .Type (list , default = [".md" ])
54- """List of supported note file extensions.
55- Used by CLI commands to validate note file types.
56- """
57-
58- exclude_patterns = config_opt .Type (list , default = ["index.md" , "README.md" ])
59- """List of filename patterns to exclude from note management.
60- Files matching these patterns will not be created, moved, or managed by CLI commands.
61- """
62-
63- timestamp_format = config_opt .Type (str , default = "%Y-%m-%d %H:%M:%S" )
64- """Date format string for timestamp output.
65- Uses Python strftime format codes.
66- """
Original file line number Diff line number Diff line change 77from mkdocs_note .utils .cli import common
88
99log = get_plugin_logger (__name__ )
10- root_dir = Path ( "docs" )
10+ root_dir = common . get_plugin_config ()[ "notes_root" ]
1111
1212
1313class NewCommand :
Original file line number Diff line number Diff line change 22Common utilities and data structures for CLI operations.
33"""
44
5- from mkdocs .plugins import get_plugin_logger
65from pathlib import Path
76
7+ from mkdocs .plugins import get_plugin_logger
8+ from mkdocs .config .defaults import MkDocsConfig
9+
10+ from mkdocs_note .plugin import MkdocsNotePlugin as plugin
11+
812
913log = get_plugin_logger (__name__ )
1014
1115
16+ def get_plugin_config () -> MkDocsConfig :
17+ """Get the plugin configuration.
18+
19+ Returns:
20+ MkdocsNoteConfig: The plugin configuration
21+ """
22+ return plugin .config
23+
24+
1225def get_asset_directory (note_path : Path ) -> Path :
1326 """Get the asset directory path for a note file.
1427
You can’t perform that action at this time.
0 commit comments