mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
Hash custom.css version
This commit is contained in:
parent
0991fb0e06
commit
a8074ab7f6
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{%- block extrahead %}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/custom.css', 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/custom.css', 1) }}?hash={{ custom_css_hash }}" type="text/css" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/_static/apple-touch-icon.png">
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="/_static/favicon-512x512.png">
|
||||
|
7
conf.py
7
conf.py
@ -113,6 +113,9 @@ html_theme = 'alabaster'
|
||||
# documentation.
|
||||
#
|
||||
html_baseurl = os.getenv('BASE_URL', 'https://esphome.io')
|
||||
with open('_static/custom.css', 'rb') as f:
|
||||
custom_css_hash = "{:08X}".format(hash(f.read()) % 2**32)
|
||||
|
||||
html_theme_options = {
|
||||
# 'logo': 'logo-full.png',
|
||||
'logo_name': False,
|
||||
@ -122,6 +125,10 @@ html_theme_options = {
|
||||
'show_powered_by': False,
|
||||
}
|
||||
|
||||
html_context = {
|
||||
'custom_css_hash': custom_css_hash,
|
||||
}
|
||||
|
||||
html_logo = 'images/logo-text.svg'
|
||||
html_copy_source = True
|
||||
html_show_sourcelink = False
|
||||
|
Loading…
Reference in New Issue
Block a user