From 806a6663ad9a418d7f412123dece674d4352485a Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 29 May 2023 07:40:30 +0100 Subject: [PATCH 1/2] Remove the privacy plugin from the offline version of the docs Yes, this does pretty much undo the "offline" part, but without this the docs can't build if the builder doesn't have access to the insiders' edition of mkdocs. Doing this as a first step to investigating if there's any possible way to achieve what we want here: - Anyone can build - They can build offline - They can build for maximum privacy If not, this step at least hits the first requirement. See #2629. --- mkdocs-offline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/mkdocs-offline.yml b/mkdocs-offline.yml index 0d367af427..a86cf92e3e 100644 --- a/mkdocs-offline.yml +++ b/mkdocs-offline.yml @@ -2,7 +2,6 @@ INHERIT: mkdocs-common.yml plugins: offline: - privacy: exclude: glob: - "**/_template.md" From d4eb0a0c20f125186ab3f286d5bd6535078b90e3 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 29 May 2023 08:30:23 +0100 Subject: [PATCH 2/2] Only link Python and Rich types when building full docs It looks like mkdocstrings will fail out if it can't download the inv files. Unless there's a setting where you can tell it "try, but if you can't grab them just don't try and create links" the approach here seems reasonable and has the same effect. https://github.com/Textualize/textual/issues/2629#issuecomment-1566672594 for reference. --- mkdocs-common.yml | 3 --- mkdocs-online.yml | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mkdocs-common.yml b/mkdocs-common.yml index 9be7ac1295..0d59822f6a 100644 --- a/mkdocs-common.yml +++ b/mkdocs-common.yml @@ -67,9 +67,6 @@ plugins: default_handler: python handlers: python: - import: - - https://docs.python.org/3/objects.inv - - https://rich.readthedocs.io/en/stable/objects.inv options: show_signature_annotations: false separate_signature: true diff --git a/mkdocs-online.yml b/mkdocs-online.yml index 58aea3fc7b..e4cf2db1dd 100644 --- a/mkdocs-online.yml +++ b/mkdocs-online.yml @@ -14,3 +14,9 @@ plugins: - categories - release - tags + mkdocstrings: + handlers: + python: + import: + - https://docs.python.org/3/objects.inv + - https://rich.readthedocs.io/en/stable/objects.inv