UseTipueSearchOption

Michalis Kamburelis edited this page May 31, 2018 · 19 revisions

Pass the CommandLine option --use-tipue-search to pasdoc (or check the Use tipue search engine box in the PasDocGui) to instantly get a working "Search" box in the HTML output. It allows full text search on the generated documentation.

The search is implemented using Tipue. It is a nice lightweight JavaScript search engine. You don’t have to know how it works — you need to only pass the --use-tipue-search option to pasdoc, everything else is done automatically and you get a working "Search" box in your HTML documentation.

Tipue is a client-side search engine

Note that Tipue is a client-side search engine (as it uses JavaScript for everything). This means that the whole work is done by your web browser.

  • On one hand, this is comfortable, as it allows the "search" functionality to "just work", no matter how you view the documentation (through an HTTP server or not). You don’t need to configure anything. PasDoc puts all the files where they should be (Tipue, jQuery, generated index data for Tipue), and the search works.

  • On the other hand, the browser has to download the (potentially large) "index data" of your documentation when doing a search. Tipue search cannot show any results before this data is downloaded. You should watch the size of tipuesearch/tipuesearch_content.js file (in earlier versions, tipuesearch_data.js) in your generated documentation. If it’s too large (if downloading it takes a while), then possibly you have outgrown the Tipue capabilities, and you should look into other search implementations (e.g. your own server-side search, or using Google search box).

That said, it works quite nicely even with a large documentation in our experience (Castle Game Engine is using it with over 150 units…​).

To test the speed, you can:

  • Search for something.

  • Once you’re on the "Search results" page of your documentation, hard refresh the page (Ctrl + Shift + R). You can watch the "Network" panel of developer tools in Firefox or Chrome to watch how tipuesearch_content.js is downloading.

One day we may implement options to integrate other search solutions, see ToDoSearch.

PasDoc, documentation generator for Pascal:
Features:
Supported Tags:
Command Line:
Development:
Developers pages:
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.