BCcampus / pressbooks-openstax-import

[UNMAINTAINED] Pressbooks Plugin for OpenStax Textbook Import
GNU General Public License v3.0
5 stars 0 forks source link

Change headings from h3 to h1 #82

Open josieg opened 6 years ago

josieg commented 6 years ago

Description

Currently, headings are being pulled in at the heading level that OpenStax has them set at. In CNX, heading levels start at h2. It would be nice if, during import, headings were bumped up two levels so that the top level heading in a chapter was h1.

This would allow people to take advantage of h1-related features in Pressbooks (e.g., two-level TOC and collapsed headings) without having to go through and change all of the headings.

Preferred behaviour

It would be prefered if, when importing an OpenStax book, headings were changed to start at heading 1. That would mean H3 changing to H1, H4 changing to H2, etc.

Actual behaviour

Currently, headings import at the same level as they are set in the CNX platform, which used h3 as the first heading level for chapter content.

Steps to reproduce the problem

  1. Import an OpenStax book into Pressbooks.
  2. Look at the book in Pressbooks.
  3. See that top-level headings are the same level as they appear in the OpenStax CNX platform (Heading 3)

System Information