From 54436e2dc6cf742182629d6ab201e5d1a02c7c1d Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Mon, 10 Sep 2018 10:47:03 -0500 Subject: [PATCH] Add default.nix and udpate README --- README.md | 8 ++++++++ default.nix | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 default.nix diff --git a/README.md b/README.md index 30be737cc..c8c5fb53d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,14 @@ To generate HTML version: # open _build/index.html in your browser ``` +If you use [nix](https://nixos.org/nix/), you can just run: + +``` + nix-shell +``` + +This will build the docs and start a livereload server on `http://localhost:5500`. + --- **Sphinx Installation Notes:** diff --git a/default.nix b/default.nix new file mode 100644 index 000000000..6d32f9609 --- /dev/null +++ b/default.nix @@ -0,0 +1,14 @@ +with import {}; + +stdenv.mkDerivation { + name = "postgrest-docs"; + buildInputs = [ + python36Full + python36Packages.sphinx + python36Packages.sphinx_rtd_theme + python36Packages.livereload ]; + shellHook = '' + sphinx-build -b html -a -n . _build + python reload_docs.py && exit + ''; +}