mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Added documentation for Admonitions as inline blocks
This commit is contained in:
parent
e0401cb9fa
commit
9bd185bc8e
@ -1,3 +1,7 @@
|
|||||||
|
mkdocs-material-6.1.6+insiders-1.11.0 (2020-11-22)
|
||||||
|
|
||||||
|
* Added support for rendering Admonitions as inline blocks
|
||||||
|
|
||||||
mkdocs-material-6.1.6 (2020-11-22)
|
mkdocs-material-6.1.6 (2020-11-22)
|
||||||
|
|
||||||
* Fixed #2048: Math formulas show scrollbars (Windows)
|
* Fixed #2048: Math formulas show scrollbars (Windows)
|
||||||
|
BIN
docs/assets/screenshots/admonition-inline-end.png
Normal file
BIN
docs/assets/screenshots/admonition-inline-end.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 150 KiB |
BIN
docs/assets/screenshots/admonition-inline.png
Normal file
BIN
docs/assets/screenshots/admonition-inline.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 150 KiB |
@ -6,6 +6,10 @@ template: overrides/main.html
|
|||||||
|
|
||||||
## Material for MkDocs Insiders
|
## Material for MkDocs Insiders
|
||||||
|
|
||||||
|
### 1.11.0 <small>_ November 22, 2020</small>
|
||||||
|
|
||||||
|
- Added support for rendering Admonitions as inline blocks
|
||||||
|
|
||||||
### 1.10.0 <small>_ November 15, 2020</small>
|
### 1.10.0 <small>_ November 15, 2020</small>
|
||||||
|
|
||||||
- Added support for integrating table of contents into navigation
|
- Added support for integrating table of contents into navigation
|
||||||
|
@ -80,6 +80,7 @@ for MkDocs Insiders. You can click on each feature to learn more about it:
|
|||||||
- [x] [Navigation and table of contents can be hidden][18]
|
- [x] [Navigation and table of contents can be hidden][18]
|
||||||
- [x] [Table of contents can be integrated into navigation][19]
|
- [x] [Table of contents can be integrated into navigation][19]
|
||||||
- [x] [Header can be automatically hidden on scrolling][20]
|
- [x] [Header can be automatically hidden on scrolling][20]
|
||||||
|
- [x] [Support for Admonitions as inline blocks][21]
|
||||||
|
|
||||||
[11]: setup/setting-up-the-footer.md#remove-generator
|
[11]: setup/setting-up-the-footer.md#remove-generator
|
||||||
[12]: setup/changing-the-colors.md#color-palette-toggle
|
[12]: setup/changing-the-colors.md#color-palette-toggle
|
||||||
@ -91,14 +92,15 @@ for MkDocs Insiders. You can click on each feature to learn more about it:
|
|||||||
[18]: setup/setting-up-navigation.md#hide-the-sidebars
|
[18]: setup/setting-up-navigation.md#hide-the-sidebars
|
||||||
[19]: setup/setting-up-navigation.md#navigation-integration
|
[19]: setup/setting-up-navigation.md#navigation-integration
|
||||||
[20]: setup/setting-up-the-header.md#automatic-hiding
|
[20]: setup/setting-up-the-header.md#automatic-hiding
|
||||||
|
[21]: reference/admonitions.md#inline-blocks
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
The following list of funding goals – named after varieties of chili peppers
|
The following list of funding goals – named after varieties of chili peppers
|
||||||
[I'm growing on my balcony][21] – shows which features are already available
|
[I'm growing on my balcony][22] – shows which features are already available
|
||||||
in Material for MkDocs Insiders.
|
in Material for MkDocs Insiders.
|
||||||
|
|
||||||
[21]: https://www.instagram.com/squidfunk/
|
[22]: https://www.instagram.com/squidfunk/
|
||||||
|
|
||||||
### Madame Jeanette
|
### Madame Jeanette
|
||||||
|
|
||||||
@ -125,6 +127,7 @@ in Material for MkDocs Insiders.
|
|||||||
[:octicons-flame-24: Funding goal: __$1,500__][6] ·
|
[:octicons-flame-24: Funding goal: __$1,500__][6] ·
|
||||||
:octicons-lock-24: Status: _exclusive_
|
:octicons-lock-24: Status: _exclusive_
|
||||||
|
|
||||||
|
- [x] [Support for Admonitions as inline blocks][21]
|
||||||
- [x] [Support for deploying multiple versions][13]
|
- [x] [Support for deploying multiple versions][13]
|
||||||
- [ ] Support for deploying multiple languages
|
- [ ] Support for deploying multiple languages
|
||||||
|
|
||||||
@ -170,10 +173,10 @@ improvements (e.g. search) do not require any changes to existing configuration.
|
|||||||
This means that your users will be able to build the docs locally with the
|
This means that your users will be able to build the docs locally with the
|
||||||
regular version and when they push their changes to CI/CD, they will be built
|
regular version and when they push their changes to CI/CD, they will be built
|
||||||
with Material for MkDocs Insiders. For this reason, it's recommended to
|
with Material for MkDocs Insiders. For this reason, it's recommended to
|
||||||
[install Insiders][22] only in CI, as you don't want to expose your `GH_TOKEN`
|
[install Insiders][23] only in CI, as you don't want to expose your `GH_TOKEN`
|
||||||
to users.
|
to users.
|
||||||
|
|
||||||
[22]: publishing-your-site.md#github-pages
|
[23]: publishing-your-site.md#github-pages
|
||||||
|
|
||||||
### Terms
|
### Terms
|
||||||
|
|
||||||
@ -183,7 +186,7 @@ terms?_
|
|||||||
|
|
||||||
Yes. Whether you're an individual or a company, you may use _Material for MkDocs
|
Yes. Whether you're an individual or a company, you may use _Material for MkDocs
|
||||||
Insiders_ precisely under the same terms as Material for MkDocs, which are given
|
Insiders_ precisely under the same terms as Material for MkDocs, which are given
|
||||||
by the [MIT license][23]. However, we kindly ask you to respect the following
|
by the [MIT license][24]. However, we kindly ask you to respect the following
|
||||||
guidelines:
|
guidelines:
|
||||||
|
|
||||||
- Please __don't distribute the source code__ from Material for MkDocs Insiders.
|
- Please __don't distribute the source code__ from Material for MkDocs Insiders.
|
||||||
@ -194,7 +197,7 @@ guidelines:
|
|||||||
- If you cancel your subscription, you're removed as a collaborator and will
|
- If you cancel your subscription, you're removed as a collaborator and will
|
||||||
miss out on future updates of Material for MkDocs Insiders. However, you may
|
miss out on future updates of Material for MkDocs Insiders. However, you may
|
||||||
__use the latest version__ that's available to you __as long as you like__.
|
__use the latest version__ that's available to you __as long as you like__.
|
||||||
Just remember that __[GitHub deletes private forks][24]__.
|
Just remember that __[GitHub deletes private forks][25]__.
|
||||||
|
|
||||||
[23]: license.md
|
[24]: license.md
|
||||||
[24]: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository
|
[25]: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository
|
||||||
|
@ -225,6 +225,39 @@ _Result_:
|
|||||||
|
|
||||||
[11]: #details
|
[11]: #details
|
||||||
|
|
||||||
|
### Inline blocks
|
||||||
|
|
||||||
|
[:octicons-file-code-24: Source][12] ·
|
||||||
|
:octicons-beaker-24: Experimental ·
|
||||||
|
[:octicons-heart-fill-24:{: .tx-heart } Insiders only][12]{: .tx-insiders }
|
||||||
|
|
||||||
|
Admonitions and [Details][11] can also be rendered as inline blocks (i.e.
|
||||||
|
sidebars), moving them to the right using the `inline` + `end` modifiers, or
|
||||||
|
to the left using only the `inline` modifier.
|
||||||
|
|
||||||
|
_Example_:
|
||||||
|
|
||||||
|
``` markdown
|
||||||
|
!!! note inline end
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||||
|
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||||
|
massa, nec semper lorem quam in massa.
|
||||||
|
```
|
||||||
|
|
||||||
|
_Result_:
|
||||||
|
|
||||||
|
=== "inline end"
|
||||||
|
|
||||||
|
[![Admonition, inline end][13]][13]
|
||||||
|
|
||||||
|
=== "inline"
|
||||||
|
|
||||||
|
[![Admonition, inline][14]][14]
|
||||||
|
|
||||||
|
[12]: ../insiders.md
|
||||||
|
[13]: ../assets/screenshots/admonition-inline-end.png
|
||||||
|
[14]: ../assets/screenshots/admonition-inline.png
|
||||||
|
|
||||||
### Supported types
|
### Supported types
|
||||||
|
|
||||||
Following is a list of type qualifiers provided by Material for MkDocs, whereas
|
Following is a list of type qualifiers provided by Material for MkDocs, whereas
|
||||||
@ -331,8 +364,8 @@ the default type, and thus fallback for unknown type qualifiers, is `note`:
|
|||||||
### Custom admonitions
|
### Custom admonitions
|
||||||
|
|
||||||
If you want to add a custom admonition type, all you need is a color and an
|
If you want to add a custom admonition type, all you need is a color and an
|
||||||
`svg` icon. Copy the icon's `svg` code from the [`.icons`][9] folder and add the
|
`svg` icon. Copy the icon's `svg` code from the [`.icons`][15] folder and add the
|
||||||
following CSS to an [additional stylesheet][10]:
|
following CSS to an [additional stylesheet][16]:
|
||||||
|
|
||||||
``` css
|
``` css
|
||||||
:root {
|
:root {
|
||||||
@ -356,7 +389,7 @@ following CSS to an [additional stylesheet][10]:
|
|||||||
|
|
||||||
You should now be able to create an admonition of the `pied-piper` type. Note
|
You should now be able to create an admonition of the `pied-piper` type. Note
|
||||||
that you can also use this technique to override existing admonition icons or
|
that you can also use this technique to override existing admonition icons or
|
||||||
colors. [You can even add animations][11].
|
colors. [You can even add animations][17].
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
@ -395,6 +428,6 @@ _Result_:
|
|||||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||||
massa, nec semper lorem quam in massa.
|
massa, nec semper lorem quam in massa.
|
||||||
|
|
||||||
[9]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons
|
[15]: https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons
|
||||||
[10]: ../customization.md#additional-css
|
[16]: ../customization.md#additional-css
|
||||||
[11]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
|
[17]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
|
||||||
|
Loading…
Reference in New Issue
Block a user