Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mkdocs_git_committers_plugin_2/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def on_page_context(self, context, page, config, nav):
def on_post_build(self, config):
if not self.should_save_cache:
return
LOG.info("git-committers: saving page authors cache file")
LOG.info(f"git-committers: saving page authors cache file to {self.config['cache_dir']}/page-authors.json")
json_data = json.dumps({'cache_date': datetime.now().strftime("%Y-%m-%d"), 'page_authors': self.cache_page_authors})
os.makedirs(self.config['cache_dir'], exist_ok=True)
f = open(self.config['cache_dir'] + "/page-authors.json", "w")
Expand All @@ -319,7 +319,7 @@ def on_post_build(self, config):

def on_pre_build(self, config):
if os.path.exists(self.config['cache_dir'] + "/page-authors.json"):
LOG.info("git-committers: found page authors cache file - loading it")
LOG.info(f"git-committers: found page authors cache file {self.config['cache_dir']}/page-authors.json - loading it")
f = open(self.config['cache_dir'] + "/page-authors.json", "r")
cache = json.loads(f.read())
self.cache_date = cache['cache_date']
Expand Down