Skip to content

Commit

Permalink
[MkDocs] Fix "Downloadable file"
Browse files Browse the repository at this point in the history
sitemap.xml is only available after build, therefore strict mode would fail.
  • Loading branch information
SimonMarquis committed Aug 4, 2023
1 parent 4a1e5b8 commit 6328a9b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions docs/assets/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"id": 1,
"name": "Alice",
"visible": true
},
{
"id": 2,
"name": "Bob",
"visible": false
}
]
8 changes: 4 additions & 4 deletions docs/mkdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
```
<div class="result" markdown>

[: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" }

</div>

Expand Down

0 comments on commit 6328a9b

Please sign in to comment.