From ba52bbb62abc621fe8f39ef9d91a7f59c4565c3a Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 23 Apr 2022 20:10:52 -0600 Subject: [PATCH] ensure we have a search UI Signed-off-by: vsoch --- 2.analysis.py | 2 -- _config.yml | 6 ++++++ assets/tipuesearch/tipuesearch_content.js | 17 +---------------- pages/search.html | 23 +++++++++++++++++++++++ 4 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 pages/search.html diff --git a/2.analysis.py b/2.analysis.py index 44ff1f59..16160502 100644 --- a/2.analysis.py +++ b/2.analysis.py @@ -64,7 +64,6 @@ def get_parser(): layout: table permalink: /analysis/%s/ tipue_search_active: true -exclude_from_search: true --- """ @@ -73,7 +72,6 @@ def get_parser(): title: %s layout: repo tipue_search_active: true -exclude_from_search: true --- """ diff --git a/_config.yml b/_config.yml index 685b762b..a0d7411f 100644 --- a/_config.yml +++ b/_config.yml @@ -17,6 +17,12 @@ defaults: values: layout: "page" +# Search +tipue_search: + include: + collections: + - repos + user: avatar: "/assets/img/logo.png" github: "vsoch" diff --git a/assets/tipuesearch/tipuesearch_content.js b/assets/tipuesearch/tipuesearch_content.js index 71f6f5aa..23c96673 100644 --- a/assets/tipuesearch/tipuesearch_content.js +++ b/assets/tipuesearch/tipuesearch_content.js @@ -50,22 +50,7 @@ layout: null {%- for collection in site.tipue_search.include.collections -%} {%- assign documents = site.documents | where:"collection",collection -%} {%- for document in documents -%} - {%- unless document.exclude_from_search == true or excluded_files contains document.path -%} - {%- assign has_excluded_taxonomy = false -%} - {%- for tag in document.tags -%} - {%- if excluded_taxonomies contains tag -%} - {%- assign has_excluded_taxonomy = true -%} - {%- endif -%} - {%- endfor -%} - {%- for category in document.categories -%} - {%- if excluded_taxonomies contains category -%} - {%- assign has_excluded_taxonomy = true -%} - {%- endif -%} - {%- endfor -%} - {%- unless has_excluded_taxonomy == true -%} - {%- assign index = index | push: document | uniq -%} - {%- endunless -%} - {%- endunless -%} + {%- assign index = index | push: document | uniq -%} {%- endfor -%} {%- endfor -%} var tipuesearch = {"pages": [ diff --git a/pages/search.html b/pages/search.html new file mode 100644 index 00000000..0aaaaeb2 --- /dev/null +++ b/pages/search.html @@ -0,0 +1,23 @@ +--- +title: Search +description: "Search" +layout: default +permalink: /search +tipue_search_active: true +exclude_from_search: true +--- + +
+
+
+
+
+
+ {% for tag in tags %} + +

{{ tag }}

+
+ {% endfor %} +
+ +