fix: remove duplicate inclusion of the footer.html (#591)
* Remove duplicate inclusion of the footer.html
* fix: render footer scripts once while keeping mobile footer
Restore the base footer include (only visible on mobile) and move the
medium-zoom and analytics includes from footer.html into baseof.html,
so they are emitted once per page instead of once per footer instance.
Fixes #574
---------
Co-authored-by: Markus Bilz <github@markusbilz.com>
| | |
| | | |
| | | {{- partial "footer.html" (dict "context" . "footerClassModifier" "base") -}} |
| | | |
| | | {{- partial "medium-zoom.html" . -}} |
| | | {{- if (hasPrefix .Site.Config.Services.GoogleAnalytics.ID "G-") -}} |
| | | {{- template "_internal/google_analytics.html" . -}} |
| | | {{- end -}} |
| | | {{- if and (hugo.IsProduction) (.Site.Params.gtagId) -}} |
| | | {{ partial "google-analytics-gtag-async.html" . }} |
| | | {{- end -}} |
| | | |
| | | {{- if (eq .Site.Params.simpleAnalytics.enable true) -}} |
| | | {{- partial "analytics/simpleanalytics.html" . -}} |
| | | {{- end -}} |
| | |
| | | {{ end }} |
| | | </ul> |
| | | </footer> |
| | | {{- partial "medium-zoom.html" .context -}} |
| | | {{- if (hasPrefix .context.Site.Config.Services.GoogleAnalytics.ID "G-") -}} |
| | | {{- template "_internal/google_analytics.html" .context -}} |
| | | {{- end -}} |
| | | {{- if and (hugo.IsProduction) (.context.Site.Params.gtagId) -}} |
| | | {{ partial "google-analytics-gtag-async.html" .context }} |
| | | {{- end -}} |