From b3caa9f0fdc16ca3c37ebcd82630711b53d5894c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 16 Feb 2022 18:11:31 -0500 Subject: [PATCH] Make stable documentation links server-absolute ... instead of globally absolute with an explicit server name. This allows the docs to be served from a different server (e.g., on localhost if you have everything checked out together), without links leaking out to the real matplotlib.org. --- docs/_static/script.js | 2 +- docs/_templates/landing_footer.html | 14 +++---- docs/body.html | 65 ++++++++++++----------------- 3 files changed, 34 insertions(+), 47 deletions(-) diff --git a/docs/_static/script.js b/docs/_static/script.js index a94e644..58cd420 100644 --- a/docs/_static/script.js +++ b/docs/_static/script.js @@ -51,7 +51,7 @@ document.addEventListener("DOMContentLoaded", function(event) { var info = images_rotate[ind]; var img_src = "_static/images-rotate/" + info.image; var caption = info.caption; - var link = "https://matplotlib.org/stable/" + info.link; + var link = "/stable/" + info.link; var html = '' + '' + '
' + caption + '
' + diff --git a/docs/_templates/landing_footer.html b/docs/_templates/landing_footer.html index 740030d..c6c46e0 100644 --- a/docs/_templates/landing_footer.html +++ b/docs/_templates/landing_footer.html @@ -37,18 +37,17 @@

Matplotlib

diff --git a/docs/body.html b/docs/body.html index d302d58..26fa8d6 100644 --- a/docs/body.html +++ b/docs/body.html @@ -20,26 +20,23 @@

Matplotlib: Visualization with Python

  • Customize - visual style and - layout. + + visual style + and + layout.
  • - Export to - many file formats. + Export to many + file formats.
  • Embed in - JupyterLab and Graphical User Interfaces.
  • - Use a rich array of - third-party packages + Use a rich array of third-party packages built on Matplotlib.
  • @@ -59,7 +56,7 @@

    Matplotlib: Visualization with Python

    @@ -405,11 +399,9 @@

    Contribute

    You can help by answering questions on discourse, reporting a bug or requesting a feature - on GitHub, or improving the - documentation and code! + on GitHub, + or improving the + documentation and code!

    Join us on Discourse @@ -423,17 +415,14 @@

    Cite

    Matplotlib is the result of development efforts by John Hunter (1968–2012) and the project's - many contributors. + many contributors.

    If Matplotlib contributes to a project that leads to a scientific publication, please acknowledge this work by citing the project!

    - Ready made citation + Ready + made citation
  • Donate