Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2021-02-09 21:29:57 +01:00
commit e6ce8c6896
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
11 changed files with 167 additions and 72 deletions

View File

@ -1,7 +1,27 @@
## The problem
<!--
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened instead.
Thanks for opening an issue to provide feedback on our website/documentation.
Please note, this form is not for reporting bugs with running Home Assistant or its integrations.
Those bugs should be reported in the Home Assistant Core issue tracker:
https://github.com/home-assistant/core/issues
Please be sure to provide feedback as clear as possible. Describe what
you think is incorrect or can be improved, and try to provide a
suggestion on how you think it can be improved or fixed.
-->
## Feedback
## Details
<!--
A URL with a link to the page you are providing feedback for
-->
URL:
<!--
Current version of the documentation. This usually matches the Home
Assistant Core release version, and can be found at the bottom of the page.
-->
Version:

View File

@ -1,11 +0,0 @@
---
name: Website/Docs bug report
about: Report incorrect/missing information or other issues with our website.
---
## The problem
<!--
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened instead.
-->

52
.github/ISSUE_TEMPLATE/feedback.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Documentation feedback
about: Provide feedback on a page on our website
title: ""
issue_body: true
inputs:
- type: description
attributes:
value: |
Thanks for opening an issue to provide feedback on our website/documentation.
Please note, this form is not for reporting bugs with running Home Assistant or its integrations.
Those bugs should be reported in the [Home Assistant Core issue tracker][core].
[core]: https://github.com/home-assistant/core/issues
- type: textarea
attributes:
label: Feedback
required: true
description: >-
Please be sure to provide feedback as clear as possible. Describe what
you think is incorrect or can be improved, and try to provide a
suggestion on how you think it can be improved or fixed.
- type: description
attributes:
value: |
## Details
- type: input
attributes:
label: URL
required: true
placeholder: "http://www.home-assistant.io/..."
description: >
A URL with a link to the page you are providing feedback for.
- type: input
attributes:
label: Version
required: false
placeholder: "e.g., 2021.2.0"
description: >
Current version of the documentation. This usually matches the Home
Assistant Core release version, and can be found at the bottom of the
page.
- type: description
attributes:
value: |
## Additional information
- type: description
attributes:
value: >
If you have any additional information for us, use the field below.
Please note, you can attach screenshots or screen recordings here, by
dragging and dropping files in the field below.

View File

@ -1,17 +1,33 @@
module Jekyll
class EnvironmentVariablesGenerator < Generator
def generate(site)
# https://www.netlify.com/docs/continuous-deployment/#build-environment-variables
repo_url = ENV['REPOSITORY_URL'] || 'https://github.com/home-assistant/home-assistant.io'
repository_url = ENV['REPOSITORY_URL'] || 'https://github.com/home-assistant/home-assistant.io'
# Rewrite urls if repo url is the ssh format.
if repo_url.start_with? 'git@github.com:'
repo_url = repo_url.sub 'git@github.com:', 'https://github.com/'
if repository_url.start_with? 'git@github.com:'
repository_url = repository_url.sub 'git@github.com:', 'https://github.com/'
end
# These values will be available as {{ site.NLY_REPOSITORY_URL }}
site.config['NLY_REPOSITORY_URL'] = repo_url
site.config['NLY_HEAD'] = ENV['HEAD'] || 'current'
# Figure out deployment URL
url = site.config['url']
if ENV['context'].eql?('production')
url = ENV['URL'] || url
elsif ENV['context'].eql?('branch-deploy')
url = ENV['DEPLOY_URL'] || url
end
url = url.chomp('/')
# These values will be available as {{ site.netlify.* }}
site.config['netlify'] = {
'repository_url' => repository_url,
'branch' => ENV['BRANCH'] || 'current',
'commit' => ENV['COMMIT_REF'] || '',
'head' => ENV['HEAD'] || 'current',
'url' => url,
'pull_request' => ENV['PULL_REQUEST'].eql?('true'),
}
end
end
end

View File

