Skip to content

Commit 90e0386

Browse files
committed
async for gtag script
1 parent 4102ee0 commit 90e0386

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_version():
8585
#
8686
# This is also used if you do content translation via gettext catalogs.
8787
# Usually you set "language" from the command line for these cases.
88-
language = None
88+
language = 'en'
8989

9090
# List of patterns, relative to source directory, that match files and
9191
# directories to ignore when looking for source files.
@@ -127,6 +127,10 @@ def get_version():
127127
# so a file named "default.css" will overwrite the builtin "default.css".
128128
html_static_path = ['_static']
129129

130+
html_css_files = [
131+
'css/rtd_theme_mods.css',
132+
]
133+
130134
# HTML Favicon
131135
html_favicon = '_static/bridge.ico'
132136

@@ -260,8 +264,5 @@ def get_version():
260264

261265
def setup(app):
262266

263-
app.add_css_file('css/rtd_theme_mods.css')
264-
265-
266-
app.add_js_file('https://www.googletagmanager.com/gtag/js?id=G-QLSP3FJWGT')
267+
app.add_js_file('https://www.googletagmanager.com/gtag/js?id=G-QLSP3FJWGT', loading_method="async")
267268
app.add_js_file(None, body=GA_INVOKE_JS)

0 commit comments

Comments
 (0)