RFC: Feature proposal: Editoria as a headless CMS [*ie* an api for book]
Editoria is already perfectly set up to make epub and PDF. While this is a pretty neat experience, we should be able to get the content of any published book to make it available online. An example of that use case is what Head-publishing is offering: each book is also offered as a webpage, where you can read everything on screen, have search and easy sharing of the content through url. Booksprints folks are asking for this kind of features, as clients wants to be able to share websites instead of epubs.
To do so, we can leverage any static website generator to be able to build a website for a publishing house that would fetch the data from their editoria instance to make the content available as a website.
If we want to offer this kind of functionality to anyone using Editoria, we need to offer to our user a way to make the output of editoria available to the outside (the content from the book and its meta data).
After discussing with @adam, the goal is to have a simple prototype of that website generator mecanism by the end of the month of april.
The goal: each Editoria instance offers a REST endpoint API where a user with the right credentials can have access to some data. The basic example would be to give access to all the books that have a “published” status.
In the previous proposal from #367, Juan Gomez is also thinking about accessing PDF and epub for each “published” book through the API. But that means that Editoria must create the files everytime a request is being made for that content, but that means a more complex conversation (and some work on the epub export around metadata, alt tags, etc.)
The prototype i’ll be making will use eleventy as it’s js based and configurable to do anything we want quickly. We’ll see later on if we need to use another set of tools.
@alexgeo what would be the best way for that API system to work?