Arxiv onebox plugin

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:.

4 Likes

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

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:

2 Likes

What does http://iframely.com/debug say?

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": "http://arxiv.org/pdf/1602.05925",
    "citation_arxiv_id": 1602.05925,
    "html-title": "[1602.05925] Encoding Data for HTM Systems",
    "shortcut icon": {
        "href": "http://arxiv.org/favicon.ico",
        "type": "image/x-icon"
    },
    "charset": "UTF-8"
}

Not a good icon, but better than nothing.

1 Like

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

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

1 Like

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.

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

1 Like

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.

4 Likes

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.

4 Likes

Hey @rhyolight,

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

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.

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

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.