主题
Themes can be use to customize your book homepage using preddefined or custom HTML template. A list of all published themes can be found at www.gitbook.io/themes.
格式
GitBook主题使用SWIG 语法.
图书主页变量
变量 |
类型 |
描述 |
book |
<book> |
Book to display |
图书表征
变量 |
类型 |
描述 |
id |
string |
Complete id of the book (ex: Username/Test ) |
name |
string |
Name of the book |
title |
string |
Title of the book |
description |
string |
Description of the book |
public |
boolean |
False if the book is private |
price |
number |
Price of the book (0 equals free) |
githubId |
string |
ID of the book on GitHub (ex: Username/Test ) |
categories |
array[string] |
List of tags associated with this book |
author |
<user> |
User you created the book |
collaborators |
array[<user>] |
Array of collaborators to the book (excluding the author) |
cover.small |
string |
Url of the cover (size small) |
cover.large |
string |
Url of the cover (size large) |
urls.access |
string |
Url to access the book homepage |
urls.homepage |
string |
Url of the homepage (using custom domain) |
urls.read |
string |
Url to read the book |
urls.reviews |
string |
Url to the reviews page |
urls.subscribe |
string |
Url to submit email subscriptions |
urls.download.epub |
string |
Url download ebook (as EPUB) |
urls.download.mobi |
string |
Url download ebook (as Mobi) |
urls.download.pdf |
string |
Url download ebook (as PDF) |
用户表征
变量 |
类型 |
描述 |
username |
string |
Username of the user |
name |
string |
Name of the user |
urls.profile |
string |
Url to access the profile homepage |
urls.avatar |
string |
Url to the avatar |
accounts.twitter |
string |
Username on Twitter (if linked) |
accounts.github |
string |
Username on GitHub (if linked) |