Add A Manuscript
So, the framework is downloaded, and you are able to open the development pages. Great! The next step is to get your own content onto the web pages. Follow the next set of steps to make the website your own.
-
Customize the homepage. Homepage text and images are defined in
openbook.config.js. Open that file and find theHomepagesection. The title, tagline, call-to-action, and features list can be customized. -
Add image files to the website. Image files, such as used on the homepage, should be placed in
static/imgfolder. Copy and paste any images to that folder, and reference them inopenbook.config.jsusing the just the filename. -
Add the manuscript. Delete any existing, unwanted files from the
docsfolder. Place your own manuscript files in thedocsfolder. OpenBook currently supports HTML (.html) and Markdown (.md) pages.
FAQ: Ordering of Pages There are two options for ensuring page order: Frontmatter and Filename ordering. Frontmatter is the recommended strategy.
Pages can be ordered using explicitly defined frontmatter. Refer to existing examples for an view of using frontmatter. There must be a leading ---, a sidebar_position attribute and value, and an ending ---.
Alternatively, pages can be ordered using a numbering system at the beginning of the filenames. For example, 01-chapter1.md, 02-chapter2.md, 03-chapter3.md, etc. To ensure intended order, it's important that the amount of ordering digits be the same for every page. Use 0 to indicate leading placeholders.
As a further example, ordering 100 pages would require three digits. 001-chapter1.md, 002-chapter2.md, ... 099-chapter99.md, 100-chapter100.md.
- Section the pages (optional) The OpenBook sidebar element comes with an expand/collapse navigation element which may help to group like-thoughts, or book sections. For example, a book which catalogs prominent events of the 21st century may be sectioned by decade,
2000s,2010s,2020s, etc. This is accomplished by making a folder indocsdirectory, and placing relevent files into the folder. OpenBook will organize the sidebar from there.