-
Notifications
You must be signed in to change notification settings - Fork 1
Configuring the build
The build configuration is set in the config.yml
file in the project's root directory. Additionally, build-specific configuration files can be added to the project root to override specific settings if needed.
Supported options are outlined below.
Current build environment.
development
Name of the current theme. Must map to a name of a directory in the themes
directory.
b-ber-theme-serif
Name of the source directory.
_project
Prefix for the name of the build directory. When building an EPUB, the output directory name will be project-epub
.
project
The ibooks:specified-fonts
option in the content.opf
. Set this to true
if you're including custom fonts.
false
Defines the themes directory for user-made themes.
./themes
Defines the autoprefixer options to be used when parsing SCSS. See here for details.
browsers:
- 'last 2 versions'
- '> 2%'
flexbox: no-2009
Ignores files or folders. This is useful when used with build-specific configuration files for omitting unneeded assets.
[]
URL to map assets to during the web
build.
/
Path that will be appended to the URL for the reader
build.
/
URL where the project is hosted for the reader
build.
http://localhost:4000/
URL where the remote reader
build is located.
http://localhost:4000/project-reader
S3 bucket URL where the remote project is located. Used during the deploy
task.
null
Injects a robots
meta tag into the XHTML head
elements during build with follow/
nofollowand
index/
noindex`.
false
Download types to be linked to in the reader interface
['epub', 'mobi', 'pdf']
Custom build specific configuration settings. Accepts all properties of the main configuration file.
null
Remotely hosted JavaScripts. URLs added here will be injected into the HTML before the closing body
tag.
null
Remotely hosted stylesheets. URLs added here will be injected into the HTML's head
element.
null
Defines UI display settings for header
and footer
navigation icons in the reader
build. Object labels accept ##boolean values.
navigation:
header_icons:
home: true
toc : true
downloads : true
info: true
footer_icons:
page : true
chapter : true
A sample configuration file is below that can be used as a template:
# ------------------------------------------------------------------------------
# Build Settings
# ------------------------------------------------------------------------------
# Minify and uglify scripts and stylesheets for production
env: development
# ------------------------------------------------------------------------------
# File System Settings
# ------------------------------------------------------------------------------
# Location of the source directory which contains all project assets
src: _project
# Output directory for the compiled project
dist: project
# Ignored files or folders
ignore:
- _project/_fonts/
- _project/_images/my-image.jpg
# Remotly hosted assets to be injected into builds
remote_javascripts:
- https://my-analytics.js
remote_stylesheets:
- https://my-remote-styles-1.css
- https://my-remote-styles-2.css
# ------------------------------------------------------------------------------
# Display Settings
# ------------------------------------------------------------------------------
# Selected theme name. Show installed themes by running `bber theme list`
theme: serif
# Directory where user themes are stored
themes_directory: ./themes
# iBooks setting for enabling third-party fonts
ibooks_specified_fonts: false
# Autoprefixer. See complete list of options here: https://github.com/postcss/autoprefixer#options
autoprefixer_options:
browsers:
- 'last 2 versions'
- '> 2%'
flexbox: no-2009
# Show or hide various UI buttons for the reader build
ui_options:
navigation:
header_icons:
home: true
toc : true
downloads : true
info: true
footer_icons:
page : true
chapter : true
# ------------------------------------------------------------------------------
# Deployment Settings
# ------------------------------------------------------------------------------
# Add a no-follow tag to the web build for private projects.
private: false
# Location of assets for the web build. This is necessary since the web build is
# a static website, and requires correct remote path names to load assets.
base_url: /demos/my-project
# Path that will be prepended to the URL when rendering the reader. This is
# useful for creating logical URL structures in an existing application, e.g.,
# on a website hosting projects, the `base_path` could be changed to `/project` so
# that all reader projects are served at `/project/my-project`.
base_path: /demos/my-project
# Location of the remotely hosted project.
remote_url: https://s3.amazonaws.com/my-bucket/my-object
# Location of the reader directory in the remotely hosted project.
reader_url: https://s3.amazonaws.com/my-bucket/my-object/project-reader
# Location of the S3 bucket where a build is hosted. This is used during the `bber deploy`.
bucket_url: s3://my-bucket/my-object
remote_url: https://example.com/
# URLs for remote downloads. These are available to download in the web and reader interfaces
builds:
-
url: https://s3.amazonaws.com/my-bucket/my-object/my-project.epub
label: My Project (EPUB Version)
-
url: https://s3.amazonaws.com/my-bucket/my-object/my-project.pdf
label: My Project (PDF Version)
- 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