summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-09-05 12:14:37 +0200
committerSamy Pessé <samypesse@gmail.com>2016-09-05 12:14:37 +0200
commit839904a70419aaef1006be820ec092d978236a20 (patch)
treed810c7880c8b26fc052ccf672bf3477e1722edae /packages
parent0e74c9bad5b184528880d499485e1154c000b1b5 (diff)
downloadgitbook-839904a70419aaef1006be820ec092d978236a20.zip
gitbook-839904a70419aaef1006be820ec092d978236a20.tar.gz
gitbook-839904a70419aaef1006be820ec092d978236a20.tar.bz2
Start architecturing new default theme
Diffstat (limited to 'packages')
-rw-r--r--packages/gitbook-core/src/components/Application.js10
-rw-r--r--packages/gitbook-plugin-theme-default/package.json64
-rw-r--r--packages/gitbook-plugin-theme-default/src/index.js16
-rw-r--r--packages/gitbook/package.json1
4 files changed, 91 insertions, 0 deletions
diff --git a/packages/gitbook-core/src/components/Application.js b/packages/gitbook-core/src/components/Application.js
new file mode 100644
index 0000000..3414a37
--- /dev/null
+++ b/packages/gitbook-core/src/components/Application.js
@@ -0,0 +1,10 @@
+const React = require('react');
+const { InjectedComponent } = require('./components/InjectedComponent');
+
+const Application = React.createClass({
+ render() {
+ return <InjectedComponent matching={{ role: 'Body' }} />
+ }
+});
+
+module.exports = Application;
diff --git a/packages/gitbook-plugin-theme-default/package.json b/packages/gitbook-plugin-theme-default/package.json
new file mode 100644
index 0000000..cbf1516
--- /dev/null
+++ b/packages/gitbook-plugin-theme-default/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "gitbook-plugin-theme-default",
+ "description": "Default theme for GitBook",
+ "main": "./index.js",
+ "version": "1.0.5",
+ "engines": {
+ "gitbook": ">=3.0.0"
+ },
+ "dependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/GitbookIO/gitbook.git"
+ },
+ "author": "GitBook Inc. <contact@gitbook.com>",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/GitbookIO/gitbook/issues"
+ },
+ "contributors": [
+ {
+ "name": "Samy Pessé",
+ "email": "samy@gitbook.com"
+ }
+ ],
+ "gitbook": {
+ "properties": {
+ "styles": {
+ "type": "object",
+ "title": "Custom Stylesheets",
+ "properties": {
+ "website": {
+ "title": "Stylesheet for website output",
+ "default": "styles/website.css"
+ },
+ "pdf": {
+ "title": "Stylesheet for PDF output",
+ "default": "styles/pdf.css"
+ },
+ "epub": {
+ "title": "Stylesheet for ePub output",
+ "default": "styles/epub.css"
+ },
+ "mobi": {
+ "title": "Stylesheet for Mobi output",
+ "default": "styles/mobi.css"
+ },
+ "ebook": {
+ "title": "Stylesheet for ebook outputs (PDF, ePub, Mobi)",
+ "default": "styles/ebook.css"
+ },
+ "print": {
+ "title": "Stylesheet to replace default ebook css",
+ "default": "styles/print.css"
+ }
+ }
+ },
+ "showLevel": {
+ "type": "boolean",
+ "title": "Show level indicator in TOC",
+ "default": false
+ }
+ }
+ }
+}
diff --git a/packages/gitbook-plugin-theme-default/src/index.js b/packages/gitbook-plugin-theme-default/src/index.js
new file mode 100644
index 0000000..8c47b38
--- /dev/null
+++ b/packages/gitbook-plugin-theme-default/src/index.js
@@ -0,0 +1,16 @@
+const React = require('react');
+const GitBook = require('gitbook-core');
+
+const ThemeBody = React.createClass({
+ render() {
+ return (
+ <div>
+ My Base theme for gitbook
+ </div>
+ );
+ }
+});
+
+module.exports = GitBook.createPlugin((dispatch, state) => {
+ dispatch(GitBook.registerComponent(ThemeBody, { role: 'Body' }));
+});
diff --git a/packages/gitbook/package.json b/packages/gitbook/package.json
index b3f5f15..7b36ae5 100644
--- a/packages/gitbook/package.json
+++ b/packages/gitbook/package.json
@@ -22,6 +22,7 @@
"fresh-require": "1.0.3",
"front-matter": "^2.1.0",
"gitbook-asciidoc": "1.2.2",
+ "gitbook-core": "*",
"gitbook-markdown": "2.0.1",
"gitbook-plugin-fontsettings": "2.0.0",
"gitbook-plugin-highlight": "2.0.2",