Origami comics

Serve anything

Like all web servers, Origami’s server can serve content from files in folders.

$ ls blog
index.html    posts
$ cat blog/index.html
<h1>My blog</h1>
$ ori serve blog
Server running at http://localhost:5000. Press Ctrl+C to stop.

http://localhost:5000/index.html

My blog

But Origami tools are general and can serve content from any hierarchical structure - like a data file!

products.yaml
gadgets:
  doodad.html: |
    <h1>Doodad</h1>
  gizmo.html: |
    <h1>Gizmo</h1>
whatsits:
  thingamabob.html: |
    <h1>Thingamabob</h1>
  thingamajig.html: |
    <h1>Thingamajig</h1>

http://localhost:5000/gadgets/gizmo.html

Gizmo

You can also serve content from a JavaScript object that creates resources with code.

site.js
import { doTheComplicatedThing } from "./complicated.js";

export default {
  "index.html": doTheComplicatedThing(),
};
http://localhost:5000/index.html

Home page

This content produced by a JavaScript function could as complex as you want.

Origami’s concise dialect of JavaScript expressions lets you easily mix in content from any source!

site.ori
{
  about.html: "<h1>About Us</h1>" // direct
  blog/                           // static files
  index.html = index.js()         // JavaScript file
  products = products.yaml        // data file
  support = support.ori()         // other Origami file
}
http://localhost:5000/index.html

My site

Handmade with Web Origami…

Read more: Origami's serve command

  Comic index