gitbookio / gitbook Goto Github PK
View Code? Open in Web Editor NEWThe open source frontend for GitBook doc sites
Home Page: https://www.gitbook.com
License: GNU General Public License v3.0
The open source frontend for GitBook doc sites
Home Page: https://www.gitbook.com
License: GNU General Public License v3.0
Identical functionality to Jekyll's 'watch' directive. I want to live edit files, refresh my browser and see the changes reflected on the page.
Following the installation instructions exactly I am able to run gitbook serve and see the first page of the gitbook for Javascript (for example) but selecting a link on the sidebar throws a file not found error (there is no html file created in any of the subdirectories as part of the build). When I convert the README.md file in a subdirectory and navigate to it in the sidebar I get a very plain HTML page without the gitbook styling, sidebar, etc.
Is there an obvious solution to this or should I start troubleshooting?
Great work BTW! Works beautifully on my mac.
Hello!
It would be GREAT to add support of the Google Fonts. This feature is especially actual for the books written in the non-English languages.
Hi, I am trying to reinstall gitbook on a fresh ubuntu 12.04 and I get this:
npm http GET https://registry.npmjs.org/gitbook
npm ERR! Error: failed to fetch from registry: gitbook
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest. (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! http://bugs.debian.org/npm
npm ERR! or use
npm ERR! reportbug --attach /opt/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-58-generic
npm ERR! command "node" "/usr/bin/npm" "install" "gitbook" "-g"
npm ERR! cwd /opt
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: gitbook
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/npm-debug.log
npm not ok
strange...
http://cl.ly/image/0P0M3W263j3W
Please let me know if you would be interested in incorporating these features. If yes the I will create the PR.
Ever thought about adding the possibility to create a real aka. ebook reader capable book (.mobi or .epub) in addition to the html book? Maybe it coud integrate this grunt task: https://github.com/mccormicka/md-book
will there be a choice to choose different template?
There is something wrong with your fonts.
I'm sorry for the bad bug report... I spend most of my time in a terminal. I don't know anything about fonts.
But I took pictures!
From http://www.gitbook.io/ :
From one of the example books:
I'm using Firefox 28.0 on Windows 7.
Here is some information provided by Firefox Inspector about the font.
I will gather more information if you tell me how.
Hi,
When I use the gitbook serve
command in the JavaScript example directory, I receive the following error:
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
C:\Users\psgs\Documents\GitHub\javascript [master]> gitbook serve
Starting build ...
{ [Error: EPERM, symlink 'C:\Users\psgs\Documents\GitHub\javascript\_book\RE
ADME.html']
errno: 50,
code: 'EPERM',
path: 'C:\\Users\\psgs\\Documents\\GitHub\\javascript\\_book\\README.html'
}
C:\Users\psgs\Documents\GitHub\javascript [master]>
The directory i'm executing gitbook serve
in is a fork of the JavaScript GitBook example. I currently haven't edited the example. Would this error be due to an argument i'm missing or perhaps that i'm not using Grunt to execute the serve task?
Thanks,
psgs
Right now our code execution system is pretty limited/primitive.
Here's what we are missing :
JavaScript
@SamyPesse and I will discuss this over the next few days on how to overcome those limitation with a simple solution.
If you have any ideas or feedback on this matter, they are more than welcome !
When generating a single page or a PDF, relative links for images stays relative and the image are correctly shown.
It should convert all link to absolute path.
Allow users to navigate with the left/ right arrow keys.
Hey,
Cool project! Think I might use this to cover some tutorials.
I just noticed viewing on mobile that if the page has an exercise block that it must be overflowing out of the responsive container as you can horizontally scroll a little. It's just a little thing, but it tends to annoy me a little.
EDIT:: I opened up the laptop quick to take a look resizing the viewport etc. but you are using a fixed layout which then breaks at lower size viewports. This could be an issue for some users that say are looking at a book written in gitbook but have multiple windows open and only have one screen available. For example, imagine you get to a certain point in the book where there is some section that you just want to have open side by side with your IDE but you want your IDE to take up most of the screen real estate. Reducing a page showing gitbook to a smaller viewport breaks the layout and renders the book unusable unless they make the viewport bigger and compromise the IDE real estate. Of course, this is just my two cents but it's certainly a nice to have being able to use gitbook with any viewport size on any device.
I think that it would be really cool to support MathJAX for writing math formulas.
Join sections that have been incorrectly split add remerge them with an hr
node.
Seems the parser is not strong enough, it will offen broke down
It would be good if gitbook supported extensions without having to fork the main application source.
For example:
ready
functionThese could probably be automatically added in by loading a package.json
file and processing the contents?
Loading the main body of the page with AJAX instead of loading the entire page again would very much add to the experience.
This would make going to other pages smoother and adding a slide transition effect would not go amiss.
Hi,
Is it currently possible to define "globals" for the examples/exercises?
E.g. if I would like to teach someone how to use a library, can I write a library skeleton and load it so that a user could interact with it? The "skeleton" would then return true/false when certain methods are called would allow me to assert whether something has been called correctly.
The navigation fills the entire screen on screens < 600px. This is fine, but the problem is that it's toggled open by default, meaning if I load a gitbook link on a mobile device, the nav is all I'm going to see until I figure out that I have to click the "toggle" button to show the actual page contents.
I am getting the following error when I run gitbook build
. Any pointers?
Starting build ...
TypeError: Cannot call method 'split' of null
at /usr/local/lib/node_modules/gitbook/bin/gitbook.js:43:28
at _fulfilled (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/gitbook/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/gitbook/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
Hi.
first of all thank you guys for such an awesome project.
i have following issue with that(i run v0.1.0):
after i build a "_book", the index.html sym link looks like that:
index.html -> _book/README.html
though it should do it without looking in _book subdirectory, it is already there.
with best regards, seva
Hi, I tried to generate a pdf or a single html page. I get the following error:
$ gitbook build ./runseb.github.io/ -f page
Starting build ...
TypeError: Cannot read property '0' of null
at GitBookRenderer.link (/Users/sebastiengoasguen/Documents/node_modules/gitbook/lib/parse/renderer.js:48:39)
at InlineLexer.outputLink (/Users/sebastiengoasguen/Documents/node_modules/gitbook/node_modules/marked/lib/marked.js:703:21)
at InlineLexer.output (/Users/sebastiengoasguen/Documents/node_modules/gitbook/node_modules/marked/lib/marked.js:618:19)
at Parser.tok (/Users/sebastiengoasguen/Documents/node_modules/gitbook/node_modules/marked/lib/marked.js:1064:50)
at Parser.parse (/Users/sebastiengoasguen/Documents/node_modules/gitbook/node_modules/marked/lib/marked.js:924:17)
at Function.Parser.parse as parser
at render (/Users/sebastiengoasguen/Documents/node_modules/gitbook/lib/parse/page.js:36:19)
at /Users/sebastiengoasguen/Documents/node_modules/gitbook/lib/parse/page.js:83:22
at Array.map (native)
at Object.parsePage as page
Might be me not installing the node packages properly, but I tried several ways...
thanks for looking into it,
-sebastien
Currently, introducing an ---
anywhere else in the markdown breaks the build process. Two ways to handle this. Either introduce a unique marker to recognize an exercise block or recognize only the last ---
block as exercise block.
In order to use this beyond tutorial/walkthrough use-cases, we need the ability to search the contents of a gitbook. Having an optional searchbox in the navbar would make this a near complete tool for generating documentation sites.
If not that should be added; otherwise it should be documented.
I'd like to have several static pages in the sidebar that aren't linked to the progession of the book. For example: instructions for how to set up a lab, third-party resources to look through, a syllabus, a showcase of work built with the course, etc. None of these pages need the breadcrumbs at the top or green checkmarks next to them.
As suggested on HN, export to epub would be incredible.
I'm trying gitbook out to make a little getting started book for gulp.js
I noticed that code exercises can have test code, but how would I check if the user makes the right gulp calls? Wouldn't I need to define some kind of mock gulp object before the user's code runs? Is this already possibly currently, or is this something that would need to be added?
Currently the SUMMARY.md file appears to be indexed only 2 levels deep, making it impossible to create a menu that would contain higher organisations.
ie.
etc.
Images are currently not copied when generating using single page format.
In site mode, as the layout of the book ultimately doesn't change, it would be good if once the site had loaded, proceeding through the pages just involved changing the main content pane, rather than reloading the entire window, which results in an annoying flicker, as well as incorrect animation on going backwards.
I've downloaded your example
then I use npm install gitbook -g
to install gitbook from npm
and then I use gitbook serve
, but I can only find *.md
files in folder _book\chapter-1
. No html file was created. So I got an error in http://localhost:4000/chapter-1/ARTICLE1.html
All these happened in Windows 7, where is my error?
I`d be very grateful for your help.
One simple improvement that comes to mind is remembering the state of the book summary panel after navigating a way to another chapter.
I think it may save much time if I don't have to create markdown files one by one manully.
Here is a format proposition for multi-language books:
repository/
LANGS.md
en/
README.md
SUMMARY.md
...
fr/
README.md
SUMMARY.md
...
Since gitbook can generate a book from a directory like en
or fr
, it can detect the LANGS.md file which should follow the format:
* [French](fr/)
* [English](en/)
And generates a book for each language in the _book
folder.
When used with serve command a --watch option (grunt) could permanently watch and rebuild the currently served book. Using that in yeoman scaffolded web projects and it works great.
At the moment, and apologies if I'm missing, but the build/server commands require me to use a Github repo which is fine. I was thinking, however, what if I have, say, customer sensitive documentation I want to build that is hosted on our local git servers? Am I able to use gitbook for that or is it only intended for Github use?
Add an option for building the book in a specific language and add default value for this option for multi-languages book.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.