From 05c6524d73c0e8bf019cad78dca6f233b93f088c Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Thu, 5 May 2022 19:07:40 +0200 Subject: [PATCH] update --- .github/workflows/write_file.yml | 54 +++++++++++++-------- .gitignore | 3 +- docs/assets/js/zzzz-search-data.json | 72 ---------------------------- 3 files changed, 35 insertions(+), 94 deletions(-) delete mode 100644 docs/assets/js/zzzz-search-data.json diff --git a/.github/workflows/write_file.yml b/.github/workflows/write_file.yml index 32cf14e..c58d89e 100644 --- a/.github/workflows/write_file.yml +++ b/.github/workflows/write_file.yml @@ -2,11 +2,11 @@ name: Write File on: - # Triggers the workflow on push or pull request events but only for the main branch + # Triggers the workflow on push or pull request events but only for the docs branch push: - branches: [ docs ] + branches: [docs] pull_request: - branches: [ docs ] + branches: [docs] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -32,7 +32,7 @@ jobs: description: 'Documentation for OpenAir Cyan and related projects' author: 'ZanzyTHEbar' email: info@h-bat.com - url: "https://openair-collective.github.io" + url: 'https://openair-collective.github.io' # Build settings remote_theme: just-the-docs/just-the-docs @@ -43,7 +43,30 @@ jobs: previews: 3 permalink: pretty - exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile", "docs/tests/"] + exclude: + [ + 'node_modules/', + '*.gemspec', + '*.gem', + 'gemfiles/', + 'Gemfile', + 'Gemfile.lock', + 'package.json', + 'package-lock.json', + 'script/', + 'LICENSE.txt', + 'lib/', + 'bin/', + 'Rakefile', + 'docs/tests/', + '.sass-cache/', + '.jekyll-cache/', + 'node_modules/', + 'vendor/bundle/', + 'vendor/cache/', + 'vendor/gems/', + 'vendor/ruby/', + ] plugins: - jekyll-feed @@ -52,20 +75,8 @@ jobs: - jekyll-mermaid - jekyll-spaceship - exclude: - - .sass-cache/ - - .jekyll-cache/ - - gemfiles/ - - Gemfile - - Gemfile.lock - - node_modules/ - - vendor/bundle/ - - vendor/cache/ - - vendor/gems/ - - vendor/ruby/ - include: ['_pages'] - timezone: "America/New_York" + timezone: 'America/New_York' # Search options preview_words_before: 5 @@ -87,11 +98,11 @@ jobs: # Enable Back to Top bottom for all pages back_to_top: true - back_to_top_text: "Top" + back_to_top_text: 'Top' # Enable last edit timestamp for all pages last_edit_timestamp: true - last_edit_time_format: "%b %e %Y at %I:%M %p" + last_edit_time_format: '%b %e %Y at %I:%M %p' gh_edit_link: true # show or hide edit this page link gh_edit_link_text: 'Edit this page on GitHub.' @@ -111,6 +122,7 @@ jobs: recaptcha_site_key: 6LfKJsMfAAAAAFLjDTY0PG9RdcpLBuiuoFNyQLsh chunked_comment_loading: true lazy_load_comments: true - comment_replies_enabled: true" + comment_replies_enabled: true + " write-mode: overwrite - run: echo "✍ File written with status ${{ job.status }}." diff --git a/.gitignore b/.gitignore index 55efccd..35567f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.vscode /docs/_site /docs/.bundle -/docs/vendor \ No newline at end of file +/docs/vendor +/docs/assets/js/zzzz-search-data.json \ No newline at end of file diff --git a/docs/assets/js/zzzz-search-data.json b/docs/assets/js/zzzz-search-data.json deleted file mode 100644 index 848d3fb..0000000 --- a/docs/assets/js/zzzz-search-data.json +++ /dev/null @@ -1,72 +0,0 @@ ---- -permalink: /assets/js/search-data.json ---- -{ -{%- assign i = 0 -%} -{%- assign pages_array = | split: -%} -{%- assign pages_array = pages_array | push: site.html_pages -%} -{%- if site.just_the_docs.collections -%} - {%- for collection_entry in site.just_the_docs.collections -%} - {%- assign collection_key = collection_entry[0] -%} - {%- assign collection_value = collection_entry[1] -%} - {%- assign collection = site[collection_key] -%} - {%- if collection_value.search_exclude != true -%} - {%- assign pages_array = pages_array | push: collection -%} - {%- endif -%} - {%- endfor -%} -{%- endif -%} -{%- for pages in pages_array -%} - {%- for page in pages -%} - {%- if page.title and page.search_exclude != true -%} - {%- assign page_content = page.content -%} - {%- assign heading_level = site.search.heading_level | default: 2 -%} - {%- for j in (2..heading_level) -%} - {%- assign tag = '' -%} - {%- assign title = titleAndContent[0] | replace_first: '>', '

' | split: '

' -%} - {%- assign title = title[1] | strip_html -%} - {%- assign content = titleAndContent[1] -%} - {%- assign url = page.url -%} - {%- if title == page.title and parts[0] == '' -%} - {%- assign title_found = true -%} - {%- else -%} - {%- assign id = titleAndContent[0] -%} - {%- assign id = id | split: 'id="' -%} - {%- if id.size == 2 -%} - {%- assign id = id[1] -%} - {%- assign id = id | split: '"' -%} - {%- assign id = id[0] -%} - {%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%} - {%- endif -%} - {%- endif -%} - {%- unless i == 0 -%},{%- endunless -%} - "{{ i }}": { - "doc": {{ page.title | jsonify }}, - "title": {{ title | jsonify }}, - "content": {{ content | replace: '