diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd33abb..75ba1e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,19 @@ jobs: --volume="${{ github.workspace }}:/srv/jekyll" \ jekyll/builder:latest /bin/bash -c "gem install bundler && chmod 777 /srv/jekyll && jekyll build" + search: + name: Test search rake command + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@master + + - name: Build the site in the jekyll/builder container + run: | + docker run --rm \ + --volume="${{ github.workspace }}:/srv/jekyll" \ + jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod 777 /srv/jekyll && jekyll build && bundle exec just-the-docs rake search:init" + css: name: Stylelint runs-on: ubuntu-latest diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake index 82dcfb6..5c03790 100644 --- a/lib/tasks/search.rake +++ b/lib/tasks/search.rake @@ -14,8 +14,8 @@ namespace :search do { {% assign comma = false %} {% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": { - "title": "{{ page.title | replace: '&', '&' }}", - "content": "'+content+'", + "title": "{{ page.title | replace: \'&\', \'&\' }}", + "content": "\'+content+\'", "url": "{{ page.url | absolute_url }}", "relUrl": "{{ page.url }}" }{% assign comma = true %}