mirror of https://github.com/MISP/misp-book
- Added notes on macOS
- Added notes on what to do if npm fails - Put npm install packages in 1 line (better results in my setup)pull/100/head
parent
547214fb43
commit
35d5204b76
66
USAGE
66
USAGE
|
@ -2,27 +2,71 @@
|
|||
Install notes
|
||||
=============
|
||||
|
||||
~~~
|
||||
npm install gitbook
|
||||
:warning:
|
||||
Make sure to be in the *misp-book* repository directory for the npm magic.
|
||||
|
||||
```
|
||||
npm install gitbook gitbook-plugin-autocover gitbook-plugin-github gitbook-plugin-toc gitbook-plugin-anchors
|
||||
sudo npm install gitbook-cli -g
|
||||
npm install gitbook-plugin-autocover
|
||||
npm install gitbook-plugin-github
|
||||
npm install gitbook-plugin-toc
|
||||
npm install gitbook-plugin-anchors
|
||||
gitbook install
|
||||
~~~
|
||||
```
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
If you want to generate the PDF output (you need to have Calibre installed):
|
||||
|
||||
~~~
|
||||
```
|
||||
gitbook pdf
|
||||
~~~
|
||||
```
|
||||
|
||||
on macOS (ebook-convert is not in path):
|
||||
|
||||
```
|
||||
PATH=$PATH:/Applications/calibre.app/Contents/MacOS/ ; gitbook pdf
|
||||
```
|
||||
|
||||
and if you want to want to serve the HTML pages on 127.0.0.1:4000:
|
||||
|
||||
~~~
|
||||
```
|
||||
gitbook serve
|
||||
~~~
|
||||
```
|
||||
|
||||
macOS Notes
|
||||
===========
|
||||
|
||||
canvas needs to be compiled and needs the following dependencies:
|
||||
|
||||
```
|
||||
xcode-select --install
|
||||
# If you have homebrew not installed yet:
|
||||
## /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
# For the more adventureous you can install a cask of calibre which gives you access to *ebook-convert*
|
||||
## brew cask install calibre
|
||||
brew install pkg-config cairo pango libpng jpeg giflib
|
||||
```
|
||||
|
||||
:warning:
|
||||
Make sure to be in the *misp-book* repository directory for the npm magic.
|
||||
|
||||
Installing gitbook and all dependencies wants to look like this (Tested on macOS 11.13.3):
|
||||
|
||||
```
|
||||
npm install gitbook git+https://github.com/SteveClement/plugin-autocover.git gitbook-plugin-github gitbook-plugin-toc gitbook-plugin-anchors
|
||||
npm install gitbook-cli -g
|
||||
gitbook install
|
||||
```
|
||||
|
||||
npm salvage
|
||||
===========
|
||||
|
||||
In case something with npm breaks, this brings you back to a sane default.
|
||||
We still assume we are in the *misp-book* repository working directory.
|
||||
|
||||
```
|
||||
rm -rf node_modules
|
||||
rm package-lock.json
|
||||
rm -rf ~/.gitbook
|
||||
sudo rm -rf /usr/local/lib/node_modules/gitbook-cli
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue