diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-19 12:51:20 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-19 13:34:10 +0100 |
| commit | a4b77758f0e1b6b409e874e739fe7cf4609651ee (patch) | |
| tree | b9e698e7299b8535895c15e0b104718b2b2513aa /mk/docs.mk | |
| parent | d699db699a07d5bb80d5d08508540b0aba6e1026 (diff) | |
Move tutorial over to a format similar to the reference doc
And adjust highlighting/testing scripts to deal with this.
Diffstat (limited to 'mk/docs.mk')
| -rw-r--r-- | mk/docs.mk | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/mk/docs.mk b/mk/docs.mk index e22500f1a56..e565863f107 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -12,7 +12,7 @@ ifeq ($(CFG_PANDOC),) $(info cfg: no pandoc found, omitting doc/rust.pdf) else -DOCS += doc/rust.html +DOCS += doc/rust.html doc/rust.css doc/rust.html: rust.md doc/version.md doc/keywords.md @$(call E, pandoc: $@) $(Q)$(CFG_PANDOC) \ @@ -57,6 +57,26 @@ doc/rust.pdf: doc/rust.tex endif endif endif + +###################################################################### +# Node (tutorial related) +###################################################################### + ifeq ($(CFG_NODE),) + $(info cfg: no node found, omitting doc/tutorial.html) + else + +DOCS += doc/tutorial.html +doc/tutorial.html: $(S)doc/tutorial.md + @$(call E, cp: $(S)doc/rust.css) + -$(Q)cp -a $(S)doc/rust.css doc/ 2> /dev/null + @$(call E, pandoc: $@) + $(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \ + $(CFG_PANDOC) --standalone --toc \ + --section-divs --number-sections \ + --from=markdown --to=html --css=rust.css \ + --output=$@ + + endif endif @@ -80,25 +100,6 @@ endif ###################################################################### -# Node (tutorial related) -###################################################################### -ifeq ($(CFG_NODE),) - $(info cfg: no node found, omitting doc/tutorial/web) -else - -DOCS += doc/tutorial/web/index.html -doc/tutorial/web/index.html: \ - $(wildcard $(S)doc/tutorial/*.md) - @$(call E, cp: $(S)doc/tutorial) - -$(Q)cp -a $(S)doc/tutorial doc/ 2> /dev/null - @$(call E, node: build.js) - $(Q)cd doc/tutorial && $(CFG_NODE) build.js - -endif - - - -###################################################################### # Naturaldocs (library reference related) ###################################################################### |
