git-difme

git do it for me - ricketyspace.net/git-difme
git clone git://git.ricketyspace.net/git-difme.git
Log | Files | Refs

commit 2ea195dfbc4da32cbf729fe4f4515849e4ebbd97
parent 8845d6ed54c93957227c34b22c909b475ed38baf
Author: rsiddharth <s@ricketyspace.net>
Date:   Mon, 11 Jul 2016 02:03:20 +0000

add stuff to generate docs.

* .gitignore: ignore docs/_build directory.
* Makefile (docs, push-docs, docs-clean): new targets.
* docs/Makefile: new file
* docs/assets/includes/header.html: new file.
* docs/assets/includes/footer.html: new file.

Diffstat:
.gitignore | 5+++--
Makefile | 17++++++++++++++++-
docs/Makefile | 32++++++++++++++++++++++++++++++++
docs/assets/includes/footer.html | 2++
docs/assets/includes/header.html | 9+++++++++
5 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1 +1,2 @@ -*~- \ No newline at end of file +*~ +docs/_build/+ \ No newline at end of file diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -#!/usr/bin/make +#!/usr/bin/env make # license: gnu gpl version 3 or higher. # copyright 2016 rsiddharth <s@ricketyspace.net> @@ -26,6 +26,21 @@ config: $(config_file) .PHONY: config +docs: + @make -C docs html + +.PHONY: docs + +push-docs: docs + @rsync -avz --delete docs/_build/ $(DIFME_DOCS_HOST) + +.PHONY: push-docs + +docs-clean: + @make -C docs clean + +.PHONY: docs-clean + $(git_difme): $(git_difme_src) @mkdir -p $(bin) @touch $@ diff --git a/docs/Makefile b/docs/Makefile @@ -0,0 +1,32 @@ +#!/usr/bin/env make +# license: gnu gpl version 3 or higher. +# copyright 2016 rsiddharth <s@ricketyspace.net> + +build_dir=_build + +# docs +header=assets/includes/header.html +footer=assets/includes/footer.html + +index_src=index.org +index_out=$(build_dir)/index.html + +nothing: + @echo "Give me something to make. " + +html: $(index_out) + +.PHONY: html + +$(build_dir): + @mkdir $@ + +$(index_out): $(index_src) $(header) $(footer) $(build_dir) + @cat $(header) > $@ + @pandoc -f org -t html $< >> $@ + @cat $(footer) >> $@ + +clean: $(build_dir) + @rm -rf $< + +.PHONY: clean diff --git a/docs/assets/includes/footer.html b/docs/assets/includes/footer.html @@ -0,0 +1,2 @@ +</body> +</html> diff --git a/docs/assets/includes/header.html b/docs/assets/includes/header.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="author" content=" rsiddharth"> + <title>ricketyspace.net - git-difme</title> + <style>body {font-size:12px;}</style> +</head> +<body>