From 728b9f10a204a6d0b63638253e6f6f94e14e7e08 Mon Sep 17 00:00:00 2001 From: Dan Bader Date: Mon, 16 Jul 2018 13:49:52 -0700 Subject: [PATCH] Fix custom 404 --- docs/Makefile | 4 ++++ docs/_extra/_redirects | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 docs/_extra/_redirects diff --git a/docs/Makefile b/docs/Makefile index 40b479e..6eff0bc 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -59,6 +59,10 @@ dirhtml: @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." +netlify: dirhtml + @cp $(BUILDDIR)/dirhtml/404/index.html $(BUILDDIR)/dirhtml/404.html + @cp _extra/* $(BUILDDIR)/dirhtml/ + singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo diff --git a/docs/_extra/_redirects b/docs/_extra/_redirects new file mode 100644 index 0000000..5b0e2fe --- /dev/null +++ b/docs/_extra/_redirects @@ -0,0 +1,5 @@ +# https://www.netlify.com/docs/redirects/ + + +# Redirect internal URL to python-guide.org +# https://python-guide.netlify.com/* https://docs.python-guide.org/:splat 301!