mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Merge branch 'master' into fix/scrollbar-on-short-content
This commit is contained in:
commit
4151875a93
@ -115,7 +115,8 @@ Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- codehilite(linenums=true)
|
||||
- codehilite:
|
||||
linenums:true
|
||||
```
|
||||
|
||||
Example:
|
||||
|
@ -13,7 +13,8 @@ To enable permalinks, add the following to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- toc(permalink=true)
|
||||
- toc:
|
||||
permalink: true
|
||||
```
|
||||
|
||||
This will add a link containing the paragraph symbol `¶` at the end of each
|
||||
@ -23,7 +24,8 @@ permalink, a string can be passed, e.g.:
|
||||
|
||||
``` markdown
|
||||
markdown_extensions:
|
||||
- toc(permalink=Link)
|
||||
- toc:
|
||||
permalink: Link
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
@ -21,7 +21,8 @@ package are recommended to be used together with the Material theme:
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- pymdownx.arithmatex
|
||||
- pymdownx.betterem(smart_enable=all)
|
||||
- pymdownx.betterem:
|
||||
smart_enable: all
|
||||
- pymdownx.caret
|
||||
- pymdownx.critic
|
||||
- pymdownx.details
|
||||
@ -32,7 +33,8 @@ markdown_extensions:
|
||||
- pymdownx.mark
|
||||
- pymdownx.smartsymbols
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tasklist(custom_checkbox=true)
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.tilde
|
||||
```
|
||||
|
||||
|
@ -135,7 +135,7 @@ project's `mkdocs.yml`. See the following sections for all available options.
|
||||
|
||||
### Changing the color palette
|
||||
|
||||
A default is hue is defined for every primary and accent color on Google's
|
||||
A default hue is defined for every primary and accent color on Google's
|
||||
Material Design [color palette][10], which makes it very easy to change the
|
||||
overall look of the theme. Just set the primary and accent colors using the
|
||||
following variables:
|
||||
@ -271,7 +271,7 @@ If the repository is hosted in a private environment, the service logo can be
|
||||
set explicitly by setting `extra.repo_icon` to `github`, `gitlab` or
|
||||
`bitbucket`.
|
||||
|
||||
!!! warning "Why is there an edit button at the top of every article?"
|
||||
!!! question "Why is there an edit button at the top of every article?"
|
||||
|
||||
If the `repo_url` is set to a GitHub or BitBucket repository, and the
|
||||
`repo_name` is set to *GitHub* or *BitBucket* (implied by default), an
|
||||
@ -439,7 +439,7 @@ Norwegian `no`, Swedish `sv` and Turkish `tr`.
|
||||
|
||||
!!! warning "Only specify the languages you really need"
|
||||
|
||||
Be aware that including suppport for other languages increases the general
|
||||
Be aware that including support for other languages increases the general
|
||||
JavaScript payload by around 20kb (without gzip) and by another 15-30kb per
|
||||
language.
|
||||
|
||||
@ -486,8 +486,10 @@ but highly recommended, so they should be switched on at all times:
|
||||
``` yaml
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite(guess_lang=false)
|
||||
- toc(permalink=true)
|
||||
- codehilite:
|
||||
guess_lang: false
|
||||
- toc:
|
||||
permalink: true
|
||||
```
|
||||
|
||||
For more information, see the following list of extensions supported by the
|
||||
@ -554,6 +556,8 @@ google_analytics:
|
||||
# Extensions
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite(guess_lang=false)
|
||||
- toc(permalink=true)
|
||||
- codehilite:
|
||||
guess_lang: false
|
||||
- toc:
|
||||
permalink: true
|
||||
```
|
||||
|
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/application-4d315b386e.css
Normal file
1
material/assets/stylesheets/application-4d315b386e.css
Normal file
File diff suppressed because one or more lines are too long
@ -153,7 +153,7 @@
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<script src="{{ base_url }}/assets/javascripts/application-f3ab9e5ff8.js"></script>
|
||||
<script src="{{ base_url }}/assets/javascripts/application-683e1b679e.js"></script>
|
||||
{% set languages = lang.t("search.languages").split(",") %}
|
||||
{% if languages | length and languages[0] != "" %}
|
||||
{% set path = base_url + "/assets/javascripts/lunr" %}
|
||||
|
@ -53,7 +53,7 @@
|
||||
"eslint": "^4.3.0",
|
||||
"expose-loader": "^0.7.3",
|
||||
"fastclick": "^1.0.6",
|
||||
"flow-bin": "^0.56.0",
|
||||
"flow-bin": "^0.57.1",
|
||||
"flow-jsdoc": "^0.3.0",
|
||||
"git-hooks": "^1.1.8",
|
||||
"gulp": "^3.9.1",
|
||||
|
@ -290,7 +290,7 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
/* Go to current active/focused link */
|
||||
const focus = document.querySelector(
|
||||
"[data-md-component=search] [href][data-md-state=active]")
|
||||
if (focus instanceof HTMLLinkElement)
|
||||
if (focus instanceof HTMLLinkElement) {
|
||||
window.location = focus.getAttribute("href")
|
||||
|
||||
/* Close search */
|
||||
@ -298,6 +298,7 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
toggle.dispatchEvent(new CustomEvent("change"))
|
||||
query.blur()
|
||||
}
|
||||
}
|
||||
|
||||
/* Escape: close search */
|
||||
} else if (ev.keyCode === 27) {
|
||||
|
@ -166,6 +166,11 @@ kbd {
|
||||
background-color: $md-code-background;
|
||||
color: $md-code-color;
|
||||
font-size: 85%;
|
||||
|
||||
// Wrap text and hide scollbars
|
||||
@media print {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
// Inline code blocks, correct relative ems for smaller font size
|
||||
|
@ -38,6 +38,11 @@
|
||||
// Hack: put everything on the GPU to omit flickering
|
||||
backface-visibility: hidden;
|
||||
|
||||
// Hide for print
|
||||
@media print {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Icon
|
||||
&::before {
|
||||
@extend %md-icon;
|
||||
|
Loading…
Reference in New Issue
Block a user