diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 73ec498014a..73f53af73d0 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1,27 @@ -## The problem +## Feedback + +## Details + + +URL: + + +Version: diff --git a/.github/ISSUE_TEMPLATE/DOCS_ISSUE.md b/.github/ISSUE_TEMPLATE/DOCS_ISSUE.md deleted file mode 100644 index 878ec4b21cb..00000000000 --- a/.github/ISSUE_TEMPLATE/DOCS_ISSUE.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Website/Docs bug report -about: Report incorrect/missing information or other issues with our website. ---- -## The problem - - - diff --git a/.github/ISSUE_TEMPLATE/feedback.yml b/.github/ISSUE_TEMPLATE/feedback.yml new file mode 100644 index 00000000000..c84b7196d44 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feedback.yml @@ -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. diff --git a/plugins/environment_variables.rb b/plugins/environment_variables.rb index 9611050ffd9..26f2936a0b9 100644 --- a/plugins/environment_variables.rb +++ b/plugins/environment_variables.rb @@ -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 diff --git a/sass/custom/_paulus.scss b/sass/custom/_paulus.scss index 2175b84ad65..6f4dbb2eb8b 100644 --- a/sass/custom/_paulus.scss +++ b/sass/custom/_paulus.scss @@ -47,6 +47,10 @@ $primary-color: #049cdb; padding-right: 5px; padding-left: 5px; } + + .feedback { + margin-bottom: 32px; + } } .hero { diff --git a/source/_includes/asides/cookbook_navigation.html b/source/_includes/asides/cookbook_navigation.html index 46fe38558c1..8713bb4bf16 100644 --- a/source/_includes/asides/cookbook_navigation.html +++ b/source/_includes/asides/cookbook_navigation.html @@ -1,27 +1,26 @@
- {% include edit_github.html %} {% assign cookbook = site.cookbook | sort_natural: 'title' %} -
- Back to the cookbook + -
+

{{page.ha_category}}

-
    - {% for recipe in cookbook %} - {% if recipe.ha_category == page.ha_category %} -
  • - {% if recipe.url == page.url %} - {{recipe.title}} - {% elsif recipe.ha_external_link %} - {{recipe.title}} - {% else %} - {{recipe.title}} - {% endif %} -
  • +
      + {% for recipe in cookbook %} {% if recipe.ha_category == page.ha_category + %} +
    • + {% if recipe.url == page.url %} {{recipe.title}} {% elsif + recipe.ha_external_link %} + {{recipe.title}} + {% else %} + {{recipe.title}} {% endif %} - {% endfor %} +
    • + {% endif %} {% endfor %}
diff --git a/source/_includes/asides/getting_started_navigation.html b/source/_includes/asides/getting_started_navigation.html index 771a222c91b..32653342fad 100644 --- a/source/_includes/asides/getting_started_navigation.html +++ b/source/_includes/asides/getting_started_navigation.html @@ -1,15 +1,21 @@
- {% include edit_github.html %} - -
+

Getting Started

-
diff --git a/source/_includes/asides/help_navigation.html b/source/_includes/asides/help_navigation.html index 519b3b989c6..532719243d0 100644 --- a/source/_includes/asides/help_navigation.html +++ b/source/_includes/asides/help_navigation.html @@ -1,21 +1,20 @@
- {% include edit_github.html %} -