File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
mkdocs_git_authors_plugin Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -118,16 +118,16 @@ def on_files(
118118 if exclude (file .src_path , excluded_pages ):
119119 continue
120120
121- if not hasattr (file , 'src_dir' ) or file .src_dir is None :
122- logger .debug (
123- f"[git-authors-plugin] Unable to find path for file { file .src_path } . "
124- "Generated, in-memory files won't have a git history."
125- )
126- elif hasattr (file , "generated_by" ) and file .generated_by :
121+ if hasattr (file , "generated_by" ) and file .generated_by :
127122 logger .debug (
128123 f"[git-authors-plugin] The file { file .src_path } was generated by { file .generated_by } . "
129124 "Generated, dynamic files won't have a git history."
130125 )
126+ elif not hasattr (file , 'src_dir' ) or file .src_dir is None :
127+ logger .debug (
128+ f"[git-authors-plugin] Unable to find path for file { file .src_path } . "
129+ "Generated, in-memory files won't have a git history."
130+ )
131131 elif path := file .abs_src_path :
132132 if path .endswith (".md" ):
133133 _ = self .repo ().page (path )
Original file line number Diff line number Diff line change 1+ # homepage
2+
3+ this is the homepage
4+
5+ Page authors: {{ git_page_authors }}
6+
7+ Site authors: {{ git_site_authors }}
Original file line number Diff line number Diff line change 1+ site_name : test gitauthors_plugin
2+ use_directory_urls : true
3+
4+ docs_dir : documentation
5+
6+ plugins :
7+ - search
8+ - git-authors
You can’t perform that action at this time.
0 commit comments