Publish book online via Flax
Context
Currently, books can be exported to PDF and epub. Users would additionally like to publish a book directly to a website.
Proposal
There are many ways this could be approached (e.g. one site to many books per instance; one site to many books per user; one site to many books per defined collection; etc.) but since all use cases require a book page (a URL for the book), that is where we will start.
MVP
- On the admin page, add configuration (Turn ON/OFF) for "publish books online" functionality which makes this available to book owners
- Allow publishing to one end-point "per user per book" so each book owned by a user is published to a unique URL, for example:
https://{domain}/{user-id}/{book-id}
- The published book URL must be publicly available (no sign-in required)
- The site should match styles from the chosen book template. (in the publish modal, default to whatever the user has selected in the preview)
- Design 8 (one per existing template) default book page layouts that has:
- cover image
- metadata from the title page and copyright page
- 2 buttons to download: 1) a screen quality version of the PDF. 2) epub
- the book's table of contents navigation on the left
- the contents of the book with one page per chapter component (
https://{domain}/{user-id}/{book-id}/{chapter-id}
User flow
Future iterations
In future iterations, we'd expect this feature to be extended along these lines:
- Allow book owners to set a custom URL
- Allow book owners to add custom pages (e.g. About) and control the layout and theming of the site (similar to the Kotahi CMS), and extend the design to support the "one site to many books per user" use case
- Provide the same functionality on the instance level to support a choice between the publishing models "Per instance " or Per User"
Design
New button: Publish online
New modal: Publish online