explaingit

jurre/onebox

Analysis updated 2026-07-12 · repo last pushed 2015-06-03

RubyAudience · developerComplexity · 2/5DormantSetup · easy

TLDR

Onebox is a Ruby library that turns plain URLs into rich, visual previews like embedded videos and product cards. Pass it a link and it returns ready-to-display HTML with the title, image, and description automatically extracted.

Mindmap

mindmap
  root((repo))
    What it does
      Converts URLs to previews
      Returns HTML snippets
      Built-in caching
    Tech stack
      Ruby
      oEmbed
      Open Graph
    Use cases
      Forums and comments
      Chat applications
      Social feeds
    Audience
      App builders
      Forum platforms
      Content developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add link previews to a forum or comment system so shared URLs show embedded videos and images.

USE CASE 2

Build a chat app that automatically expands pasted links into rich product or media cards.

USE CASE 3

Create a social feed where shared links display titles, thumbnails, and descriptions inline.

What is it built with?

RubyoEmbedOpen Graph

How does it compare?

jurre/oneboxcschneid/huginncschneid/statsd-instrument
LanguageRubyRubyRuby
Last pushed2015-06-032014-12-072014-05-14
MaintenanceDormantDormantDormant
Setup difficultyeasymoderateeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Just add the gem to your Gemfile and call it with a URL, no external services or infrastructure required.

No license information was provided in the explanation, so the usage terms are unknown.

In plain English

Onebox is a Ruby library that converts plain URLs into rich, visual previews. When someone pastes a link to a YouTube video, an Amazon product, or an image, it automatically generates an embedded preview, like a video player or a product card with a title, image, and description, instead of just showing the raw link text. You pass it a URL, and it returns an HTML snippet ready to display in your app. It handles the work of fetching the page, extracting relevant metadata like titles and thumbnails, and formatting everything into a nice-looking preview. It also includes its own caching system so it doesn't repeatedly fetch the same URL, and you can swap in your own cache if you prefer. This is useful for anyone building an app with user-generated content, forums, comment systems, chat applications, or social feeds. For instance, if you run a discussion platform and someone shares a link to a movie trailer, you'd want that link to appear as an embedded video player rather than a boring blue URL. That's exactly what this does. It was originally built for Discourse, a popular forum platform, then extracted into a standalone tool anyone can use. It supports many popular sites out of the box and is designed to be extensible. If a site supports standard embed protocols like oEmbed or Open Graph, adding support can be as simple as whitelisting the URL. For sites that don't follow those standards, developers can write a custom engine that parses the page and extracts the needed data. The project also includes a development server so you can test how different URLs will look before deploying.

Copy-paste prompts

Prompt 1
I want to use the Onebox Ruby gem to preview links in my Rails app. Write a helper method that takes a URL string, passes it to Onebox, and returns the safe HTML preview to render in a view.
Prompt 2
Using the Onebox gem, show me how to configure a custom cache so repeated URL previews don't refetch the page every time.
Prompt 3
I need to add support for a custom website that doesn't support oEmbed or Open Graph. Using Onebox, write a custom engine class that fetches the page and extracts the title, image, and description.
Prompt 4
How do I use the Onebox development server to test what different URLs will look like before I deploy my app?

Frequently asked questions

What is onebox?

Onebox is a Ruby library that turns plain URLs into rich, visual previews like embedded videos and product cards. Pass it a link and it returns ready-to-display HTML with the title, image, and description automatically extracted.

What language is onebox written in?

Mainly Ruby. The stack also includes Ruby, oEmbed, Open Graph.

Is onebox actively maintained?

Dormant — no commits in 2+ years (last push 2015-06-03).

What license does onebox use?

No license information was provided in the explanation, so the usage terms are unknown.

How hard is onebox to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is onebox for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.