codepiano / gitbook Goto Github PK
View Code? Open in Web Editor NEWThis project forked from gitbookio/gitbook
停留在1.0,官方3.0稳定以后可能会尝试升级。添加中文检索的支持,以及一些其他小修改
License: Apache License 2.0
This project forked from gitbookio/gitbook
停留在1.0,官方3.0稳定以后可能会尝试升级。添加中文检索的支持,以及一些其他小修改
License: Apache License 2.0
增加插件gitbook-plugin-anchor-navigation
配置
{
"plugins": [
"baiduana",
"anchor-navigation",
]
}
执行gitbook install
安装依赖
再执行gitbook build
报错如下:
$ gitbook build
Starting build ...
Cannot read property 'children' of undefined
其他插件,如gitbook-plugin-tree
也有一些报错
Get /binary-mirror-config/latest from https://registry.npm.taobao.org error: ConnectionTimeoutError: Connect timeout for 5000ms, GET https://registry.npmjs.org/binary-mirror-config/latest -2 (connected: false, keepalive socket: false, agent status: {"createSocketCount":4,"closeSocketCount":4,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{},"requests":{}})
headers: {}
at Timeout._onTimeout (/root/node-v6.2.0-linux-x64/lib/node_modules/cnpm/node_modules/urllib/lib/urllib.js:701:15)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
Downloading 11948441dbc6c9b04863733b16d21eae to /root/node-v6.2.0-linux-x64/lib/node_modules/11948441dbc6c9b04863733b16d21eae_tmp
[undefined] install from git github:codepiano/gitbook, may be very slow, please keep patience
Copying /root/node-v6.2.0-linux-x64/lib/node_modules/11948441dbc6c9b04863733b16d21eae_tmp/.1.5.0@gitbook to /root/node-v6.2.0-linux-x64/lib/node_modules/gitbook
Installing gitbook's dependencies to /root/node-v6.2.0-linux-x64/lib/node_modules/gitbook/node_modules
[lunr@codepiano/lunr.js] install lunr from git github:codepiano/lunr.js, may be very slow, please keep patience
[email protected] installed at node_modules/.2.2.0@commander
[email protected] installed at node_modules/.0.2.1@kramed-text-renderer
[email protected] installed at node_modules/.3.0.2@graceful-fs
[email protected] installed at node_modules/.1.0.1@q
[email protected] installed at node_modules/.2.4.1@lodash
[email protected] installed at node_modules/.0.4.4@kramed
[email protected] installed at node_modules/.0.0.23@tmp
[email protected] installed at node_modules/.0.2.0@send
[email protected] installed at node_modules/.2.2.1@semver
[email protected] installed at node_modules/.0.0.2@gitbook-plugin
[email protected] installed at node_modules/.0.0.6@gitbook-plugin-mathjax
[email protected] installed at node_modules/.0.0.1@gitbook-plugin-livereload
[email protected] installed at node_modules/.0.6.3@resolve
gaze@~0.5.1 installed at node_modules/.0.5.2@gaze
[email protected] installed at node_modules/.0.0.7@fstream-ignore
[email protected] installed at node_modules/.0.0.5@tiny-lr-fork
[email protected] installed at node_modules/.1.0.0@gitbook-plugin-quizzes
[email protected] installed at node_modules/.1.3.2@swig
[email protected] installed at node_modules/[email protected]
[email protected] installed at node_modules/.1.0.0@gitbook-plugin-exercises
[email protected] installed at node_modules/.0.10.0@fs-extra
lunr@codepiano/lunr.js installed at node_modules/.0.7.1@lunr
[email protected] installed at node_modules/.0.1.1@npmi
execute post install scripts...
scripts.install [email protected] › [email protected] run "node-gyp rebuild"
make: Entering directory `/root/node-v6.2.0-linux-x64/lib/node_modules/gitbook/node_modules/.2.2.4@nodejieba/build'
CXX(target) Release/obj.target/nodejieba/lib/index.o
In file included from ../lib/utils.h:6,
from ../lib/nodejieba.h:4,
from ../lib/index.cpp:1:
../../.2.3.5@nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from /root/.node-gyp/6.2.0/include/node/node.h:42,
from ../lib/utils.h:4,
from ../lib/nodejieba.h:4,
from ../lib/index.cpp:1:
/root/.node-gyp/6.2.0/include/node/v8.h:341: error: expected unqualified-id before ‘using’
/root/.node-gyp/6.2.0/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/root/.node-gyp/6.2.0/include/node/v8.h:358: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/root/.node-gyp/6.2.0/include/node/v8.h:365: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/root/.node-gyp/6.2.0/include/node/v8.h:369: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/root/.node-gyp/6.2.0/include/node/v8.h:437: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: At global scope:
/root/.node-gyp/6.2.0/include/node/v8.h:477: error: expected unqualified-id before ‘using’
/root/.node-gyp/6.2.0/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/root/.node-gyp/6.2.0/include/node/v8.h:809: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/root/.node-gyp/6.2.0/include/node/v8.h:834: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/root/.node-gyp/6.2.0/include/node/v8.h:846: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: At global scope:
/root/.node-gyp/6.2.0/include/node/v8.h:871: error: expected unqualified-id before ‘using’
/root/.node-gyp/6.2.0/include/node/v8.h:1108: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h:1114: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/root/.node-gyp/6.2.0/include/node/v8.h:3246: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: At global scope:
/root/.node-gyp/6.2.0/include/node/v8.h:4463: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h:4479: error: ‘nullptr’ was not declared in this scope
/root/.node-gyp/6.2.0/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/root/.node-gyp/6.2.0/include/node/v8.h:7348: error: ‘nullptr’ was not declared in this scope
In file included from ../../.2.3.5@nan/nan.h:190,
from ../lib/utils.h:6,
from ../lib/nodejieba.h:4,
from ../lib/index.cpp:1:
../../.2.3.5@nan/nan_maybe_43_inl.h: At global scope:
../../.2.3.5@nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before ‘using’
../../.2.3.5@nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before ‘using’
../../.2.3.5@nan/nan_maybe_43_inl.h:19: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:24: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:31: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:36: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:41: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:46: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:51: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:59: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:64: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:69: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:76: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:83: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:91: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:98: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:108: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:114: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:118: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:125: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:130: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:135: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:139: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:145: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:150: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:156: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:162: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:168: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:174: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:180: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:186: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:194: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:201: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:205: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:209: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:213: error: expected initializer before ‘<’ token
../../.2.3.5@nan/nan_maybe_43_inl.h:217: error: expected initializer before ‘<’ token
../lib/index.cpp:24: error: expected ‘}’ at end of input
../../.2.3.5@nan/nan_callbacks_12_inl.h:167: warning: ‘void Nan::imp::FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:181: warning: ‘void Nan::imp::GetterCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:197: warning: ‘void Nan::imp::SetterCallbackWrapper(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:253: warning: ‘void Nan::imp::PropertyGetterCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:270: warning: ‘void Nan::imp::PropertySetterCallbackWrapper(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:290: warning: ‘void Nan::imp::PropertyEnumeratorCallbackWrapper(const v8::PropertyCallbackInfo<v8::Array>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:306: warning: ‘void Nan::imp::PropertyDeleterCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:323: warning: ‘void Nan::imp::PropertyQueryCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:428: warning: ‘void Nan::imp::IndexGetterCallbackWrapper(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:444: warning: ‘void Nan::imp::IndexSetterCallbackWrapper(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:464: warning: ‘void Nan::imp::IndexEnumeratorCallbackWrapper(const v8::PropertyCallbackInfo<v8::Array>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:480: warning: ‘void Nan::imp::IndexDeleterCallbackWrapper(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&)’ defined but not used
../../.2.3.5@nan/nan_callbacks_12_inl.h:496: warning: ‘void Nan::imp::IndexQueryCallbackWrapper(uint32_t, const v8::PropertyCallbackInfo<v8::Integer>&)’ defined but not used
make: *** [Release/obj.target/nodejieba/lib/index.o] Error 1
make: Leaving directory `/root/node-v6.2.0-linux-x64/lib/node_modules/gitbook/node_modules/.2.2.4@nodejieba/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/root/node-v6.2.0-linux-x64/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 2.6.32-431.el6.x86_64
gyp ERR! command "/root/node-v6.2.0-linux-x64/bin/node" "/root/node-v6.2.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node-v6.2.0-linux-x64/lib/node_modules/gitbook/node_modules/.2.2.4@nodejieba
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Error: post install error, please remove node_modules before retry!
Run "sh -c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (/root/node-v6.2.0-linux-x64/lib/node_modules/cnpm/node_modules/runscript/index.js:67:21)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
npminstall version: 2.13.2
npminstall args: /root/node-v6.2.0-linux-x64/bin/node /root/node-v6.2.0-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --china --userconfig=/root/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org -g codepiano/gitbook
另外想说一下,gitbook 3.0并没有很好的支持搜索这一块。它匹配的应该是从头开始的。
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.