Serial Books and Admin Q

Hi all. I’m looking to add simple, user-friendly support for Serialized content (i.e., books) to Ghost and could use some guidance.

I’ve read through the forum posts and seen a few past attempts at using tags (and a book theme) to simulate serialized content. None do exactly what I have in mind. FWIW, I already have a basic, user-friendly system working in Jekyll, generating static content with RSS feeds. It’s super fast, but of course, without the subscription, payment, email, and discovery parts of Ghost.

Ideally, what I’m looking to do is add two new classes of content to Ghost: Book and Chapter. These would be available in the admin panel, along with a Bookshelf page where you can control the landing-page presentation, and a book-reading Theme.

Books would have their own cover images, as well as a title, description, blurb, and endorsements. They could also have their own individual tags to be discoverable through search/filtering. Chapters are like posts, but they each can have a hero/banner image, title, and quote, and be part of a Book. The chapter content can be text or any of the supported Ghost media types (video, unsplash, Markdown, etc.)

Maybe something like this:
Ghost Admin Sidebar
+ Dashboard
+ Posts
+ Pages
+ Bookshelf ← NEW
+ Books ← NEW
+ Chapters ← NEW
+ Members
+ Settings

You can add a chapter to a book, then in the Book menu, drag and drop to reorder the chapter order, or split a long one into two without breaking next/previous/TOC links. For each chapter, you can designate some or part of the content as paid or member vs free. Each chapter would automatically generate a Next / Previous / Table of Contents and Bookshelf link. This would also require its own theme, but I already created one for the tag experiment. I do want to make sure the theme UI for each book is very customizable (fonts, colors, interactive widgets, etc) by the author.

The main Bookshelf page would show a list of available books, a featured one (or three), toggle between tile and list mode, and show the latest chapter posts. One key feature would be showing syndicated books from others with the book feature enabled, using the new social sharing mechanisms to help with reading discovery.

The recommendation list could be auto-generated or manually curated by the author. People can subscribe to an individual book to get serialized content delivered to them as each chapter comes out, or get a summary in an email newsletter with a link to read the whole thing. Standard Ghost stuff. Once there is an official supported mobile app, you may also get push notifications when new chapters are published. The author could choose to make some or part of a chapter or book free or only available to paid subscribers.

Bonus/feature creep:

  • One-click generate PDF, EPub, Mobi, or audiobook version of the whole book (or specific chapters).
  • Auto-translation into other languages.
  • Make an early draft of complete chapters available to a higher level of paid readers, then at some date (author-determined), make it available to others.
  • AI blocking/training protection.
  • Scheduled release. Queue up chapters and auto-release them on schedule. Go on vacation.
  • Reader-mode: font-size/theme, distraction-free, progress indicator, and bookmarks.
  • Auto-importer from writing apps like Scrivener projects.
  • bookwyrm.social / Goodreads integration
  • Gifting books to others.
  • These are ALL optional. Just spit-balling.

That’s the general idea.

To implement it, I started with the tag approach. That worked fine, but it didn’t let you do basic things like reorder chapters. What I wanted to try next was to have a Bookshelf, Books, and Chapter menu in the admin interface, and that’s where I hit a brick wall.

I started looking at ways to modify the admin interface. There’s code injection, but that only works for the actual user-facing page, not the admin interface. I’ve looked at Extensions, as well as the Admin API, but so far, can’t find a way to add the items to the Admin menu and have it automatically be loaded when restarting the server.

The closest I can get is to modify the raw source code, but I want to eventually migrate this all to the hosted version so I can use the payment/email/recommendations. Not sure if that’s doable. I also want to be able to package the whole thing as an extension/theme so others can one-click add it to their own distros. I really want it to be user-friendly without requiring too many installation steps or geeky know-how.

Any suggestions on best ways to go about doing this? Is this even doable in 6.0 and above?

My background is coding, but I’m new to the Ghost codebase. I also have a few test books to try this on: a 20-chapter deep-dive technical series on AI, ready to be published, and two fiction books on their second draft. I have several friends who have written material too, and want to be beta testers.

Happy to dive deep into the code if pointed at a good breadcrumb trail.

If not doable, I can either go back to adding features to the Jekyll version or fork Ghost, but the payment/membership stuff is part of the hosted service, and I’d rather not have to recreate all that good work. I’ve also looked at Wattpad, but it’s missing a lot of what I’ve listed above. Ghost feels like it’s 75% there, if I can figure out how to get the remainder working.

All I want is to write and publish. That’s why I’m here. :slight_smile:

Thanks!

1 Like

What you’re proposing is a significant effort and a fork (or perpetual patch every week when a new version comes out). Themes can’t change the admin panel, so you’d be talking about editing the ember app (the admin panel), the underlying data model, the API, etc etc. There are no custom data types. This is not a small undertaking. It’s really not at all consistent with your statement. :slight_smile:

If you decide you want to set up to publish books at the theme level, you can generally accomplish this with tags and some trickery. I’ve done it by manipulating the publication date (to get chapters in the right order), or by choosing the slugs strategically (bookname-ch-01, bookname-ch-02 etc). I’d make a page for each book (not post), and then have a tag corresponding to the book. Make each chapter as a post, and give it that tag. Then you just need a custom template (theme, not admin panel!) to pull the posts (in the desired order) onto the page. Add in some previous/next buttons and a toc (generated by listing the titles of the posts with your book’s tag), and you’re up and running for visitors. The features on your “bookshelf’ page could be done in handlebars, except the syndication.

Most of your bonus features could be done with integrations. It’s the admin panel and content type changes that are the hard part.

1 Like

Thank you for the tips!

I was hoping there would be the equivalent of Drupal’s custom entity mechanism. Also, sad that the Admin panel can’t be easily modified. Maybe things for the development backlog.

I’ve continued researching, and there appears to be an Admin API with which you can submit pages and posts. That means it may be possible to create a custom HTML page, which itself could be where you manage your bookshelf and/or individual books. Maybe it’s part of the custom theme. I don’t know enough yet if this is something doable or a total hack.

The chapter ordering/reordering may have to be hacked through dates or packed into some other field, then have the theme arrange it in the right order. I also feel like I should be researching Collections some more…

On creating a page to represent each book, that may well be the only way to organize all the chapters in one place. Would need a separate theme for those “book” pages vs. regular pages. Not sure if that’s supported.

Another thing I’m not sure about is if I do as you suggest and create a Page per book, whether readers can subscribe to individual books/pages, or you have to create a whole new site for each book.

Thank you for the ideas. Will look more into what can be put inside Pages vs Posts. If there are other alternative approaches, I’m all ears.

All I want is to write and publish

As much as I admire Scrivener, its origin story is that Keith Blount, the developer, wanted to write a novel, and he ended up creating a tool to write novels. That ended up becoming his life. I’m a developer by trade, and what I meant when I said I only want to write and publish is that I’d rather avoid falling into the same trap as Keith :grin:

1 Like