使用 Pandoc 将你的书转换成网页和电子书

使用 Pandoc 将你的书转换成网页和电子书

Who should read this book {-}

Before creating a complex software system one needs to create a solid foundation. General Responsibility Assignment Software Principles (GRASP) are guidelines to assign responsibilities to software classes in object-oriented programming.

Placement of your HTML files

DOCS=docs

all: web

web: setup $(DEPENDENCIES)         @cp $(DOCS)/toc/index.html $(DOCS)

Creation and copy of stylesheet and images into

the assets folder. This is important to deploy the

website to Github Pages.

setup:         @mkdir -p $(DOCS)         @cp -r assets $(DOCS)

Creation of folder and index.html file on a

per-chapter basis

$(DEPENDENCIES):         @mkdir -p $(DOCS)/$@         @pandoc -s –toc web-metadata.yaml parts/$@.md
        -c /assets/pandoc.css -o $(DOCS)/$@/index.html

clean:         @rm -rf $(DOCS)

.PHONY: all clean web setup