Skip to content

Commit

Permalink
Change base_url
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter committed Feb 9, 2019
1 parent 387b99a commit f18ec1b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
# 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,
Expand Down
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -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]]
Expand Down
3 changes: 1 addition & 2 deletions seo.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def create_itemprop_meta(name, content):
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)
Expand All @@ -70,7 +70,6 @@ def create_property_meta(name, content):
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)


Expand Down
2 changes: 1 addition & 1 deletion sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f18ec1b

Please sign in to comment.