-
Notifications
You must be signed in to change notification settings - Fork 1
Creating content
If b-ber has been installed globally, you can initiate your new project anywhere in your file system. Launch Terminal and navigate to where you would like your project to be stored. Then run:
$ bber new "my-project"
b-ber will create a "my-project" directory with some basic assets:
.gitignore
README.md
-
config.yml
containing the configuration that b-ber references during thebuild
process - The
_project
directory containing all of the source files for the new project, each of which is described below
A metadata.yml
file is created for each project after initializing a project with bber new. The metadata in this file is then embedded into each build. For more information, see Adding metadata.
The reading order is the sequence in which files are arranged when viewing a project. File names are included in the toc.yml
file in the desired reading order, and chapters can also be nested. The reading order can be set for all builds by updating the entries in the toc.yml
. For more information, see Changing the reading order.
This folder will contain all of the text of the project. When initiating a new b-ber project, it will generate three files:
Custom fonts for the new project are stored here.
Images for the project are stored here. b-ber does not support external image links, so all the project's images should be located here.
b-ber initiates new projects with a base application.js
that normalizes some behavior for e-readers. Additional JavaScript files can be added here or application.js
can be customized. b-ber does not guarantee in what order the JavaScripts will be injected into the XHTML files during the build. Refer to the Custom JavaScript page of the Wiki for more information.
b-ber includes a set of default styles via a theme.
When creating a new project, b-ber will copy over the active theme's _settings.scss
file to the _project/_stylesheets/<theme name>/
directory and create a blank _overrides.scss
in the same directory. This also occurs when a user switches themes on the command line using $ bber set <theme name>
.
The base styles (font-family, colors, etc.) can be set in _project/_stylesheets/_settings.scss
, and additional custom styles can be added to _project/_stylesheets/_overrides.scss
.
When b-ber compiles the SCSS during bber build
, the files will be included in the following order:
_project/_stylesheets/<theme name>/_settings.scss
- the selected theme's
application.scss
_project/_stylesheets/<theme name>/_overrides.scss
See the default b-ber-theme-serif
_settings.scss
and application.scss
for more detailed information.
For more information on custom styles, see Adding Custom Styles.
- Adding metadata
- Creating content
- Generating new content
- Authoring and editing content
- Reading order (Table of Contents)
- Configuring the build
- Adding a cover image
- All directives
- Text
- Media
- Misc