Arxiv onebox plugin

(Matt Taylor) #1

Anyone know if there is a plugin for Arxiv links? Our community references a lot of scientific papers from this website. Here’s an example link:

The important data for the onebox would be the title, author, submission date, and abstract.

If there is not one yet, I’m thinking about creating one. If anyone else would use it, please :heart:.

(Jeff Atwood) #2

Do they support opengraph or oembed? Check that first. Then you could simply whitelist the domain.

(Matt Taylor) #3

It doesn’t seem like it. At least I can’t find any details on their website about support. It looks like onebox plugins are not that difficult to put together. At least this one seems pretty simple:

(Jeff Atwood) #4

What does Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed say?

(Matt Taylor) #5

It doesn’t look awful. The JSON looks decent:

    "citation_title": "Encoding Data for HTM Systems",
    "citation_author": "Purdy, Scott",
    "citation_date": "2016/02/18",
    "citation_online_date": "2016/02/18",
    "citation_pdf_url": "",
    "citation_arxiv_id": 1602.05925,
    "html-title": "[1602.05925] Encoding Data for HTM Systems",
    "shortcut icon": {
        "href": "",
        "type": "image/x-icon"
    "charset": "UTF-8"

Not a good icon, but better than nothing.

(Matt Taylor) #6

I updated my onebox whitelist to include, but they still do not resolve to anything. Just the same URL I pasted.

(Jeff Atwood) #7

They are cached very very heavily so be sure to use a new URL that you haven’t used in the last 48 hours.

(Matt Taylor) #8

No dice with a new URL. I see the little loading icon by the URL in the preview for a split second, then just the URL after the icon goes away.

The fact that the loading indicator icon comes up seems to indicate that the whitelist is working, but the onebox is not loading.

(Jeff Atwood) #9

Sure @techapj can have a quick look now that we’ve done the basic due diligence.

(Arpit Jalan) #10

Hi Matt,

I looks like [1602.05925] Encoding Data for HTM Systems does not have OpenGraph or oEmbed tags with content information. Onebox requires these meta tags to parse the data.

Yes, onebox support can be added via plugin, but since you are on Standard plan you will not be able to install custom plugin on your instance. Only Enterprise plan supports installation of custom plugins.

(Kane York) #11

This means that the best course of action is to make it part of the onebox repo, as arxiv is a sufficiently general website that I think multiple Discourse websites would benefit from having it.

(Robert) #12

Hey @rhyolight,

have you tried already to convince Arxiv to support opengraph/oembed?

(Matt Taylor) #13

Yes I have, but I doubt they will support it. Arxiv is a very basic website without much funding for website administration or continuing development.

(Robert) #14

Than maybe a 3rd party website instead that allows to search in arXiv as well?
Something like Google Schoolar?

(Matt Taylor) #15

That’s a good idea. I can find arxiv papers via Google Scholar, but they do not have their own page, just search results. Each result links directly to the arxiv paper.