Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render a local file? #216

Open
briho opened this issue May 4, 2019 · 1 comment
Open

Render a local file? #216

briho opened this issue May 4, 2019 · 1 comment

Comments

@briho
Copy link

briho commented May 4, 2019

CORS security protections prevent me from using a local path for the document URL when testing how XML articles will be rendered by the Lens viewer. I don't want to build my own customised viewer, but I would like to use the standard starter locally to test articles I'm preparing for publication.

What's the easiest way to see how Lens will render an XML file locally?

@gnott
Copy link
Member

gnott commented May 9, 2019

There is a simple way to load a local XML file into the Lens viewer, if you drag-and-drop the XML file into the Lens browser window.

I tested by running the https://github.com/elifesciences/lens-elife project, after the npm start command, the Lens page is http://localhost:4001/doc.html

The XML specified there may report an error, which you can ignore. Drag-and-drop a JATS XML file from your disk onto the browser window and it will be rendered.

Drag-and-drop an eLife XML file from the https://github.com/elifesciences/elife-article-xml repo if you want to reproduce what I am getting.

You should be able to run your own Lens viewer or the lens-starter project similarly, in theory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants