File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 6565html_content  =  {
6666    "display_github" : "True" ,
6767}
68+ 
69+ # Add templates directory to the templates_path (for extensions and custom templates) 
70+ templates_path  =  [
71+     "templates" ,
72+ ]
73+ 
74+ # -- Adding Umami details to header ---------------------------------------- 
75+ 
76+ html_context  =  {
77+     "umami_script_src" : "https://metrics.cloudera-labs.com/script.js" ,
78+     "umami_website_id" : "ec9cdd83-3798-4fd0-8c07-acb4efd971de" ,
79+ }
Original file line number Diff line number Diff line change 1+ {# _templates/layout.html #}
2+ {% extends "!layout.html" %} {# Extends the theme's default layout.html #}
3+ 
4+ {% block extrahead %}
5+   {{ super() }} {# This calls the original extrahead block content from the theme's layout.html #}
6+ 
7+   {# Your Umami script #}
8+   {% if umami_script_src and umami_website_id %}
9+     < script  defer  src ="{{ umami_script_src }} " data-website-id ="{{ umami_website_id }} "> </ script > 
10+   {% endif %}
11+ {% endblock %}
12+ 
13+ {# All other sections of the upstream layout.html are kept as is. #}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments