BibleEngine

Flint

Questions, mostly “why is it blank

Nearly every question about a drop-in widget turns out to be the same question wearing a different hat: I pasted the code and nothing happened. Those are first, in the order they are worth checking.

On this page

  1. I installed it and nothing appears.
  2. The box shows up, but searching does nothing.
  3. My host or platform strips the code out.
  4. The results are showing on the wrong page.
  5. How do I install this on WordPress, Squarespace, Wix, Blogger…?
  6. Why is a phrase in quotes so much slower than a single word?
  7. I searched for a common word and got nothing.
  8. Will search engines index my results page?
  9. Can I change the way it looks?
  10. Where do the verse links go?
  11. Is it really free? Will it stop working?
  12. Which Bible text is this, and how accurate is it?
  13. Can I host it myself?
  14. What is the difference between Flint and VerseTagger?

Q.I installed it and nothing appears.

Work down this list. The first item accounts for most of them.

Open your browser’s console. Press F12, choose Console, and reload. Flint says plainly what went wrong — it does not fail silently. If it could not find anywhere to draw the box, it says so and tells you what to add.

Q.The box shows up, but searching does nothing.

Almost always a half-configured Content-Security-Policy. This is nastier than a missing one, because the box renders perfectly and only the searching is broken.

Flint needs bibleengine.org in two places, and they do different jobs:

Content-Security-Policy
# add bibleengine.org to both directives
script-src  'self' https://bibleengine.org;
connect-src 'self' https://bibleengine.org;

If you do not know whether your site sends a CSP, it probably does not, and this is not your problem. Most CSP headers arrive by way of a security plugin or a host’s default configuration rather than by anyone deciding to add one.

Reading the console. A CSP refusal names the directive that blocked it. If the message mentions connect-src, that is the one to fix — you do not have to guess.

Q.My host or platform strips the code out.

Some hosted platforms remove script tags from user content as a security measure. If yours does, Flint cannot work there, and neither can any other embeddable widget — it is not something we can work around from our end.

Two things usually help. First, paste into a raw HTML or embed block rather than the visual editor; the visual editor is often what removes the tag, not the platform. Second, check whether your plan allows custom code at all — on several platforms that is a paid feature, and on the free tier the tag is silently discarded when you save.

A quick way to tell: save the page, then use View Source in your browser and look for flint.js. If it is not in the source, it was removed before it ever reached the visitor.

Q.The results are showing on the wrong page.

You have set data-results to an address that is not the page holding the plain snippet. The box submits to whatever that attribute says, so the two have to agree.

A common version of this on a blog: the results are pointed at the site’s front page. That appears to work at first, because the search box happens to be there too — but as new posts are published, the box is pushed further down, and eventually visitors land on a page of recent posts with their results somewhere below the fold. Point data-results at a fixed page you have set aside for it, not at an address whose content changes.

If you would rather not maintain a second page at all, delete data-results. The box will then show its own results wherever it sits.

Q.How do I install this on WordPress, Squarespace, Wix, Blogger…?

The rule is the same everywhere: the div goes where you want the box, the script goes wherever that platform keeps its scripts. Only the names of the boxes change.

PlatformWhere things go
WordPressMake a page for the results first — an ordinary published page, called something like Bible Search — and put the plain div and script in it with a Custom HTML block. Then put the box wherever you want it, in a Custom HTML block or a sidebar Custom HTML widget, with data-results pointing at that page’s address. The script can go in your theme’s footer instead of alongside each div if you would rather add it once. Do not paste into the visual editor — it will eat the tag; use the Custom HTML block.
SquarespaceDiv: a Code Block on the page. Script: Settings → Advanced → Code Injection → Footer. Custom code requires a paid plan.
WixBoth together in an Embed HTML element. Wix sandboxes it in an iframe, so the box and its results live inside that frame — give the element plenty of height.
BloggerDiv: an HTML/JavaScript gadget in the layout, or the HTML view of a post. Script: Theme → Edit HTML, just before </body>.
GhostDiv: an HTML card. Script: Settings → Code Injection → Site Footer.
Plain HTMLExactly as printed on the Flint page. Nothing special is needed.

