Intro
This is the style guide for content created using Gitbooks.
Use the ALC GitBook Theme
Base styles and blocks are maintained under the ALC Gitbook Theme. If you are creating a new Gitbook and want to use the ALC theme you'll need to add it as a plugin to your book's book.json
file, like so:
{
"plugins": [
"theme-alc@git+https://github.com/AgileLearningCenters/alc-gitbook-theme.git"
]
}
More info about adding plugins can be found on the Gitbook toolchain > plugins section
Typography
The Gitbook typographic style follows the general ALC typography. This section will cover Gitbook specific styles and explain how to use them.
When editing Gitbooks you'll be using Markdown, learn more about how Gitbooks uses Markdown syntax
Blocks
The ALC Gitbook Theme provides you with a number of "block" which allow you to apply styling to the book without having to resort to writing HTML.
{% blockName %}
special stuff happens to this text...
{% endblockName %}
The {%
curly bracket and percent sign open the block, blockName
identifies what kind of block you want to use then %}
closes that "opening tag". Anything you write inside the block will be effected. To end the block just write the block's name with end
in front (no space).
Blocks can accept attributes, like so:
{% blockName "attribute 1", "attribute 2" %}
special stuff happens to this text...
{% endblockName %}
You can add as many attributes as you want (what happens to them depends on the block!). Just remember to "wrap" them in "
quotes and separate them with commas.
Let's look at some real examples from the ALC Theme.
Examples
Currently there is only one block called named 'aside'. You can make it do different things by changing it's attribute.
Aside
Here's an example of a default aside:
You can apply style to these asides using attributes, see below:
The call to action is a bigger bolder version of the aside, use sparingly.