From 14f743145c4ced022a1fb4ac0064b6489cf303fe Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 4 Apr 2019 14:39:43 +0200 Subject: [PATCH] :racehorse: Improves build speed by removing old platform logic (#9137) --- .../asides/component_navigation.html | 75 +------------------ source/components/index.html | 9 --- 2 files changed, 2 insertions(+), 82 deletions(-) diff --git a/source/_includes/asides/component_navigation.html b/source/_includes/asides/component_navigation.html index d67f20b830d..dddc682c23d 100644 --- a/source/_includes/asides/component_navigation.html +++ b/source/_includes/asides/component_navigation.html @@ -10,19 +10,8 @@ {%- assign file_parts = page.url | split: '/' | last | split: '.' -%} - - {%- if file_parts.size == 2 -%} - {%- assign is_platform = true -%} - {%- assign imp_name = file_parts[1] -%} - {%- assign imp_url = imp_name | prepend: '/components/' | append: '/' -%} - {%- assign parent_name = file_parts[0] -%} - {%- assign parent_url = parent_name | prepend: '/components/' | append: '/' -%} - {%- assign parent_component = components | where: 'url', imp_url | first -%} - {%- else -%} - {%- assign is_platform = false -%} - {%- assign imp_name = file_parts | first -%} - {%- assign imp_url = imp_name | prepend: '/components/' | append: '/' -%} -{%- endif -%} + {%- assign imp_name = file_parts | first -%} + {%- assign imp_url = imp_name | prepend: '/components/' | append: '/' -%} {%- if page.ha_iot_class -%}
@@ -62,66 +51,6 @@ Source: {{imp_url}}
- {%- if is_platform and parent_name != 'sensor' -%} -
- This is a platform for - the {{parent_component.title}} component. -
- - {%- elsif is_platform == false and imp_name != 'ifttt' -%} - - {%- assign platforms_found = false -%} - {%- for component in components -%} - {%- if component.url != page.url -%} - {%- assign comp_imp_name = component.url | split: '/' | last | split: '.' | first -%} - {%- if comp_imp_name == imp_name %} - {%- unless platforms_found -%} - {%- assign platforms_found = true -%} -

Platforms

- - {%- endif -%} - - {%- endif -%} - - {%- assign related_found = false -%} - {%- for component in components -%} - {%- if component.url != page.url -%} - {%- assign comp_file_parts = component.url | split: '/' | last | split: '.' -%} - {%- if comp_file_parts.size == 2 -%} - {%- assign comp_imp_name = comp_file_parts | last -%} - {%- else -%} - {%- assign comp_imp_name = comp_file_parts | first -%} - {%- endif -%} - - {%- if comp_imp_name == imp_name -%} - {%- unless related_found -%} - {%- assign related_found = true -%} -
-

Related components

- -
- {%- endif -%} - {%- if page.ha_category.first -%}

Categories

diff --git a/source/components/index.html b/source/components/index.html index 4dabe666787..ec18adc3a91 100644 --- a/source/components/index.html +++ b/source/components/index.html @@ -68,15 +68,6 @@ Support for these components is provided by the Home Assistant community.
-{% comment %} -## Pages without categories -{%- for component in components -%} - {% unless component.ha_category %} -

{{ component.title }}

- {% endunless %} -{%- endfor -%} -{% endcomment %} -