diff --git a/docs/Makefile b/docs/Makefile index 26168b6f38..dcbf111c29 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,6 +6,7 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build +PYTHON = python # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 @@ -38,6 +39,7 @@ help: # @echo " linkcheck to check all external links for integrity" # @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " docs to build the docs and copy the static files to the outputdir" + @echo " server to serve the docs in your browser under \`http://localhost:8000\`" @echo " publish to publish the app to dotcloud" clean: @@ -49,6 +51,8 @@ docs: @echo @echo "Build finished. The documentation pages are now in $(BUILDDIR)/html." +server: + @cd $(BUILDDIR)/html; $(PYTHON) -m SimpleHTTPServer 8000 site: cp -r website $(BUILDDIR)/ diff --git a/docs/README.md b/docs/README.md index e1ca45b085..ef24c3fb1d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -23,7 +23,7 @@ Usage * change the .rst files with your favorite editor to your liking * run *make docs* to clean up old files and generate new ones * your static website can now be found in the _build dir -* to preview what you have generated, cd into _build/html and then run 'python -m SimpleHTTPServer 8000' +* to preview what you have generated run `make server` and open in your favorite browser. Working using github's file editor ----------------------------------