mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-24 17:08:15 +01:00
Change base_url
This commit is contained in:
parent
387b99aef1
commit
f18ec1bcd6
@ -15,6 +15,7 @@
|
||||
<meta name="theme-color" content="#dfdfdf">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta property="og:site_name" content="ESPHome">
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
|
2
conf.py
2
conf.py
@ -112,7 +112,7 @@ html_theme = 'alabaster'
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#
|
||||
html_baseurl = os.getenv('BASE_URL', 'https://esphome.io/')
|
||||
html_baseurl = os.getenv('BASE_URL', 'https://esphome.io')
|
||||
html_theme_options = {
|
||||
# 'logo': 'logo-full.png',
|
||||
'logo_name': False,
|
||||
|
@ -1,10 +1,10 @@
|
||||
[build]
|
||||
publish = "_build/html"
|
||||
command = "make netlify"
|
||||
environment = { BASE_URL = "https://esphome.io/" }
|
||||
environment = { BASE_URL = "https://esphome.io" }
|
||||
|
||||
[context.beta]
|
||||
environment = { BASE_URL = "https://beta.esphome.io/" }
|
||||
environment = { BASE_URL = "https://beta.esphome.io" }
|
||||
|
||||
# A basic redirect rule
|
||||
[[redirects]]
|
||||
|
3
seo.py
3
seo.py
@ -44,7 +44,7 @@ def seo_visit(self: HTMLTranslator, node: SEONode):
|
||||
def create_property_meta(name, content):
|
||||
if content is None:
|
||||
return
|
||||
self.meta.append('<meta property="{}" content="{}"/>\n'.format(name, encode_text(content)))
|
||||
self.meta.append('<meta property="{}" content="{}">\n'.format(name, encode_text(content)))
|
||||
|
||||
# Base
|
||||
create_content_meta("description", node.description)
|
||||
@ -70,7 +70,6 @@ def seo_visit(self: HTMLTranslator, node: SEONode):
|
||||
create_property_meta("og:title", node.title)
|
||||
create_property_meta("og:image", node.image)
|
||||
create_property_meta("og:type", "article" if node.author is not None else "website")
|
||||
create_property_meta("og:site_name", "ESPHome")
|
||||
create_property_meta("og:description", node.description)
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ def create_sitemap(app, exception):
|
||||
|
||||
for link in app.sitemap_links:
|
||||
url = ET.SubElement(root, "url")
|
||||
ET.SubElement(url, "loc").text = app.builder.config.html_baseurl + link
|
||||
ET.SubElement(url, "loc").text = app.builder.config.html_baseurl + '/' + link
|
||||
priority = 0.5
|
||||
if link.endswith('index.html'):
|
||||
priority += 0.25
|
||||
|
Loading…
Reference in New Issue
Block a user