[ADD] Analytics support
This commit is contained in:
parent
d1b5326990
commit
eb89b38de6
9
conf.py
9
conf.py
@ -275,3 +275,12 @@ def setup(app):
|
||||
app.add_javascript('entries.js')
|
||||
app.add_javascript('reconciliation.js')
|
||||
app.add_javascript('misc.js')
|
||||
|
||||
app.connect('html-page-context', analytics)
|
||||
app.add_config_value('google_analytics_key', '', 'env')
|
||||
|
||||
def analytics(app, pagename, templatename, context, doctree):
|
||||
if not app.config.google_analytics_key:
|
||||
return
|
||||
|
||||
context['google_analytics_key'] = app.config.google_analytics_key
|
||||
|
Loading…
Reference in New Issue
Block a user