From 5658b2ee3ed20cbc3ec75d689d2f84dc3865b886 Mon Sep 17 00:00:00 2001 From: Alicia Cozine <879121+acozine@users.noreply.github.com> Date: Mon, 17 Jun 2019 10:47:54 -0500 Subject: [PATCH] Adds custom 404 with cowsay image (#57422) * Adds custom 404 with image, updates CI reqs, sets version latest for TOC links on 404 page --- docs/docsite/rst/404.rst | 12 ++++++++++++ docs/docsite/rst/conf.py | 15 ++++++++++++++- docs/docsite/rst/images/cow.png | Bin 0 -> 5777 bytes test/runner/requirements/sanity.txt | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 docs/docsite/rst/404.rst create mode 100644 docs/docsite/rst/images/cow.png diff --git a/docs/docsite/rst/404.rst b/docs/docsite/rst/404.rst new file mode 100644 index 00000000000..ca6dd8959b3 --- /dev/null +++ b/docs/docsite/rst/404.rst @@ -0,0 +1,12 @@ +:orphan: + +***** +Oops! +***** + +This page does not exist in this version of the Ansible documentation. + +.. image:: images/cow.png + :alt: Cowsay 404 + +Return to the :ref:`nearest table of contents in this version ` or use the navigation at left to explore our latest release. diff --git a/docs/docsite/rst/conf.py b/docs/docsite/rst/conf.py index 9e718e4f3a6..2b1e1d06f2a 100644 --- a/docs/docsite/rst/conf.py +++ b/docs/docsite/rst/conf.py @@ -45,7 +45,7 @@ AUTHOR = 'Ansible, Inc' # They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # TEST: 'sphinxcontrib.fulltoc' -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'pygments_lexer'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'pygments_lexer', 'notfound.extension'] # Later on, add 'sphinx.ext.viewcode' to the list if you want to have # colorized code generated too for references. @@ -211,6 +211,19 @@ html_use_opensearch = 'https://docs.ansible.com/ansible/latest' # Output file base name for HTML help builder. htmlhelp_basename = 'Poseidodoc' +# Configuration for sphinx-notfound-pages +# with no 'notfound_template' and no 'notfound_context' set, +# the extension builds 404.rst into a location-agnostic 404 page +# +# default is `en` - using this for the sub-site: +notfound_default_language = "ansible" +# default is `latest`: +# setting explicitly - docsite serves up /ansible/latest/404.html +# so keep this set to `latest` even on the `devel` branch +# then no maintenance is needed when we branch a new stable_x.x +notfound_default_version = "latest" +# makes default setting explicit: +notfound_no_urls_prefix = False # Options for LaTeX output # ------------------------ diff --git a/docs/docsite/rst/images/cow.png b/docs/docsite/rst/images/cow.png new file mode 100644 index 0000000000000000000000000000000000000000..9ace4401908a8eb28c28131b1113500e0ad8d3bc GIT binary patch literal 5777 zcmds5c{r49+rN`X^dxC|+7ypOi)G57$P!s%WbF~9p=6RsmcrQTNm?jdOt-Z#3VEzq zXNHo*+!9%0$TnkV>|=@hyT;S^eed!8^Bu?g9`8TzbsWr`*Lj`4^Y{CmGh8!|%uEb~ zH}2jDL6ETFXFA@I2h%T0%s8-4uNq9f+}p*-h!X%K^jz%a@)66gbML4+VM zf&yQGT)+Y(VHAN;;3IGv7yx*IxC5-<;FT5AO{rdF8mqOQgv%!Uv1T{$nxTl~y^yY{jX zNxsqFKd{K1Us&coIIq31jAG^1KQDS04)@2OcYT{%+Uvjet}ZVx zEdRaGxOA$it%J3WR?FmgT2YZLSQkv!Uh_YHi3%h{fcFXHWnp3oX#7Vm;PwBzcy<_e z&=kOf(9P2}o)EP81Mg>DjO=DH2->>GP*?k`Pr`U&USMj;_6LTK6OEOzy-XJiX-l?{ zg>T&6S8-=&_zerv9>4NP>hGw3YsuCg+gR~ACK%cqapmqk)r}~J%RHkb__Q+l{+63j zW9xbh6us6%xe#`pL63BgAeDd5UGg2N$*ni}34Bj0@s*-JLdW_3t;vTi43``E+Cmh9 zk()fNQ%1(~nb`al@?Jekj5mJTF2wgah6^B;$;@Rew_Op>Mxv8 z>T=f4=tg-klH`cQ&&%EpYrE^BY4?rXOzV`cy+<1;io0plGWK<`+!c<_IO;BKRX?H6 zW|LInWx92o6~tOB+6+9LP8oVECU4$Q>Oeg|8G*f|az)2AQ$1P>H5>RQ=n>h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)ORyx(i`i5=tj=B$aiMmi- z8WSlklNJ@fUs-uM8n-#MD(n{(LdezbBP)kP;uak^g=t5yU6I{V;tM{z0%KOr{vj6< zhaYF3o6hkYW*2W3t^6`MrKr9f(%WHqEyb1`>vhrLw&0>h%H2rvyY^$7u%ULI{Z58c zPB$?Bvl-h0E*&|gk%jv+63YPe_T#?0;sUBlD6aHDV+f31%ic4G+ITl?@1O5t;K#yVC?iuEVi!wb*1PRQ;R!eUK> zv8FXO&%PXxs69@bW$_YA45?id@*RzzA9{309Jej1M2x4Na3}53qYE3yh-)Vh6zhtQ zCO2I4?iA6tt4DvwJWM=DyYkHKl*#=vadWk80k5p|WVVQzlWGrke{AwGN^|vESrGcn z-F|sC%98%XpqDaZ;}A4^`B;R|2c0lNkQjdkCed5;v zJ+=oGP}}^)D0qd8ghqMU-!X!c`q-+RtxNUA<|cCwM)M#K53jXt2kSC^_#!g#1OVpz_yf96C!Fd!{Leu>i+F#^JsH*QSf!3=`MAy}sPK|jF3E33(sI-MhRnWAbz z4HIMGe(xEdEAb=jQ}Inoz7gnjnJ4wtue{>$-_Ou(bt>q^)=N@shpsWZKA4&s7pS< zO=+z?w^9GX=i{6Ie{%3x&XxfPq86l3<(yR$C7I-;Z?nZ4aV9vAjCF z@CIa8XIvB1Qfpp0+7jk9O}$3o*WgcMnB4o*cgT@?JB20{^97~W5%jlT+F!}|v@eX` zXO~TIB!ra;J+igO@rtNE-@kPD66l)b*5ABKLsLF=dYT_hKe4gDK=CKnfAcpft0EXz WQQr*&k*u{Zk@QS-|I)Gl^S=OfDEyBA literal 0 HcmV?d00001 diff --git a/test/runner/requirements/sanity.txt b/test/runner/requirements/sanity.txt index 5d27a4e7abb..cda20ef3c90 100644 --- a/test/runner/requirements/sanity.txt +++ b/test/runner/requirements/sanity.txt @@ -7,6 +7,7 @@ pylint ; python_version >= '3.5' # pylint 2.0.0 and later require python 3+ pytest rstcheck ; python_version >= '2.7' # rstcheck requires python 2.7+ sphinx +sphinx-notfound-page straight.plugin # needed for hacking/build-ansible which will host changelog generation virtualenv voluptuous ; python_version >= '2.7' # voluptuous 0.11.0 and later require python 2.7+