@@ -55,9 +55,6 @@ def read(self, path: pathlib.Path) -> bytes:
5555 """
5656 return ''
5757
58- def name (self ) -> str :
59- return ''
60-
6158
6259class Directory (Handler ):
6360 """
@@ -78,9 +75,6 @@ def load_paths(self) -> list[pathlib.Path]:
7875 def read (self , path : pathlib .Path ) -> bytes :
7976 return self ._dir .joinpath (path ).read_bytes ()
8077
81- def name (self ) -> str :
82- return 'docs'
83-
8478 def __repr__ (self ):
8579 return f'<Directory { self ._dir_repr } >'
8680
@@ -112,9 +106,6 @@ def load_paths(self) -> list[pathlib.Path]:
112106 def read (self , path : pathlib .Path ) -> bytes :
113107 return self ._files .joinpath (path ).read_bytes ()
114108
115- def name (self ) -> str :
116- return 'theme'
117-
118109 def __repr__ (self ):
119110 return f'<Package { self ._pkg !r} >'
120111
@@ -137,7 +128,7 @@ def read(self) -> bytes:
137128 return self .handler .read (self .path )
138129
139130 def __repr__ (self ) -> str :
140- return f'<Resource { self .url !r} { self .path .as_posix ()!r} [ { self . handler . name () } ] >'
131+ return f'<Resource { self .url !r} { self .path .as_posix ()!r} >'
141132
142133
143134class Template :
@@ -150,7 +141,7 @@ def read(self) -> bytes:
150141 return self .handler .read (self .path )
151142
152143 def __repr__ (self ) -> str :
153- return f'<Template { self .path . as_posix () !r} [ { self . handler . name () } ] >'
144+ return f'<Template { self .name !r} >'
154145
155146
156147class TemplateLoader (jinja2 .BaseLoader ):
@@ -194,9 +185,6 @@ def path_to_url(self, path: pathlib.Path) -> str:
194185 # 'css/styles.css' -> '/css/styles.css'
195186 return pathlib .Path ('/' ).joinpath (path ).as_posix ()
196187
197- def log (self , msg : str ) -> None :
198- print (msg )
199-
200188 def load_config (self , filename : str ) -> dict :
201189 path = pathlib .Path (filename )
202190 if not path .exists ():
@@ -230,10 +218,10 @@ def load_config(self, filename: str) -> dict:
230218 # {'title': 'Themes & styling', 'path': 'styling.md'},
231219 # ],
232220 },
233- # 'handlers': {
234- # 'theme': {'type': 'mkdocs.Package', 'pkg': 'mkdocs:theme'}
235- # 'docs': {'type': 'mkdocs.FileSystem ', 'dir': 'docs'}
236- # } ,
221+ # 'handlers': [
222+ # {'type': 'mkdocs.Package', 'pkg': 'mkdocs:theme'}
223+ # {'type': 'mkdocs.Directory ', 'dir': 'docs'}
224+ # ] ,
237225 'markdown' : {
238226 'extensions' : {
239227 'fenced_code' ,
@@ -329,7 +317,6 @@ def build(self):
329317 for resource in resources :
330318 output = self .render (resource , resources , config , env , md )
331319 build_path = buildpath .joinpath (resource .output_path )
332- self .log (build_path )
333320 build_path .parent .mkdir (parents = True , exist_ok = True )
334321 build_path .write_bytes (output )
335322
0 commit comments