Get in touch

Introducing Postlight's Lorem Ipsum Generator Generator

Create a lorem ipsum generator based on any web site content.

By Drew Bell

When you’re prototyping digital products like apps and web sites, you’re in constant need of placeholder text to represent content that will eventually appear in those products. When this happens, most product developers reach for Lorem Ipsum, scrambled-up Latin based on a 1st-century BC text by Cicero. But “greeking” gets old fast, and there are much more modern sources your placeholder content can come from.

Meet Postlight’s Lorem Ipsum Generator Generator, a free command line tool for engineers that will create and deploy a lorem ipsum generator site in a matter of minutes. Provide URLs to source text, make some design choices, and this app deploys a free, configurable site and endpoint to Netlify.

Get it free on GitHub to try it out.


🎰 Generate a lorem ipsum generator site using Mercury Web Parser – postlight/lorem-ipsum-generator-generator

We used it to create Fyre Ipsum, a lorem ipsum generator based on the Fyre Festival pitch deck. Check it out—and use the web-based form to create your lorem-ipsum-generator-generator command.

What other corpus of text could create a good lorem ipsum generator? The possibilities are endless. Show us what you got.

The Technical Details

Using either command-line options or ones entered interactively, lorem-ipsum-generator-generator is a Node script that uses Mercury Web Parser to fetch plaintext from one or more URLs, and spits out a Lambda function that returns a Markov chain based on that corpus. It then creates an HTML document (based on the Fyre Ipsum template) that uses that function, and deploys the whole shebang to the user’s Netlify account using Netlify functions.

When it’s done, you can edit the generated HTML document as you wish. There’s no build step, since the styles and interaction are all contained in index.html. The Lambda function uses a forked version of node-markov, so the data table can be used directly, rather than being generated every call. This means you can probably run a ton of requests without hitting computation quotas, and the site responds really quickly.

It’s a ton of fun to experiment, and takes so little time (maybe a minute, if you know what to expect) that churning out really strong Ipsum silliness is kind of addictive.

When I was building this, I chose to generate a site and function, rather than making a dynamic generator on the fly, because it lets the user take a good example as far as they want. Get a good reaction when you post your generator to Twitter? Buy a domain name and upgrade your Netlify plan. Want to make your site stand out? Edit the styles and scripts to your heart’s content.

Try the Generator Generator Now

Give it a spin: Install Node, make a free Netlify account, gather some URLs, and npx @postlight/lorem-ipsum-generator-generator.

When you’ve made a generator site you’re proud of, let us know: Tweet it at us at @mercurytools. We can’t wait to see what you make.

Drew Bell is a senior engineer at Postlight and created the Lorem Ipsum Generator Generator.

Story published on Mar 18, 2019.