diff --git a/frappe/config/docs.py b/frappe/config/docs.py index 6ed99b4b01..029149d7c0 100644 --- a/frappe/config/docs.py +++ b/frappe/config/docs.py @@ -2,6 +2,8 @@ from __future__ import unicode_literals +docs_version = "7.x.x" + source_link = "https://github.com/frappe/frappe" docs_base_url = "https://frappe.github.io/frappe" headline = "Superhero Web Framework" @@ -25,7 +27,7 @@ ERP for managing small and medium sized businesses. [Get started with the Tutorial](https://frappe.github.io/frappe/user/) """ -docs_version = "7.x.x" +google_analytics_id = 'UA-8911157-23' def get_context(context): context.brand_html = (' {%- block script %}{%- endblock %} + {% if app.google_analytics_id %} + + {% endif %} {%- block body_include %}{{ body_include or "" }}{% endblock -%} diff --git a/frappe/utils/setup_docs.py b/frappe/utils/setup_docs.py index 8813539584..7b3d97c9b9 100644 --- a/frappe/utils/setup_docs.py +++ b/frappe/utils/setup_docs.py @@ -47,7 +47,8 @@ class setup_docs(object): "long_description": markdown(getattr(self.docs_config, "long_description", "")), "license": self.hooks.get("app_license")[0], "branch": getattr(self.docs_config, "branch", None) or "develop", - "style": getattr(self.docs_config, "style", "") + "style": getattr(self.docs_config, "style", ""), + "google_analytics_id": getattr(self.docs_config, "google_analytics_id", "") }), "metatags": { "description": self.hooks.get("app_description")[0], @@ -408,7 +409,7 @@ class setup_docs(object): "css/font-awesome.css": "css/font-awesome.css", "css/docs.css": "css/docs.css", "css/hljs.css": "css/hljs.css", - "css/font": "css/font", + "css/fonts": "css/fonts", "css/octicons": "css/octicons", # always overwrite octicons.css to fix the path "css/octicons/octicons.css": "css/octicons/octicons.css",