Skip to content

Commit

Permalink
Generate RST output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Markwell committed Feb 13, 2013
1 parent a0c90d9 commit 21e45ae
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile
Expand Up @@ -6,8 +6,9 @@ BUILD_DIR=_build
ASSETS_DIR=_assets ASSETS_DIR=_assets
MD_OUTPUT=documentation.md MD_OUTPUT=documentation.md
HTML_OUTPUT=index.html HTML_OUTPUT=index.html
RST_OUTPUT=index.rst


all: init md2html build all: init md2html md2rst build
@echo '-- The documentation has been successfully generated.' @echo '-- The documentation has been successfully generated.'


init: init:
Expand Down Expand Up @@ -44,11 +45,23 @@ md2html: concat preprocess
$(TEMP_DIR)/$(MD_OUTPUT) $(TEMP_DIR)/$(MD_OUTPUT)
@echo ' Done.' @echo ' Done.'


md2rst: concat preprocess
@echo -n '-- Converting the Markdown document to HTML...'
@$(PANDOC) --standalone \
-f markdown -t rst \
--toc \
--section-divs \
--title="The ooc language" \
-o $(TEMP_DIR)/$(RST_OUTPUT) \
$(TEMP_DIR)/$(MD_OUTPUT)
@echo ' Done.'

build: build:
@echo -n '-- Copying the required assets into the build folder...' @echo -n '-- Copying the required assets into the build folder...'
@cat $(TEMP_DIR)/highlight.css >> $(TEMP_DIR)/stylesheet.css @cat $(TEMP_DIR)/highlight.css >> $(TEMP_DIR)/stylesheet.css
@cp $(TEMP_DIR)/index.html $(BUILD_DIR)/ @cp $(TEMP_DIR)/index.html $(BUILD_DIR)/
@cp $(TEMP_DIR)/stylesheet.css $(BUILD_DIR)/ @cp $(TEMP_DIR)/stylesheet.css $(BUILD_DIR)/
@cp $(TEMP_DIR)/index.rst $(BUILD_DIR)/
@echo ' Done.' @echo ' Done.'


publish: publish:
Expand Down

0 comments on commit 21e45ae

Please sign in to comment.