{"id":13588693,"url":"https://github.com/evnbr/bindery","last_synced_at":"2025-04-08T06:32:40.758Z","repository":{"id":18982344,"uuid":"22203719","full_name":"evnbr/bindery","owner":"evnbr","description":"Book layout in the browser","archived":true,"fork":false,"pushed_at":"2023-04-04T02:48:50.000Z","size":26492,"stargazers_count":413,"open_issues_count":50,"forks_count":38,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-17T20:56:16.268Z","etag":null,"topics":["books","javascript","layout","print"],"latest_commit_sha":null,"homepage":"https://bindery.info","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CenturyLinkCloud/PublicKB","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evnbr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-07-24T07:37:15.000Z","updated_at":"2025-03-02T19:41:24.000Z","dependencies_parsed_at":"2024-01-16T12:02:15.253Z","dependency_job_id":null,"html_url":"https://github.com/evnbr/bindery","commit_stats":{"total_commits":789,"total_committers":6,"mean_commits":131.5,"dds":"0.021546261089987362","last_synced_commit":"8556347c0df3e90f7bb3bc28363c3183b06903d5"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evnbr%2Fbindery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evnbr%2Fbindery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evnbr%2Fbindery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evnbr%2Fbindery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evnbr","download_url":"https://codeload.github.com/evnbr/bindery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792150,"owners_count":20996878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["books","javascript","layout","print"],"created_at":"2024-08-01T15:06:52.216Z","updated_at":"2025-04-08T06:32:35.747Z","avatar_url":"https://github.com/evnbr.png","language":"TypeScript","readme":"⚠️ Bindery is no longer in development. You may be interested in similar open-source projects like [paged.js](https://pagedjs.org/) or [weasyprint](https://weasyprint.org/), or commercial offerings like [PrinceXML](https://www.princexml.com/). Also, keep an eye on [CSS Paged Media](https://developer.mozilla.org/en-US/docs/Web/CSS/@page)'s browser compatibility. \n\n---\n\n# Bindery.js\n\n[![npm](https://img.shields.io/npm/v/bindery.svg)](https://www.npmjs.com/package/bindery)\n[![Build Status](https://travis-ci.com/evnbr/bindery.svg?branch=master)](https://travis-ci.com/evnbr/bindery)\n[![codecov](https://codecov.io/gh/evnbr/bindery/branch/master/graph/badge.svg)](https://codecov.io/gh/evnbr/bindery)\n[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/bindery.svg)](https://www.npmjs.com/package/bindery)\n\n[Intro](https://bindery.info/) ·\n[Learn](https://bindery.info/learn) ·\n[Docs](https://bindery.info/docs) ·\n[Examples](https://bindery.info/examples) ·\n[About](https://bindery.info/about)\n\n_Bindery.js_ was a library for designing printable books with HTML and CSS.\n\nAt its simplest, Bindery flows content over multiple pages. From there, the designer can create elements that depend on that flow, like running headers, footnotes, tables of contents, and indexes. Bindery also provides print options like bleed, crop marks, and booklet ordering.\n\nIf you're designing a website, think about books as an extension of the responsive web. If you're designing a book, express your layouts programmatically, with no need for InDesign.\n\n### Getting Started\n\n```html\n\u003cdiv id=\"content\"\u003e\n  \u003c!-- The contents of your book --\u003e\n\u003c/div\u003e\n\n\u003cscript src=\"https://unpkg.com/bindery\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  Bindery.makeBook({ content: '#content' });\n\u003c/script\u003e\n```\n\nYou can also install bindery from [npm](https://www.npmjs.com/package/bindery), or \u003ca href=\"https://unpkg.com/bindery/dist/bindery.min.js\" class=\"btn\" download\u003edownload directly\u003c/a\u003e.\n\n```\nnpm install --save bindery\n```\n\n### Using Rules\n\n```js\nconst { makeBook, PageBreak, Footnote } = Bindery;\n\nmakeBook({\n  content: '#content',\n  rules: [\n    PageBreak({ selector: 'h2', position: 'before', continue: 'right' }),\n    Footnote({\n      selector: 'p \u003e a',\n      render: (el, num) =\u003e `${num}: Link to ${el.getAttribute('href')}`;\n    }),\n  ],\n});\n```\n\nFor more, see [Learn](https://bindery.info/learn) and the [Docs](https://bindery.info/docs).\n\n### Developing\n\nWhen contributing, keep in mind that bindery.js is intended to provide an approachable jumping-off point for HTML-to-Print exploration. Because of this, it is intended to work out of the box as a script tag (without needing to run a dev server, set up a development environment, use preprocessors, or know javascript at all).\n\n- `npm run build` - Updates dist/\n- `npm run test` - Runs Jest\n\n#### To Do\n\n- [ ] Support for signatures and advanced ordering\n- [ ] Support for RTL languages\n- [ ] Examples for use with blogging platforms\n- [ ] Examples for use with React\n- [ ] Approachable API for writing custom rules\n\n#### Background\n\nbindery.js was originally written in Spring 2014 for [for/with/in](http://htmloutput.risd.gd/),\na publication from participants in \"HTML Output\" at RISD. For more, [see here](https://bindery.info/about).\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevnbr%2Fbindery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevnbr%2Fbindery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevnbr%2Fbindery/lists"}