Skip to content

Commit

Permalink
Add install docs and deprecation notice to README
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmayer committed Nov 16, 2021
1 parent 7fe8f3f commit 9c08225
Showing 1 changed file with 46 additions and 32 deletions.
78 changes: 46 additions & 32 deletions tipue_search/README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
Tipue Search
============

A Pelican plugin to serialize generated HTML to a JS variable that can be used by jQuery plugin - Tipue Search.
> :warning: **Instead of this plugin, please use the [Pelican Search](https://github.com/pelican-plugins/search) plugin.**
Copyright (c) Talha Mansoor
> :warning: **This plugin, and the jQuery code upon which it depends, _is abandoned and no longer maintained_.**
Author | Talha Mansoor
----------------|-----
Author Email | talha131@gmail.com
Author Homepage | http://onCrashReboot.com
Github Account | https://github.com/talha131

Why do you need it?
===================
Purpose
-------

Static sites do not offer search feature out of the box. [Tipue Search](http://www.tipue.com/search/)
is a jQuery plugin that search the static site without using any third party service, like DuckDuckGo or Google.
Serialize generated HTML content to a JS variable for use by the Tipue static search jQuery plugin.

Tipue search requires the textual content of site in a JS variable.

Requirements
============
Installation
------------

Tipue Search requires BeautifulSoup.
This plugin can be installed via:

python -m pip install -e "git+https://github.com/getpelican/pelican-plugins/#egg=pelican-tipue-search&subdirectory=tipue_search"

```bash
pip install beautifulsoup4
```

How Tipue Search works
=========================
Why Do You Need It?
-------------------

Static sites do not offer search feature out of the box. [Tipue Search](https://web.archive.org/web/20200703134724/https://tipue.com/search/)
is a jQuery plugin that search the static site without using any third party service, like DuckDuckGo or Google.

Tipue search requires the textual content of site in a JS variable.


How Tipue Search Works
----------------------

Tipue Search serializes the generated HTML into JSON and saves it into a JS variable. Format of JSON is as follows

```javascript
var tipuesearch = {
"pages": [
{
{
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero.",
"tags": "Example Category",
"url" : "http://oncrashreboot.com/plugin-example.html",
"title": "Everything you want to know about Lorem Ipsum"
},
{
{
"text": "Sed dignissim lacinia nunc. Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh.",
"tags": "Example Category",
"url" : "http://oncrashreboot.com/plugin-example-2.html",
Expand All @@ -54,32 +55,45 @@ var tipuesearch = {

JS variable is written to file `tipuesearch_content.js` which is created in the root of `output` directory.

How to use
==========

Your theme needs to have Tipue Search properly configured in it. [Official documentation](http://www.tipue.com/search/help/) has the required details.
How to Use
----------

Your theme needs to have Tipue Search properly configured in it. [Official documentation](https://web.archive.org/web/20200703134724/https://tipue.com/search/help/) has the required details.

In addition to the instructions from Tipue, the following has to be added in `pelicanconf.py`.

```python
PLUGIN_PATH = 'plugins'
PLUGINS = ['tipue_search']
DIRECT_TEMPLATES = ['index', 'tags', 'categories', 'authors', 'archives', 'search']
```

Furthermore, the generated JavaScript variable has to be sourced in the relevant html pages.
Furthermore, the generated JavaScript variable has to be sourced in the relevant HTML pages.

```html
<script src="{{ SITEURL }}tipuesearch_content.js"></script>
```

Pelican [Elegant Theme](https://github.com/talha131/pelican-elegant) and [Plumage theme](https://github.com/kdeldycke/plumage) have Tipue Search configured. You can view their code to understand the configuration.
Pelican [Plumage theme](https://github.com/kdeldycke/plumage) has Tipue Search configured. Check out its code to understand the configuration.


Backward Compatibility
======================
----------------------

This plugin requires Tipue Search Version 7.0 or higher.

Tipue used to expect content in a json file. Around Version 7.0, Tipue maintainers made a switch to JavaScript variable. tipue_search plugin was updated to reflect this change in commit `4a5f171fc`. Latest version of tipue_search plugin will not work with older versions of Tipue Search.
Tipue used to expect content in a JSON file. Around Version 7.0, Tipue maintainers made a switch to JavaScript variable. tipue_search plugin was updated to reflect this change in commit `4a5f171fc`. Latest version of tipue_search plugin will not work with older versions of Tipue Search.

If you are using older Tipue Search, prior to 7.0 release, then you will find old version of tipue_search plugin in commit `2dcdca8c8`.


Source Archive
--------------

The Tipue Search project itself seems to have been long abandoned. There is no
longer any official canonical reference of source code or documentation. There
only some artifacts left that were archived by the community:

If you are using older Tipue Search, prior to 7.0 release, then you will find old version of tipue_search plugin in commit `2dcdca8c8`.
* [Archived Tipue Search homepage](https://web.archive.org/web/20200703134724/https://tipue.com/search/)
* [Archived Tipue plugin help page](https://web.archive.org/web/20200703134724/https://tipue.com/search/help/)
* [Archived Tipue Search code v7.1](https://web.archive.org/web/20200703134724/https://www.tipue.com/search/tipuesearch.zip)
* [GitHub repository copy](https://notabug.org/jorgesumle/Tipue-Search)

0 comments on commit 9c08225

Please sign in to comment.