From 6328a9b6d8b09ae8db8736431f1e3d0fe2d45a01 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Fri, 4 Aug 2023 20:09:30 +0200 Subject: [PATCH] [MkDocs] Fix "Downloadable file" sitemap.xml is only available after build, therefore strict mode would fail. --- docs/assets/example.json | 12 ++++++++++++ docs/mkdocs.md | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 docs/assets/example.json diff --git a/docs/assets/example.json b/docs/assets/example.json new file mode 100644 index 0000000..ccc5e17 --- /dev/null +++ b/docs/assets/example.json @@ -0,0 +1,12 @@ +[ + { + "id": 1, + "name": "Alice", + "visible": true + }, + { + "id": 2, + "name": "Bob", + "visible": false + } +] diff --git a/docs/mkdocs.md b/docs/mkdocs.md index 81f6a5a..0347400 100644 --- a/docs/mkdocs.md +++ b/docs/mkdocs.md @@ -29,13 +29,13 @@ pip install --requirement docs/requirements.txt ### Downloadable file ```md -[:material-launch:](../sitemap.xml){: .md-button } -[:material-download:](../sitemap.xml){: .md-button download="sitemap.xml" } +[:material-launch:](assets/example.json){: .md-button } +[:material-download:](assets/example.json){: .md-button download="example.json" } ```
-[:material-launch:](../sitemap.xml){: .md-button } -[:material-download:](../sitemap.xml){: .md-button download="sitemap.xml" } +[:material-launch:](assets/example.json){: .md-button } +[:material-download:](assets/example.json){: .md-button download="example.json" }