If your platform is not listed, the two questions to answer are “where can I put raw HTML in the page” and “where can I put a script tag”. Any platform that answers both can run Flint.

Q.Why is a phrase in quotes so much slower than a single word?

Because the two are answered in genuinely different ways. A word search consults an index, then fetches only the twenty verses it is about to show you. A quoted phrase has no index of its own — the words are looked up separately, and then every verse containing all of them has to be read to see whether the words actually sit next to each other in that order.

For an uncommon phrase that is a handful of files and you will not notice. For a phrase built out of common words it can be a great many, and there will be a pause. It is working, not stuck.

If you know roughly where the phrase is, searching the distinctive words on their own is usually faster and gets you there just as well.

Q.I searched for a common word and got nothing.

Words like the, and, of and a are not indexed. They appear in so many verses that an index of them would be nearly the size of the Bible and would not narrow anything down.

Flint tells you when it has done this rather than pretending the word was not there — the line above the results says which words it skipped. If every word in your search was a skipped one, there is nothing left to search for.

Those words still work inside a quoted phrase, because a phrase is matched against the verse text itself rather than against the index. "the way, the truth" finds what you would expect.

Q.Will search engines index my results page?

No, and that is the correct behaviour rather than a shortcoming. Results are assembled in the visitor’s browser after the page loads, so a crawler sees an empty search box.

This is how search pages are supposed to behave. Nobody wants a search engine indexing another search engine’s result pages, and Google has asked for years that such pages be kept out of the index. If you want scripture text on your site that is indexed, that is a job for real pages with real content, not for a search box.

Q.Can I change the way it looks?

Yes, three ways, in increasing order of effort.

Flint never imports a font. It inherits whatever your page is set in, which is why it does not look like a stranger’s widget dropped into your design.

Q.Is it really free? Will it stop working?

Free, with no account to make, no key to paste, no quota to run out of and no plan to be upgraded to. There is nothing on our end that identifies your installation, which also means there is no switch that could turn yours off.

It is worth saying plainly why, because “free” is usually the part that later turns out to have a catch. BibleEngine is nothing but static files. There is no server running your searches, no database answering queries, and therefore no bill that grows when more people use it. Cloudflare hosts the files at no charge. The only recurring cost is the domain name, and as long as that is paid there is no reason for any of this to go away.

That is a different footing from the service this one descends from. phpAV had a server behind every search, and a server is a bill that arrives whether the money is there or not; when it was not, the site came down. Flint cannot fail that way, because there is nothing to run.

What nobody can promise is forever. What we can do is make sure you are not stranded: everything — the widget, the engine, the Bible text, the index — is CC0, so it can be copied and hosted anywhere by anyone, including you. See hosting it yourself.

Q.Which Bible text is this, and how accurate is it?

The King James Version by default, with the American King James Version available through data-translation="akjv". Both are public domain, as are the Strong’s numbers and the Hebrew and Greek lexicon.

The KJV text keeps its editorial conventions rather than flattening them: words supplied by the translators are set in italic, the words of Christ appear in red, and the paragraph marks stay where the printers put them. Those marks are stored with the text and styled when it is displayed, so nothing is lost.

If you find an error in the text, please say so. Corrections go to the source files, so every site using Flint gets them at once.

Q.Can I host it myself?

Yes, and there is nothing to license or ask about. Copy flint.js, BibleEngine.js and the /v1/ folder to your own server and point Flint at them:

self-hosted
<div id="flint-search"></div>
<script src="/js/flint.js"
        data-engine="/js/BibleEngine.js"
        data-base="/v1"></script>

Everything is flat files, so any host that can serve a file can serve them. There is no PHP, no database and nothing to install — the whole thing runs in the visitor’s browser either way.

Q.What is the difference between Flint and VerseTagger?

They solve opposite halves of the same problem, and they are built to sit on the same page.

Flint gives your reader a search box: they arrive wanting to find something, and they type. VerseTagger works on the text you have already written: it finds the references in your own prose — John 3:16, ranges, comma lists — and shows the verse when a reader hovers over one, so nobody has to leave your article to read what you cited.

If you write about scripture, you probably want both.

BibleEngine A Ministry Service by Danny Carlton.