@ -47,6 +47,10 @@ $primary-color: #049cdb;
padding-right: 5px;
padding-left: 5px;
}
.feedback {
margin-bottom: 32px;
}
}
.hero {

View File

@ -1,27 +1,26 @@
<section class="aside-module grid__item one-whole lap-one-half">
{% include edit_github.html %}
{% assign cookbook = site.cookbook | sort_natural: 'title' %}
<div class='section'>
<a href='/cookbook'>Back to the cookbook</a>
<div class="section">
<a href="/cookbook">Back to the cookbook</a>
</div>
<div class='section'>
<div class="section">
<h1 class="title delta">{{page.ha_category}}</h1>
<ul class='divided'>
{% for recipe in cookbook %}
{% if recipe.ha_category == page.ha_category %}
<li>
{% if recipe.url == page.url %}
{{recipe.title}}
{% elsif recipe.ha_external_link %}
<a href='{{recipe.ha_external_link}}'>{{recipe.title}} <i class="icon-external-link"></i></a>
{% else %}
<a href='{{recipe.url}}'>{{recipe.title}}</a>
{% endif %}
</li>
<ul class="divided">
{% for recipe in cookbook %} {% if recipe.ha_category == page.ha_category
%}
<li>
{% if recipe.url == page.url %} {{recipe.title}} {% elsif
recipe.ha_external_link %}
<a href="{{recipe.ha_external_link}}"
>{{recipe.title}} <i class="icon-external-link"></i
></a>
{% else %}
<a href="{{recipe.url}}">{{recipe.title}}</a>
{% endif %}
{% endfor %}
</li>
{% endif %} {% endfor %}
</ul>
</div>
</section>

View File

@ -1,15 +1,21 @@
<section class="aside-module grid__item one-whole lap-one-half">
{% include edit_github.html %}
<div class='section'>
<div class="section">
<h1 class="title delta">Getting Started</h1>
<ul class='divided sidebar-menu'>
<li>{% active_link /getting-started/ Installation %}
<li>{% active_link /getting-started/onboarding/ Onboarding %}</li>
<li>{% active_link /getting-started/automation/ Automation %}</li>
<li>{% active_link /getting-started/presence-detection/ Presence detection %}</li>
<li>{% active_link /getting-started/join-the-community/ Join the community %}</li>
<li>{% active_link /getting-started/configuration/ Advanced Configuration %}</li>
<ul class="divided sidebar-menu">
<li>{% active_link /getting-started/ Installation %}</li>
<li>{% active_link /getting-started/onboarding/ Onboarding %}</li>
<li>{% active_link /getting-started/automation/ Automation %}</li>
<li>
{% active_link /getting-started/presence-detection/ Presence detection
%}
</li>
<li>
{% active_link /getting-started/join-the-community/ Join the community
%}
</li>
<li>
{% active_link /getting-started/configuration/ Advanced Configuration %}
</li>
</ul>
</div>
</section>

View File

@ -1,21 +1,20 @@
<section class="aside-module grid__item one-whole lap-one-half">
{% include edit_github.html %}
<div class="section">
<h1 class="title delta">&nbsp;</h1>
<ul class="divided sidebar-menu">
<li>{% active_link /help/ Help %}</li>
<li>
{% active_link /help/ Help %}
</li>
<li>
<a href="https://developers.home-assistant.io">Developer documentation
<a href="https://developers.home-assistant.io"
>Developer documentation
<i class="icon-external-link"></i>
</a>
</li>
<li>
Governance
<ul>
<li>{% active_link /developers/cla/ Contributor License Agreement %}</li>
<li>
{% active_link /developers/cla/ Contributor License Agreement %}
</li>
<li>{% active_link /privacy/ Privacy Policy %}</li>
<li>{% active_link /tos/ Terms of Service %}</li>
<li>{% active_link /code_of_conduct/ Code of Conduct %}</li>

View File

@ -1,5 +1,4 @@
<section class="aside-module grid__item one-whole lap-one-half">
<!-- {% include edit_github.html %} -->
{% assign cards = site.lovelace | sort_natural: 'title' %}
<div class="section">
@ -19,7 +18,9 @@
<li>{% active_link /lovelace/badges/ Badges %}</li>
<li>{% active_link /lovelace/actions/ Actions %}</li>
<li>
<a href="https://developers.home-assistant.io/docs/frontend/custom-ui/lovelace-custom-card.html">Developing Custom Cards
<a
href="https://developers.home-assistant.io/docs/frontend/custom-ui/lovelace-custom-card.html"
>Developing Custom Cards
<i class="icon-external-link"></i>
</a>
</li>
@ -30,7 +31,7 @@
<h1 class="title delta">Cards</h1>
<ul class="divided sidebar-menu">
{% for card in cards %}
<li>{% active_link {{card.url}} {{card.sidebar_label}} %}</li>
<li>{% active_link {{card.url}} {{card.sidebar_label}} %}</li>
{% endfor %}
</ul>
</div>

View File

@ -1,4 +1,21 @@
{% assign url_parts = page.url | split: '/' %}
{% if page.hide_github_edit != true %}
<div class='edit-github'><a target="_blank" rel="noopener noreferrer" href='{{ site.NLY_REPOSITORY_URL }}/tree/{{ site.NLY_HEAD }}/source/{{ page.path }}'>Edit this page on GitHub</a></div>
<div class="material-card text feedback">
<b>Help us to improve our documentation</b><br />
Suggest an edit to this page, or provide/view feedback for this page.
<div class="links">
<a
href="{{ site.netlify.repository_url }}/tree/{{ site.netlify.head }}/source/{{ page.path }}"
><i class="icon-edit" /> Edit</a
>
<a
href="{{ site.netlify.repository_url }}/issues/new?template=feedback.yml&url={{ site.netlify.url | url_encode }}{{ page.url | url_encode }}&version={{ site.current_major_version }}.{{
site.current_minor_version }}.{{ site.current_patch_version }}&labels={{ site.netlify.branch }}"
><i class="icon-comment" /> Provide feedback</a
>
<a
href="{{ site.netlify.repository_url }}/issues?utf8=%E2%9C%93&q=%22{{ site.netlify.url | url_encode }}{{ page.url | url_encode }}%22&in=body"
><i class="icon-comments" /> View pending feedback</a
>
</div>
</div>
{% endif %}

View File

@ -3,24 +3,16 @@ layout: default
---
<article class="page">
{% assign url_parts = page.url | split: '/' %}
{% if url_parts[1] != 'components' and
url_parts[1] != 'cookbook' and
url_parts[1] != 'developers' and
url_parts[1] != 'help' and
url_parts[1] != 'getting-started' %}
{% include edit_github.html %}
{% endif %}
{% if page.title and page.show_title != false %}
<header>
<h1 class="title indent">
{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}
{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title
}}{% endif %}
</h1>
</header>
<hr class="divider">
<hr class="divider" />
{% endif %}
{{ content }}
{% include edit_github.html %}
</article>