DocOps / liquidoc-gem

The canonical gem source for LiquiDoc, a ruby-based documentation parsing and rendering utility enabling advanced builds with Asciidoctor, Jekyll, Liquid, and semi-structured data files.
https://docs.docops.org/liquidoc-user-manual.html
MIT License
12 stars 5 forks source link

Enable search integration (backend), starting with Algolia #46

Closed briandominick closed 6 years ago

briandominick commented 6 years ago

I have been using Algolia for a litle while now, and I really like it. It's well-tooled, reasonable to configure, very powerful, highly accessible (tons of plugins and tutorials), and seemingly an awesome contributor to the open-source world. There are some critiques of the way Algolia handles search results, but honestly given the state of search on the web, they surpass most of my clients' expectations.

Algolia works great with Jekyll through the excellent jekyll-algolia plugin. However, to work with AsciiDoc files, it requires a little bit of configurating, which I want to make LiquiDoc handle out of the box.

The approach I wish to take is to add a search: block to the build:properties: block.

- action: render
  data:
    - _configs/asciidoctor.yml
  builds:
    - backend: jekyll
      properties:
        files:
          - _configs/jekyll-global.yml
        search:
          index: main_docs

For now, the only parameter it takes is the name of the Algolia index you wish to push to. All of the installation/configuration of the jekyll-algolia plugin still needs to be done.

I can foresee a search:provider: setting or the like, to allow engagement of different modules or LD extensions.

- action: render
  data:
    - _configs/asciidoctor.yml
  builds:
    - backend: jekyll
      properties:
        files:
          - _configs/jekyll-global.yml
        search:
          provider: swiftype
          engine: main_docs
briandominick commented 6 years ago

Resolved in #48