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 %} -