Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blueswen committed Jun 14, 2022
1 parent f790651 commit 550765e
Show file tree
Hide file tree
Showing 25 changed files with 1,320 additions and 246 deletions.
9 changes: 7 additions & 2 deletions demo-mkdocs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa

## Features

1. Multiple OpenAPI Specification file source: url, static file in docs
1. OpenAPI Specification file from online over URL or static file in docs
2. Multiple Swagger UI in same page
3. Synchronized dark mode with [mkdocs-material](https://squidfunk.github.io/mkdocs-material/)

## Dependency

Expand Down Expand Up @@ -39,7 +40,7 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa

| Option | Default | Description |
|------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| background | White | Swagger UI iframe body background attribute value. You can use any css value for background for example "#74b9ff" or Gainsboro or "" for nothing. |
| background | "" | Swagger UI iframe body background attribute value. You can use any css value for background for example "#74b9ff" or Gainsboro or "" for nothing. |

4. Add ```swagger-ui``` tag in markdown to include Swagger UI

Expand All @@ -52,3 +53,7 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa
## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/Blueswen/mkdocs-swagger-ui-tag/blob/main/LICENSE) file for details.

## Reference

1. [Amoenus Swagger Dark Theme](https://github.com/Amoenus/SwaggerDark/): source of dark mode css
Binary file modified demo-mkdocs/docs/sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions demo-mkdocs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ theme:
name: material
features:
- toc.integrate
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference

markdown_extensions:
- pymdownx.highlight:
Expand Down
47 changes: 41 additions & 6 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@


<link rel="icon" href="/blueswen/mkdocs-swagger-ui-tag/assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.3.0, mkdocs-material-8.3.2+insiders-4.17.2">
<meta name="generator" content="mkdocs-1.3.0, mkdocs-material-8.3.4+insiders-4.18.0">



<title>MkDocs Swagger UI Tag</title>



<link rel="stylesheet" href="/blueswen/mkdocs-swagger-ui-tag/assets/stylesheets/main.9b33a7c2.min.css">
<link rel="stylesheet" href="/blueswen/mkdocs-swagger-ui-tag/assets/stylesheets/main.83929f28.min.css">


<link rel="stylesheet" href="/blueswen/mkdocs-swagger-ui-tag/assets/stylesheets/palette.cbb835fc.min.css">
Expand Down Expand Up @@ -52,10 +52,12 @@








<body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="" data-md-color-accent="">



Expand All @@ -68,7 +70,6 @@




<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
Expand Down Expand Up @@ -110,6 +111,40 @@
</div>
</div>

<form class="md-header__option" data-md-component="palette">



<input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="" data-md-color-primary="" data-md-color-accent="" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">

<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9h-1.9M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69m-9.15 3.96h2.3L12 9l-1.15 3.65Z"/></svg>
</label>




<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="" data-md-color-accent="" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">

<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg>
</label>




<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="" data-md-color-accent="" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_2">

<label class="md-header__button md-icon" title="Switch to system preference" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg>
</label>


</form>


<script>var media,input,key,value,palette=__md_get("__palette");if(palette&&palette.color){"(prefers-color-scheme)"===palette.color.media&&(media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']"),palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent"));for([key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>




Expand Down Expand Up @@ -343,10 +378,10 @@ <h1>404 - Not found</h1>
<div class="md-dialog__inner md-typeset"></div>
</div>

<script id="__config" type="application/json">{"base": "/blueswen/mkdocs-swagger-ui-tag/", "features": ["toc.integrate"], "search": "/blueswen/mkdocs-swagger-ui-tag/assets/javascripts/workers/search.16af1b4e.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}}</script>
<script id="__config" type="application/json">{"base": "/blueswen/mkdocs-swagger-ui-tag/", "features": ["toc.integrate"], "search": "/blueswen/mkdocs-swagger-ui-tag/assets/javascripts/workers/search.bb370e14.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}}</script>


<script src="/blueswen/mkdocs-swagger-ui-tag/assets/javascripts/bundle.fdb661c6.min.js"></script>
<script src="/blueswen/mkdocs-swagger-ui-tag/assets/javascripts/bundle.ba7fc6cf.min.js"></script>


</body>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/stylesheets/main.83929f28.min.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/assets/stylesheets/main.9b33a7c2.min.css

This file was deleted.

Loading

0 comments on commit 550765e

Please sign in to comment.