Removed deprecated google_analytics setting

This commit is contained in:
squidfunk 2021-11-30 19:14:18 +01:00
parent c08450ffc8
commit f9044530e6
5 changed files with 25 additions and 16 deletions

View File

@ -66,6 +66,31 @@ viewports]:
[Tabbed]: setup/extensions/python-markdown-extensions.md#tabbed [Tabbed]: setup/extensions/python-markdown-extensions.md#tabbed
[better behavior on mobile viewports]: https://twitter.com/squidfunk/status/1424740370596958214 [better behavior on mobile viewports]: https://twitter.com/squidfunk/status/1424740370596958214
#### `google_analytics`
This option was [deprecated in MkDocs 1.2.0], as the implementation of a
JavaScript-based analytics integration is the responsibility of a theme.
The following lines must be changed:
=== "8.x"
``` yaml
extra:
analytics:
provider: google
property: UA-XXXXXXXX-X
```
=== "7.x"
``` yaml
google_analytics:
- UA-XXXXXXXX-X
- auto
```
[deprecated in MkDocs 1.2.0]: https://www.mkdocs.org/about/release-notes/#backward-incompatible-changes-in-12
### Changes to `*.html` files { data-search-exclude } ### Changes to `*.html` files { data-search-exclude }
The templates have undergone a set of changes to make them future-proof. If The templates have undergone a set of changes to make them future-proof. If

View File

@ -1,9 +1,6 @@
{#- {#-
This file was automatically generated - do not edit This file was automatically generated - do not edit
-#} -#}
{% if config.google_analytics %}
{% set provider = "google" %}
{% endif %}
{% if config.extra.analytics %} {% if config.extra.analytics %}
{% set provider = config.extra.analytics.provider %} {% set provider = config.extra.analytics.provider %}
{% endif %} {% endif %}

View File

@ -1,9 +1,6 @@
{#- {#-
This file was automatically generated - do not edit This file was automatically generated - do not edit
-#} -#}
{% if config.google_analytics %}
{% set property = config.google_analytics[0] %}
{% endif %}
{% if config.extra.analytics %} {% if config.extra.analytics %}
{% set property = config.extra.analytics.property | d("", true) %} {% set property = config.extra.analytics.property | d("", true) %}
{% endif %} {% endif %}

View File

@ -20,11 +20,6 @@
IN THE SOFTWARE. IN THE SOFTWARE.
--> -->
<!-- Determine analytics provider (deprecated, removed in v8) -->
{% if config.google_analytics %}
{% set provider = "google" %}
{% endif %}
<!-- Determine analytics provider --> <!-- Determine analytics provider -->
{% if config.extra.analytics %} {% if config.extra.analytics %}
{% set provider = config.extra.analytics.provider %} {% set provider = config.extra.analytics.provider %}

View File

@ -20,11 +20,6 @@
IN THE SOFTWARE. IN THE SOFTWARE.
--> -->
<!-- Determine analytics property (deprecated, removed in v8) -->
{% if config.google_analytics %}
{% set property = config.google_analytics[0] %}
{% endif %}
<!-- Determine analytics property --> <!-- Determine analytics property -->
{% if config.extra.analytics %} {% if config.extra.analytics %}
{% set property = config.extra.analytics.property | d("", true) %} {% set property = config.extra.analytics.property | d("", true) %}