With our sprint previews, idea board, and various other initiatives, we’re increasing our efforts to foster and engage the Pressbooks Open Source community 1. As part of this process, we have decided to set up an Open Collective account for the Pressbooks Open Source project so that our Open Source users can, if they wish to, contribute financially to the ongoing development of Pressbooks. While we are very proud of our PressbooksEDU enterprise hosting service (and it remains the best way to provide stable, ongoing financial support to the project), we recognize that this isn’t the right option for many users, and that those who still rely on Pressbooks may want a different way to contribute. If that’s you, please consider backing us on Open Collective, with either a one-time donation or a small monthly contribution. Either way, even if you’re not in a position to contribute, we’re glad to have you in our Open Source community!
We’ve released updates to DocRaptor for Pressbooks, Excalibur and Pressbooks Stats to indicate their compatibility with Pressbooks 5.0.2 and standardize our plugin license to GPL v3 or later. You can view the full changelogs on our documentation site:
Last summer, WooCommerce introduced a new feature in version 3.2 of their core plugin: compatibility alerts for installed add-on plugins when new versions of WooCommerce became available. By adding a line to the plugin headers of a WooCommerce add-on, developers could let users know the most recent version of WooCommerce with which they’d tested their plugin.
We really liked this idea, so Dac built a similar feature into Pressbooks 5. Now, when future updates to Pressbooks show up on the plugins page of a Pressbooks, users will see whether or not their Pressbooks-specific add-ons have been tested with the latest version:
If you develop plugins that extend Pressbooks functionality (we check for
pressbooks in the plugin slug, name, and description), you can add
Pressbooks tested up to: 5.0.0 (or whatever version string is relevant) to your plugin headers, and Pressbooks will reflect your plugin’s compatibility in the update notice. We hope this feature will give network administrators a better understanding at a glance of whether they can safely update to the latest version of Pressbooks. Of course, we still encourage thorough testing in a development or staging environment before installing a major update.
A quick note from the dev team: we are working to improve our GitHub issue management. With this in mind, we’re closing stale issues which have not seen any activity in the last 60 days. This does not mean that they will not be revisited — many of them are on our roadmap, in fact! We just want to reflect what we are actually working on.
Pressbooks 5 will introduce some significant changes to the ways we store and retrieve data within the book, a new export module, modifications to two existing export modules, and some changes to the filesystem for user generated content. This post outlines these key changes and the migration paths that we’ve built in to facilitate the upgrade to Pressbooks 5.
In Pressbooks 4.x and earlier, the visibility of content across different media is controlled by a combination of custom post metadata and core post status. For front matter, back matter and chapters, the
pb_export post meta value determines whether or not they appear in exports, while their post status (
publish) determines their visibility in the webbook.
In an effort to better conform to WordPress best practices and streamline the user experience, we’re using the post status as the source of truth for whether front matter, chapters, and back matter appear in web, exports, or both. We’ve added a new
web-only post status, and content visibility will now be determined as follows:
|Post Status||Web + REST API||Exports|
In terms of the user interface, we’re changing this:
Note that we’re changing the primary action button from "Publish" for new content and "Update" for existing content to "Create" and "Save", respectively.
Your front matter, back matter and chapters will be automatically updated when you visit your book after updating to Pressbooks 5.
Pressbooks 4.x lets you add a single author and multiple contributing authors, editors, and translators in your Book Information and lets you add a single author for each front matter, back matter, or chapter. Pressbooks 5 imports all your existing authors (and Pressbooks users who are assigned to your book) and creates entries in a new
contributor taxonomy. Then, it repopulates new relevant metadata fields with a list of contributors that match your book’s existing contributors. For example, if you have an author named Alice X and two editors named Bob Y and Eve Z, your Book Information will contain the following in Pressbooks 4.x:
In Pressbooks 5, your Book Information will contain the following:
The values saved in Book Information are the slugs of entries in the
contributor taxonomy. Also, for backwards-compatibility, the new field names are pluralized so that any third-party code that looks for the old fields will still be able to retrieve them for the time being.
You’ll be able to edit the display names of these contributors in one place — the new Contributors page, which is a standard WordPress taxonomy management page — and you’ll be able to quickly and easily select from your list of contributors to add assign authors throughout your book (if you have a book that consists of chapters with different authors, and you also want to include credits for all the authors in your Book Information, this will make maintaining that information much easier). In future releases of Pressbooks, we will be able to add metadata to contributors, including profile pictures, author websites, and more, for display on your webbook cover page or individual front matter, back matter, and chapters.
The migration of your book’s contributor data will happen automatically when you visit your book after updating to Pressbooks 5.
In the same way that we’re moving contributor data to a
contributor taxonomy, we’re moving the available licenses into a new
license taxonomy. That way, if you need to add a custom license for your book, it will immediately be available in all chapters, front matter, and back matter as well as your Book Information. This migration will happen automatically when you visit your book after updating.
In Pressbooks 5, we’ve introduced a new HTMLBook export module as a proof of concept. We’re excited about the potential of adopting and advancing this proposed standard for the semantic representation of books on the web, and we will be actively developing our export module in the months to come. We’re also working with the creators of HTMLBook to expand and improve the standard (to begin with, we’re proposing the addition of new front matter and back matter types and of new block elements, including educational textboxes).
At this time, our HTMLBook exporter is not production-ready, but we will be using it as a testbed to refine our best practices for coding export modules in Pressbooks.
XHTML and EPUB Markup Changes
We’re making a change to the way we mark up our XHTML and EPUB exports, but only for themes that use our SCSS component library, Buckram. In Pressbooks 4.x, chapter subtitle and author elements are not wrapped in the same container as the chapter number and title:
<div class="chapter standard" id="chapter-1"> <div class="chapter-title-wrap"> <h3 class="chapter-number">1</h3> <h2 class="chapter-title">Loomings</h2> </div> <div class="ugc chapter-ugc"> <h2 class="chapter-author">Herman Melville</h2> <h2 class="chapter-subtitle">The First Chapter</h2> <p>Call me Ishmael.</p> </div> </div>
This makes it very difficult to reliably style the first page of front matter, back matter, and chapters.
In Pressbooks 5, books that use Buckram-based themes will now have the following markup:
<div class="chapter standard" id="chapter-1"> <div class="chapter-title-wrap"> <h3 class="chapter-number">1</h3> <h2 class="chapter-title">Loomings</h2> <h2 class="chapter-author">Herman Melville</h2> <h2 class="chapter-subtitle">The First Chapter</h2> </div> <div class="ugc chapter-ugc"> <p>Call me Ishmael.</p> </div> </div>
This change will only impact themes using Buckram, which include our open source Clarke theme and the premium Asimov theme (the latter only available to Pressbooks EDU or Pressbooks.com users). We are thoroughly testing these Buckram-based themes to ensure that this change does not affect existing books. If you have built a theme using Buckram, we suggest you test your theme as well once this issue has been closed.
In Pressbooks 4.x, all export files, (S)CSS and other user-generated files are stored in subfolders of your book’s uploads directory. We’re moving them all into a pressbooks folder to prevent conflicts between our files and any other files that plugins may generate. This will happen without the need for any intervention on your part.
We’re looking for a junior front-end web designer/developer for a 2 month contract (in Montreal) that could lead into a full-time job with for Pressbooks, an open source web-based book publishing platform.
Ideally, you’ve worked with WordPress, know your way around CSS and SASS, and have a particular interest in books, reading, & writing. We hope you’ve got some good design sense, and think designing real print and web books using HTML & CSS sounds pretty cool. We are a small, diverse team, and you’ll be working closely with the product manager, dev team, and marketing and comms team. We have one of the best views of Montreal, from our 12th floor windows in Mile End, Montreal.
- Experience: 2yrs of WordPress, CSS + HTML (SASS a bonus)
- Rate: ask us!
- Make it happen: send us an email with some info about yourself here: firstname.lastname@example.org