Lines Matching refs:app
100 def on_html_page_context(app, pagename, templatename, context, doctree): argument
106 if app.config.last_updated_git_path is None:
107 app.config.last_updated_git_path = [app.srcdir]
111 for last_updated_git_path_el in app.config.last_updated_git_path:
113 …last_updated_git_path_el_abs = os.path.normpath(os.path.join(app.srcdir, last_updated_git_path_el))
119 app.logger.error(f"The last_updated extension is disabled because of the error:\
122 app.disconnect(app.listener_id)
125 app.config.last_updated_git_path = last_updated_git_path_abs
132 if app.config.html_last_updated_fmt is None:
135 date_fmt = app.config.html_last_updated_fmt
140 git_repo=app.config.last_updated_git_path,
141 doc_root=app.srcdir)
143 … app.logger.warning(f'Could not get the last updated value from git for the following file:\
145 \n {app.config.last_updated_git_path}\n')
152 def setup(app): argument
153 app.logger = logging.getLogger(__name__)
154 app.add_config_value('last_updated_git_path', None, 'html')
156 app.listener_id = app.connect('html-page-context', on_html_page_context)