File tree 2 files changed +16
-3
lines changed
guide/src/format/configuration
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ The following configuration options are available:
21
21
- ** mathjax-support:** Adds support for [ MathJax] ( ../mathjax.md ) . Defaults to
22
22
` false ` .
23
23
- ** copy-fonts:** Copies fonts.css and respective font files to the output directory and use them in the default theme. Defaults to ` true ` .
24
- - ** google-analytics:** If you use Google Analytics, this option lets you enable
25
- it by simply specifying your ID in the configuration file .
24
+ - ** google-analytics:** This field has been deprecated and will be removed in a future release.
25
+ Use the ` theme/head.hbs ` file to add the appropriate Google Analytics code instead .
26
26
- ** additional-css:** If you need to slightly change the appearance of your book
27
27
without overwriting the whole style, you can specify a set of stylesheets that
28
28
will be loaded after the default ones where you can surgically change the
@@ -131,7 +131,6 @@ preferred-dark-theme = "navy"
131
131
curly-quotes = true
132
132
mathjax-support = false
133
133
copy-fonts = true
134
- google-analytics = " UA-123456-7"
135
134
additional-css = [" custom.css" , " custom2.css" ]
136
135
additional-js = [" custom.js" ]
137
136
no-section-label = false
Original file line number Diff line number Diff line change @@ -70,6 +70,20 @@ impl MDBook {
70
70
71
71
config. update_from_env ( ) ;
72
72
73
+ if config
74
+ . html_config ( )
75
+ . map_or ( false , |html| html. google_analytics . is_some ( ) )
76
+ {
77
+ warn ! (
78
+ "The output.html.google-analytics field has been deprecated; \
79
+ it will be removed in a future release.\n \
80
+ Consider placing the appropriate site tag code into the \
81
+ theme/head.hbs file instead.\n \
82
+ The tracking code may be found in the Google Analytics Admin page.\n \
83
+ "
84
+ ) ;
85
+ }
86
+
73
87
if log_enabled ! ( log:: Level :: Trace ) {
74
88
for line in format ! ( "Config: {:#?}" , config) . lines ( ) {
75
89
trace ! ( "{}" , line) ;
You can’t perform that action at this time.
0 commit comments