From 3f0742c730ccbe0354b46e0750050aee9a3d5926 Mon Sep 17 00:00:00 2001 From: tonyjurg Date: Fri, 12 Jul 2024 17:35:05 +0200 Subject: [PATCH] remove test code --- .github/workflows/jekyll.yml | 35 --------------------------- docs/Gemfile | 6 ----- docs/_config.yml | 23 ------------------ docs/_plugins/generate_search_json.rb | 32 ------------------------ docs/_plugins/search.json | 1 - 5 files changed, 97 deletions(-) delete mode 100644 .github/workflows/jekyll.yml delete mode 100644 docs/Gemfile delete mode 100644 docs/_plugins/generate_search_json.rb delete mode 100644 docs/_plugins/search.json diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml deleted file mode 100644 index 3d444ce..0000000 --- a/.github/workflows/jekyll.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build and Deploy Jekyll Site - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - - - name: Install dependencies - run: | - cd docs - bundle install - - - name: Build Jekyll site - run: | - cd docs - bundle exec jekyll build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_site diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 8906739..0000000 --- a/docs/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source "https://rubygems.org" - -gem "jekyll", "~> 4.0" -gem "jekyll-seo-tag" -gem "jekyll-sitemap" -gem "jekyll-feed" diff --git a/docs/_config.yml b/docs/_config.yml index 41747f2..7305b13 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,26 +8,3 @@ remote_theme: pages-themes/minimal@v0.2.0 plugins: - jekyll-remote-theme - jekyll-sitemap -- jekyll-search -- jekyll-feed -- jekyll-seo-tag - -jekyll-seo-tag: - title: "Nestle 1904 GBI" - -jekyll-search: - title: "Search" - excerpt: "Search the documentation" - placeholder: "Search..." - label: "Results" - no_results_message: "No results found" - minimum_length: 3 - -exclude: - - Gemfile - - Gemfile.lock - - _plugins - -collections: - docs: - output: true diff --git a/docs/_plugins/generate_search_json.rb b/docs/_plugins/generate_search_json.rb deleted file mode 100644 index ac70507..0000000 --- a/docs/_plugins/generate_search_json.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'json' -require 'kramdown' -require 'nokogiri' - -module Jekyll - class SearchJsonGenerator < Generator - safe true - - def generate(site) - items = [] - - site.pages.each do |page| - next unless page.path.start_with?('docs/') && page.extname == '.html' - - doc = Nokogiri::HTML(page.content) - content = doc.css('body').text.gsub(/<\/?[^>]*>/, "").strip - title = page.data['title'] || page.basename_without_ext - url = page.url - - items << { - title: title, - url: url, - content: content - } - end - - File.open(File.join(site.dest, 'search.json'), 'w') do |f| - f.write(JSON.pretty_generate(items)) - end - end - end -end diff --git a/docs/_plugins/search.json b/docs/_plugins/search.json deleted file mode 100644 index 8b13789..0000000 --- a/docs/_plugins/search.json +++ /dev/null @@ -1 +0,0 @@ -