Skip to content

Latest commit

 

History

History
38 lines (22 loc) · 1.37 KB

File metadata and controls

38 lines (22 loc) · 1.37 KB

textcavator-iframe-dev

This repository is intended to support the development of Textcavator for use in an <iframe>.

We support iframe embedding so researchers can embed the Textcavator search inside a project website. This is used in PEACE Portal.

This repository can be used alongside a local Textcavator server. It runs a HTTP server that will serve a single page, which will embed Textcavator. This can be used to test layout, configurations, etc. It is not intended for production.

Usage

The test app is run using server.py. It requires Python 3 to use (no additional packages required).

Open the local_settings.py file in your Textcavator environment. Add this to allow embedding:

X_FRAME_OPTIONS = 'ALLOW'

Start your Texcavator development server. Then run this app with:

python server.py

The container app will run at http://localhost:9000/ . Use ctrl + C to quit.

To direct the iframe to a specific corpus, you can include a query parameter corpus in the URL with the corpus name, e.g. http://localhost:9000/?corpus=troonredes .

Contents

This repository contains:

  • index.html + main.js + style.css + solis.png: HTML page contents
  • server.py: Python script to start an HTTP server

Licence

This repository is shared with an MIT licence.