mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-27 17:00:54 +01:00
Updated documentation
This commit is contained in:
parent
2e56079693
commit
d470f89056
@ -2,7 +2,12 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
@ -16,31 +21,54 @@ Examples of behavior that contributes to creating a positive environment include
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
||||
contributor for other behaviors that they deem inappropriate, threatening,
|
||||
offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://gitter.im/squidfunk/mkdocs-material. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at
|
||||
https://gitter.im/squidfunk/mkdocs-material. The project team will review and
|
||||
investigate all complaints, and will respond in a way that it deems appropriate
|
||||
to the circumstances. The project team is obligated to maintain confidentiality
|
||||
with regard to the reporter of an incident. Further details of specific
|
||||
enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Contributing
|
||||
|
||||
Interested in contributing to the Material theme? Want to report a bug? Before
|
||||
you do, please read the following guidelines.
|
||||
Interested in contributing to the Material for MkDocs? Want to report a bug?
|
||||
Before you do, please read the following guidelines.
|
||||
|
||||
## Submission context
|
||||
|
||||
@ -27,8 +27,8 @@ a Pull Request with a fix. However, before doing so, please read the
|
||||
You can request a new feature by submitting an issue to our GitHub Repository.
|
||||
If you would like to implement a new feature, please submit an issue with a
|
||||
proposal for your work first, to be sure that it is of use for everyone, as
|
||||
the Material theme is highly opinionated. Please consider what kind of change
|
||||
it is:
|
||||
the Material for MkDocs is highly opinionated. Please consider what kind of
|
||||
change it is:
|
||||
|
||||
* For a **major feature**, first open an issue and outline your proposal so
|
||||
that it can be discussed. This will also allow us to better coordinate our
|
||||
@ -37,8 +37,8 @@ it is:
|
||||
|
||||
* **Small features and bugs** can be crafted and directly submitted as a Pull
|
||||
Request. However, there is no guarantee that your feature will make it into
|
||||
the master, as it's always a matter of opinion whether if benefits the
|
||||
overall functionality of the theme.
|
||||
the `master`, as it's always a matter of opinion whether if benefits the
|
||||
overall functionality of the project.
|
||||
|
||||
## Submission guidelines
|
||||
|
||||
|
@ -38,7 +38,7 @@ Append the following line to your project's `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
name: 'material'
|
||||
name: material
|
||||
```
|
||||
|
||||
## What to expect
|
||||
|
@ -30,7 +30,7 @@ Then, add the following line to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra_css:
|
||||
- 'stylesheets/extra.css'
|
||||
- stylesheets/extra.css
|
||||
```
|
||||
|
||||
Spin up the development server with `mkdocs serve` and start typing your
|
||||
@ -52,7 +52,7 @@ Then, add the following line to your `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- 'javascripts/extra.js'
|
||||
- javascripts/extra.js
|
||||
```
|
||||
|
||||
Further assistance can be found in the [MkDocs documentation][2].
|
||||
@ -75,8 +75,8 @@ new folder for overrides, e.g. `theme`, which you reference using `custom_dir`:
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
name: 'material'
|
||||
custom_dir: 'theme'
|
||||
name: material
|
||||
custom_dir: theme
|
||||
```
|
||||
|
||||
!!! warning "Theme extension prerequisites"
|
||||
|
@ -1,12 +1,8 @@
|
||||
# Compliance with GDPR
|
||||
# Data privacy
|
||||
|
||||
## Material does not process any personal data
|
||||
|
||||
Material is a theme for MkDocs, a static site generator. In itself, Material
|
||||
does not perform any tracking or processing of personal data. However, some of
|
||||
the third-party services that Material integrates with may actually be in breach
|
||||
with the [General Data Protection Regulation][1] (GDPR) and need to be evaluated
|
||||
carefully.
|
||||
In itself, Material for MkDocs does not perform any tracking and should adhere
|
||||
to the [General Data Protection Regulation][1] (GDPR), but it integrates with
|
||||
some third-party services that may not.
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
|
||||
|
||||
@ -14,34 +10,30 @@ carefully.
|
||||
|
||||
### Google Fonts
|
||||
|
||||
Material makes fonts [easily configurable][2] by relying on Google Fonts CDN.
|
||||
However, embedding fonts from Google is currently within a gray area as there's
|
||||
Material for MkDocs makes fonts [easily configurable][2] by relying on Google
|
||||
Fonts CDN. Embedding fonts from Google is currently within a gray area as there's
|
||||
no official statement or ruling regarding GDPR compliance and the topic is still
|
||||
[actively discussed][3]. For this reason, if you need to ensure GDPR compliance,
|
||||
you should disable the usage of the Google Font CDN with:
|
||||
[actively discussed][3]. If you need to ensure GDPR compliance, you may disable
|
||||
the usage of the Google Font CDN with:
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
font: false
|
||||
```
|
||||
|
||||
When Google Fonts are disabled, Material will default to **Helvetica Neue** and
|
||||
**Monaco** with their corresponding fall backs, relying on system fonts. You
|
||||
could however include your own, self-hosted webfont by [overriding][4] the
|
||||
`fonts` block.
|
||||
When Google Fonts are disabled, Material for MkDocs will default to **Helvetica
|
||||
Neue** and **Monaco** with their corresponding fall backs, relying on system
|
||||
fonts. You can easily include your own, self-hosted webfont by [overriding][4]
|
||||
the `fonts` block.
|
||||
|
||||
The icon fonts (Material and FontAwesome) are bundled with the theme, and thus
|
||||
self-hosted so there's no third-party involved.
|
||||
|
||||
[2]: getting-started.md#font-family
|
||||
[2]: getting-started.md#fonts
|
||||
[3]: https://github.com/google/fonts/issues/1495
|
||||
[4]: customization.md#overriding-template-blocks
|
||||
|
||||
### Google Analytics and Disqus
|
||||
|
||||
Material comes with [Google Analytics][5] and [Disqus][6] integrations that need
|
||||
to be *enabled explicitly*. Disable both integrations in order to be in
|
||||
compliance with the GDPR.
|
||||
Material for MkDocs comes with optional [Google Analytics][5] and [Disqus][6]
|
||||
integrations, both of which must be enabled explicitly.
|
||||
|
||||
[5]: getting-started.md#google-analytics
|
||||
[6]: getting-started.md#disqus
|
||||
|
@ -128,7 +128,7 @@ a package manager add:
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
name: 'material'
|
||||
name: material
|
||||
```
|
||||
|
||||
If you cloned Material for MkDocs from GitHub add:
|
||||
@ -136,7 +136,7 @@ If you cloned Material for MkDocs from GitHub add:
|
||||
``` yaml
|
||||
theme:
|
||||
name: null
|
||||
custom_dir: 'mkdocs-material/material'
|
||||
custom_dir: mkdocs-material/material
|
||||
```
|
||||
|
||||
MkDocs includes a development server, so you can preview your changes as you
|
||||
|
@ -84,6 +84,8 @@ plugins:
|
||||
|
||||
### Prebuilding :hatching_chick:
|
||||
|
||||
> Default: `false`
|
||||
|
||||
MkDocs can generate a [prebuilt index][4] of all pages during build time, which
|
||||
provides performance improvements at the cost of more bandwidth. This may be
|
||||
beneficial for large documentation projects that are served with appropriate
|
||||
|
26
docs/releases/4.md
Normal file
26
docs/releases/4.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Material for MkDocs 4
|
||||
|
||||
## Highlights
|
||||
|
||||
Material for MkDocs 4 fixes incorrect layout on Chinese systems. The fix
|
||||
includes a mandatory change of the base font-size from `10px` to `20px` which
|
||||
means all `rem` values needed to be updated. Within the theme, `px` to `rem`
|
||||
calculation is now encapsulated in a new function called `px2rem` which is part
|
||||
of the SASS code base.
|
||||
|
||||
If you use Material for MkDocs with custom CSS that is based on `rem` values,
|
||||
note that those values must now be divided by 2. Now, `1.0rem` doesn't map to
|
||||
`10px`, but `20px`. To learn more about the problem and implications, please
|
||||
refer to [the issue][1] in which the problem was discovered and fixed.
|
||||
|
||||
[1]: https://github.com/squidfunk/mkdocs-material/issues/911
|
||||
|
||||
## How to upgrade
|
||||
|
||||
### Changes to `mkdocs.yml`
|
||||
|
||||
None.
|
||||
|
||||
### Changes to `*.html` files
|
||||
|
||||
None.
|
820
docs/releases/5.md
Normal file
820
docs/releases/5.md
Normal file
@ -0,0 +1,820 @@
|
||||
# Material for MkDocs 5
|
||||
|
||||
## Highlights
|
||||
|
||||
* Reactive architecture – try `__material.dialog$.next("Hi!")` in the console
|
||||
* [Instant loading][5] – make Material behave like a Single Page Application
|
||||
* Improved CSS customization with [CSS variables][1] – set your brand's colors
|
||||
* Improved CSS resilience, e.g. proper sidebar locking for customized headers
|
||||
* Improved [icon integration][6] and configuration – now including over 5k icons
|
||||
* Added possibility to use any icon for logo, repository and social links
|
||||
* Search UI does not freeze anymore (moved to web worker)
|
||||
* Search index built only once when using instant loading
|
||||
* Improved extensible keyboard handling
|
||||
* Support for [prebuilt search indexes][2]
|
||||
* Support for displaying stars and forks for GitLab repositories
|
||||
* Support for scroll snapping of sidebars and search results
|
||||
* Reduced HTML and CSS footprint due to deprecation of Internet Explorer support
|
||||
* Slight facelifting of some UI elements (Admonitions, tables, ...)
|
||||
|
||||
[1]: https://github.com/squidfunk/mkdocs-material/blob/081d540127c41703da3d73aa69eb521615c1cb89/src/assets/stylesheets/base/_colors.scss#L27-L55
|
||||
[2]: https://www.mkdocs.org/user-guide/configuration/#prebuild_index
|
||||
|
||||
## How to upgrade
|
||||
|
||||
### Changes to `mkdocs.yml`
|
||||
|
||||
Following is a list of changes that need to be made to `mkdocs.yml`. Note that
|
||||
you only have to adjust the value if you defined it, so if your configuration
|
||||
does not contain the key, you can skip it.
|
||||
|
||||
#### `theme.feature`
|
||||
|
||||
Optional features like [tabs][4] and [instant loading][5] are now implemented as
|
||||
flags and can be enabled by listing them in `mkdocs.yml` under `theme.features`:
|
||||
|
||||
=== "5.x"
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
features:
|
||||
- tabs
|
||||
- instant
|
||||
```
|
||||
|
||||
=== "4.x"
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
feature:
|
||||
tabs: true
|
||||
```
|
||||
|
||||
[4]: ../../../getting-started/#tabs
|
||||
[5]: ../../../getting-started/#instant-loading
|
||||
|
||||
#### `theme.logo.icon`
|
||||
|
||||
The logo icon configuration was centralized under `theme.icon.logo` and can now
|
||||
be set to any of the [icons bundled with the theme][6]:
|
||||
|
||||
=== "5.x"
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
icon:
|
||||
logo: material/cloud
|
||||
```
|
||||
|
||||
[6]: ../../../getting-started/#icons
|
||||
|
||||
=== "4.x"
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
logo:
|
||||
icon: cloud
|
||||
```
|
||||
|
||||
#### `extra.repo_icon`
|
||||
|
||||
The repo icon configuration was centralized under `theme.icon.repo` and can now
|
||||
be set to any of the [icons bundled with the theme][6]:
|
||||
|
||||
=== "5.x"
|
||||
|
||||
``` yaml
|
||||
theme:
|
||||
icon:
|
||||
repo: fontawesome/brands/gitlab
|
||||
```
|
||||
|
||||
=== "4.x"
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
repo_icon: gitlab
|
||||
```
|
||||
|
||||
#### `extra.search.*`
|
||||
|
||||
Search is now configured as part of the [plugin options][7]. Note that the
|
||||
search languages must now be listed as an array of strings and the `tokenizer`
|
||||
was renamed to `separator`:
|
||||
|
||||
=== "5.x"
|
||||
|
||||
``` yaml
|
||||
plugins:
|
||||
- search:
|
||||
separator: [\s\-\.]+
|
||||
lang:
|
||||
- en
|
||||
- de
|
||||
- ru
|
||||
```
|
||||
|
||||
=== "4.x"
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
search:
|
||||
language: en, de, ru
|
||||
tokenizer: [\s\-\.]+
|
||||
```
|
||||
|
||||
[7]: ../../../plugins/search/#configuration
|
||||
|
||||
#### `extra.social.*`
|
||||
|
||||
Social links stayed in the same place, but the `type` key was renamed to `icon`
|
||||
in order to match the new way of specifying which icon to be used:
|
||||
|
||||
=== "5.x"
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
social:
|
||||
- icon: fontawesome/brands/github-alt
|
||||
link: https://github.com/squidfunk
|
||||
```
|
||||
|
||||
=== "4.x"
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
social:
|
||||
- type: github
|
||||
link: https://github.com/squidfunk
|
||||
```
|
||||
|
||||
### Changes to `*.html` files
|
||||
|
||||
The templates have undergone a set of changes to make them future-proof. If
|
||||
you've used theme extension to override a block or template, make sure that it
|
||||
matches the new structure:
|
||||
|
||||
- If you've overridden a **block**, check `base.html` for potential changes
|
||||
- If you've overridden a **template**, check the respective `*.html` file for
|
||||
potential changes
|
||||
|
||||
#### `base.html`
|
||||
|
||||
``` diff
|
||||
@@ -2,7 +2,6 @@
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% import "partials/language.html" as lang with context %}
|
||||
-{% set feature = config.theme.feature %}
|
||||
{% set palette = config.theme.palette %}
|
||||
{% set font = config.theme.font %}
|
||||
<!doctype html>
|
||||
@@ -30,19 +29,6 @@
|
||||
{% elif config.site_author %}
|
||||
<meta name="author" content="{{ config.site_author }}">
|
||||
{% endif %}
|
||||
- {% for key in [
|
||||
- "clipboard.copy",
|
||||
- "clipboard.copied",
|
||||
- "search.language",
|
||||
- "search.pipeline.stopwords",
|
||||
- "search.pipeline.trimmer",
|
||||
- "search.result.none",
|
||||
- "search.result.one",
|
||||
- "search.result.other",
|
||||
- "search.tokenizer"
|
||||
- ] %}
|
||||
- <meta name="lang:{{ key }}" content="{{ lang.t(key) }}">
|
||||
- {% endfor %}
|
||||
<link rel="shortcut icon" href="{{ config.theme.favicon | url }}">
|
||||
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-5.0.0b2-1">
|
||||
{% endblock %}
|
||||
@@ -56,9 +42,9 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
- <link rel="stylesheet" href="{{ 'assets/stylesheets/application.********.css' | url }}">
|
||||
+ <link rel="stylesheet" href="{{ 'assets/stylesheets/main.********.min.css' | url }}">
|
||||
{% if palette.primary or palette.accent %}
|
||||
- <link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.********.css' | url }}">
|
||||
+ <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.********.min.css' | url }}">
|
||||
{% endif %}
|
||||
{% if palette.primary %}
|
||||
{% import "partials/palette.html" as map %}
|
||||
@@ -69,20 +55,17 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block libs %}
|
||||
- <script src="{{ 'assets/javascripts/modernizr.********.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
{% block fonts %}
|
||||
{% if font != false %}
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{
|
||||
font.text | replace(' ', '+') + ':300,400,400i,700%7C' +
|
||||
font.code | replace(' ', '+')
|
||||
}}&display=fallback">
|
||||
<style>body,input{font-family:"{{ font.text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}","Courier New",Courier,monospace}</style>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
- <link rel="stylesheet" href="{{ 'assets/fonts/material-icons.css' | url }}">
|
||||
{% if config.extra.manifest %}
|
||||
<link rel="manifest" href="{{ config.extra.manifest | url }}" crossorigin="use-credentials">
|
||||
{% endif %}
|
||||
@@ -95,47 +78,46 @@
|
||||
{% endblock %}
|
||||
{% block extrahead %}{% endblock %}
|
||||
</head>
|
||||
+ {% set direction = config.theme.direction | default(lang.t('direction')) %}
|
||||
{% if palette.primary or palette.accent %}
|
||||
{% set primary = palette.primary | replace(" ", "-") | lower %}
|
||||
{% set accent = palette.accent | replace(" ", "-") | lower %}
|
||||
- <body dir="{{ lang.t('direction') }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}">
|
||||
+ <body dir="{{ direction }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}">
|
||||
{% else %}
|
||||
- <body dir="{{ lang.t('direction') }}">
|
||||
+ <body dir="{{ direction }}">
|
||||
{% endif %}
|
||||
- <svg class="md-svg">
|
||||
- <defs>
|
||||
- {% set platform = config.extra.repo_icon or config.repo_url %}
|
||||
- {% if "github" in platform %}
|
||||
- {% include "assets/images/icons/github.f0b8504a.svg" %}
|
||||
- {% elif "gitlab" in platform %}
|
||||
- {% include "assets/images/icons/gitlab.6dd19c00.svg" %}
|
||||
- {% elif "bitbucket" in platform %}
|
||||
- {% include "assets/images/icons/bitbucket.1b09e088.svg" %}
|
||||
- {% endif %}
|
||||
- </defs>
|
||||
- </svg>
|
||||
<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" data-md-component="overlay" for="__drawer"></label>
|
||||
+ <label class="md-overlay" for="__drawer"></label>
|
||||
{% if page.toc | first is defined %}
|
||||
- <a href="{{ (page.toc | first).url }}" tabindex="0" class="md-skip">
|
||||
+ {% set skip = page.toc | first %}
|
||||
+ <a href="{{ skip.url | url }}" class="md-skip" data-md-component="skip">
|
||||
{{ lang.t('skip.link.title') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
+ {% if self.announce() %}
|
||||
+ <aside class="md-announce" data-md-component="announce">
|
||||
+ <div class="md-announce__inner md-grid md-typeset">
|
||||
+ {% block announce %}{% endblock %}
|
||||
+ </div>
|
||||
+ </aside>
|
||||
+ {% endif %}
|
||||
{% block header %}
|
||||
{% include "partials/header.html" %}
|
||||
{% endblock %}
|
||||
- <div class="md-container">
|
||||
+ <div class="md-container" data-md-component="container">
|
||||
{% block hero %}
|
||||
{% if page and page.meta and page.meta.hero %}
|
||||
{% include "partials/hero.html" with context %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
- {% if feature.tabs %}
|
||||
- {% include "partials/tabs.html" %}
|
||||
- {% endif %}
|
||||
+ {% block tabs %}
|
||||
+ {% if "tabs" in config.theme.features %}
|
||||
+ {% include "partials/tabs.html" %}
|
||||
+ {% endif %}
|
||||
+ {% endblock %}
|
||||
- <main class="md-main" role="main">
|
||||
- <div class="md-main__inner md-grid" data-md-component="container">
|
||||
+ <main class="md-main" data-md-component="main">
|
||||
+ <div class="md-main__inner md-grid">
|
||||
{% block site_nav %}
|
||||
{% if nav %}
|
||||
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
||||
@@ -160,41 +142,25 @@
|
||||
<article class="md-content__inner md-typeset">
|
||||
{% block content %}
|
||||
{% if page.edit_url %}
|
||||
- <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon"></a>
|
||||
+ <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-content__button md-icon">
|
||||
+ {% include ".icons/material/pencil.svg" %}
|
||||
+ </a>
|
||||
{% endif %}
|
||||
+ {% block source %}
|
||||
+ {% if page and page.meta and page.meta.source %}
|
||||
+ {% include "partials/source-link.html" %}
|
||||
+ {% endif %}
|
||||
+ {% endblock %}
|
||||
{% if not "\x3ch1" in page.content %}
|
||||
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
||||
{% endif %}
|
||||
{{ page.content }}
|
||||
- {% block source %}
|
||||
- {% if page and page.meta and page.meta.source %}
|
||||
- <h2 id="__source">{{ lang.t("meta.source") }}</h2>
|
||||
- {% set repo = config.repo_url %}
|
||||
- {% if repo | last == "/" %}
|
||||
- {% set repo = repo[:-1] %}
|
||||
- {% endif %}
|
||||
- {% set path = page.meta.path | default([""]) %}
|
||||
- {% set file = page.meta.source %}
|
||||
- <a href="{{ [repo, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
|
||||
- {{ file }}
|
||||
- </a>
|
||||
- {% endif %}
|
||||
- {% endblock %}
|
||||
+ {% if page and page.meta %}
|
||||
+ {% if page.meta.git_revision_date_localized or
|
||||
+ page.meta.revision_date
|
||||
+ %}
|
||||
+ {% include "partials/source-date.html" %}
|
||||
- {% if page and page.meta and (
|
||||
- page.meta.git_revision_date_localized or
|
||||
- page.meta.revision_date
|
||||
- ) %}
|
||||
- {% set label = lang.t("source.revision.date") %}
|
||||
- <hr>
|
||||
- <div class="md-source-date">
|
||||
- <small>
|
||||
- {% if page.meta.git_revision_date_localized %}
|
||||
- {{ label }}: {{ page.meta.git_revision_date_localized }}
|
||||
- {% elif page.meta.revision_date %}
|
||||
- {{ label }}: {{ page.meta.revision_date }}
|
||||
- {% endif %}
|
||||
- </small>
|
||||
- </div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block disqus %}
|
||||
@@ -208,29 +174,40 @@
|
||||
{% include "partials/footer.html" %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
+ {% block config %}
|
||||
+ <script>var __config={}</script>
|
||||
+ {% endblock %}
|
||||
{% block scripts %}
|
||||
- <script src="{{ 'assets/javascripts/application.df00da5d.js' | url }}"></script>
|
||||
- {% if lang.t("search.language") != "en" %}
|
||||
- {% set languages = lang.t("search.language").split(",") %}
|
||||
- {% if languages | length and languages[0] != "" %}
|
||||
- {% set path = "assets/javascripts/lunr/" %}
|
||||
- <script src="{{ (path ~ 'lunr.stemmer.support.js') | url }}"></script>
|
||||
- {% for language in languages | map("trim") %}
|
||||
- {% if language != "en" %}
|
||||
- {% if language == "ja" %}
|
||||
- <script src="{{ (path ~ 'tinyseg.js') | url }}"></script>
|
||||
- {% endif %}
|
||||
- {% if language in ("ar", "da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "vi") %}
|
||||
- <script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}"></script>
|
||||
- {% endif %}
|
||||
- {% endif %}
|
||||
- {% endfor %}
|
||||
- {% if languages | length > 1 %}
|
||||
- <script src="{{ (path ~ 'lunr.multi.js') | url }}"></script>
|
||||
- {% endif %}
|
||||
- {% endif %}
|
||||
- {% endif %}
|
||||
- <script>app.initialize({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script>
|
||||
+ <script src="{{ 'assets/javascripts/vendor.31a2e7b9.min.js' | url }}"></script>
|
||||
+ <script src="{{ 'assets/javascripts/bundle.5b33ad8d.min.js' | url }}"></script>
|
||||
+ {%- set translations = {} -%}
|
||||
+ {%- for key in [
|
||||
+ "clipboard.copy",
|
||||
+ "clipboard.copied",
|
||||
+ "search.config.lang",
|
||||
+ "search.config.pipeline",
|
||||
+ "search.config.separator",
|
||||
+ "search.result.placeholder",
|
||||
+ "search.result.none",
|
||||
+ "search.result.one",
|
||||
+ "search.result.other"
|
||||
+ ] -%}
|
||||
+ {%- set _ = translations.update({ key: lang.t(key) }) -%}
|
||||
+ {%- endfor -%}
|
||||
+ <script id="__lang" type="application/json">
|
||||
+ {{ translations | tojson }}
|
||||
+ </script>
|
||||
+ <script>
|
||||
+ __material = initialize(Object.assign({
|
||||
+ url: {
|
||||
+ base: "{{ base_url }}",
|
||||
+ worker: {
|
||||
+ search: "{{ 'assets/javascripts/worker/search.edc88caf.min.js' | url }}"
|
||||
+ }
|
||||
+ },
|
||||
+ features: {{ config.theme.features | tojson }}
|
||||
+ }, __config))
|
||||
+ </script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
```
|
||||
|
||||
#### `partials/footer.html`
|
||||
|
||||
``` diff
|
||||
@@ -7,32 +7,32 @@
|
||||
<div class="md-footer-nav">
|
||||
<nav class="md-footer-nav__inner md-grid">
|
||||
{% if page.previous_page %}
|
||||
- <a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title | striptags }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
- <div class="md-flex__cell md-flex__cell--shrink">
|
||||
- <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
|
||||
+ <a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title | striptags }}" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||
+ <div class="md-footer-nav__button md-icon">
|
||||
+ {% include ".icons/material/arrow-left.svg" %}
|
||||
</div>
|
||||
- <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
||||
- <span class="md-flex__ellipsis">
|
||||
+ <div class="md-footer-nav__title">
|
||||
+ <div class="md-ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
{{ lang.t("footer.previous") }}
|
||||
</span>
|
||||
{{ page.previous_page.title }}
|
||||
- </span>
|
||||
+ </div>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if page.next_page %}
|
||||
- <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | striptags }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||
- <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
|
||||
- <span class="md-flex__ellipsis">
|
||||
+ <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | striptags }}" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||
+ <div class="md-footer-nav__title">
|
||||
+ <div class="md-ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
{{ lang.t("footer.next") }}
|
||||
</span>
|
||||
{{ page.next_page.title }}
|
||||
- </span>
|
||||
+ </div>
|
||||
</div>
|
||||
- <div class="md-flex__cell md-flex__cell--shrink">
|
||||
- <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
|
||||
+ <div class="md-footer-nav__button md-icon">
|
||||
+ {% include ".icons/material/arrow-right.svg" %}
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
```
|
||||
|
||||
#### `partials/header.html`
|
||||
|
||||
``` diff
|
||||
@@ -3,50 +3,44 @@
|
||||
-#}
|
||||
<header class="md-header" data-md-component="header">
|
||||
<nav class="md-header-nav md-grid">
|
||||
- <div class="md-flex">
|
||||
- <div class="md-flex__cell md-flex__cell--shrink">
|
||||
- <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" aria-label="{{ config.site_name }}" class="md-header-nav__button md-logo">
|
||||
- {% if config.theme.logo.icon %}
|
||||
- <i class="md-icon">{{ config.theme.logo.icon }}</i>
|
||||
- {% else %}
|
||||
- <img alt="logo" src="{{ config.theme.logo | url }}" width="24" height="24">
|
||||
- {% endif %}
|
||||
- </a>
|
||||
- </div>
|
||||
- <div class="md-flex__cell md-flex__cell--shrink">
|
||||
- <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
|
||||
- </div>
|
||||
- <div class="md-flex__cell md-flex__cell--stretch">
|
||||
- <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
|
||||
- {% if config.site_name == page.title %}
|
||||
+ <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" aria-label="{{ config.site_name }}" class="md-header-nav__button md-logo">
|
||||
+ {% if config.theme.logo %}
|
||||
+ <img src="{{ config.theme.logo | url }}" alt="logo">
|
||||
+ {% else %}
|
||||
+ {% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
||||
+ {% endif %}
|
||||
+ </a>
|
||||
+ <label class="md-header-nav__button md-icon" for="__drawer">
|
||||
+ {% include ".icons/material/menu" ~ ".svg" %}
|
||||
+ </label>
|
||||
+ <div class="md-header-nav__title" data-md-component="header-title">
|
||||
+ <div class="md-header-nav__ellipsis md-ellipsis">
|
||||
+ {% if config.site_name == page.title %}
|
||||
+ {{ config.site_name }}
|
||||
+ {% else %}
|
||||
+ <span class="md-header-nav__topic">
|
||||
{{ config.site_name }}
|
||||
- {% else %}
|
||||
- <span class="md-header-nav__topic">
|
||||
- {{ config.site_name }}
|
||||
- </span>
|
||||
- <span class="md-header-nav__topic">
|
||||
- {% if page and page.meta and page.meta.title %}
|
||||
- {{ page.meta.title }}
|
||||
- {% else %}
|
||||
- {{ page.title }}
|
||||
- {% endif %}
|
||||
- </span>
|
||||
- {% endif %}
|
||||
- </div>
|
||||
- </div>
|
||||
- <div class="md-flex__cell md-flex__cell--shrink">
|
||||
- {% if "search" in config["plugins"] %}
|
||||
- <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
|
||||
- {% include "partials/search.html" %}
|
||||
+ </span>
|
||||
+ <span class="md-header-nav__topic">
|
||||
+ {% if page and page.meta and page.meta.title %}
|
||||
+ {{ page.meta.title }}
|
||||
+ {% else %}
|
||||
+ {{ page.title }}
|
||||
+ {% endif %}
|
||||
+ </span>
|
||||
{% endif %}
|
||||
</div>
|
||||
- {% if config.repo_url %}
|
||||
- <div class="md-flex__cell md-flex__cell--shrink">
|
||||
- <div class="md-header-nav__source">
|
||||
- {% include "partials/source.html" %}
|
||||
- </div>
|
||||
- </div>
|
||||
- {% endif %}
|
||||
</div>
|
||||
+ {% if "search" in config["plugins"] %}
|
||||
+ <label class="md-header-nav__button md-icon" for="__search">
|
||||
+ {% include ".icons/material/magnify.svg" %}
|
||||
+ </label>
|
||||
+ {% include "partials/search.html" %}
|
||||
+ {% endif %}
|
||||
+ {% if config.repo_url %}
|
||||
+ <div class="md-header-nav__source">
|
||||
+ {% include "partials/source.html" %}
|
||||
+ </div>
|
||||
+ {% endif %}
|
||||
</nav>
|
||||
</header>
|
||||
```
|
||||
|
||||
#### `partials/hero.html`
|
||||
|
||||
``` diff
|
||||
@@ -1,9 +1,8 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
-{% set feature = config.theme.feature %}
|
||||
{% set class = "md-hero" %}
|
||||
-{% if not feature.tabs %}
|
||||
+{% if "tabs" not in config.theme.features %}
|
||||
{% set class = "md-hero md-hero--expand" %}
|
||||
{% endif %}
|
||||
<div class="{{ class }}" data-md-component="hero">
|
||||
```
|
||||
|
||||
#### `partials/language.html`
|
||||
|
||||
``` diff
|
||||
@@ -3,12 +3,4 @@
|
||||
-#}
|
||||
{% import "partials/language/" + config.theme.language + ".html" as lang %}
|
||||
{% import "partials/language/en.html" as fallback %}
|
||||
-{% macro t(key) %}{{ {
|
||||
- "direction": config.theme.direction,
|
||||
- "search.language": (
|
||||
- config.extra.search | default({})
|
||||
- ).language,
|
||||
- "search.tokenizer": (
|
||||
- config.extra.search | default({})
|
||||
- ).tokenizer | default("", true),
|
||||
-}[key] or lang.t(key) or fallback.t(key) }}{% endmacro %}
|
||||
+{% macro t(key) %}{{ lang.t(key) | default(fallback.t(key)) }}{% endmacro %}
|
||||
```
|
||||
|
||||
#### `partials/nav-item.html`
|
||||
|
||||
``` diff
|
||||
@@ -14,9 +14,15 @@
|
||||
{% endif %}
|
||||
<label class="md-nav__link" for="{{ path }}">
|
||||
{{ nav_item.title }}
|
||||
+ <span class="md-nav__icon md-icon">
|
||||
+ {% include ".icons/material/chevron-right.svg" %}
|
||||
+ </span>
|
||||
</label>
|
||||
- <nav class="md-nav" data-md-component="collapsible" data-md-level="{{ level }}">
|
||||
+ <nav class="md-nav" data-md-level="{{ level }}">
|
||||
<label class="md-nav__title" for="{{ path }}">
|
||||
+ <span class="md-nav__icon md-icon">
|
||||
+ {% include ".icons/material/arrow-left.svg" %}
|
||||
+ </span>
|
||||
{{ nav_item.title }}
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
@@ -39,6 +45,9 @@
|
||||
{% if toc_ | first is defined %}
|
||||
<label class="md-nav__link md-nav__link--active" for="__toc">
|
||||
{{ nav_item.title }}
|
||||
+ <span class="md-nav__icon md-icon">
|
||||
+ {% include ".icons/material/table-of-contents.svg" %}
|
||||
+ </span>
|
||||
</label>
|
||||
{% endif %}
|
||||
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title | striptags }}" class="md-nav__link md-nav__link--active">
|
||||
```
|
||||
|
||||
#### `partials/nav.html`
|
||||
|
||||
``` diff
|
||||
@@ -2,12 +2,12 @@
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
<nav class="md-nav md-nav--primary" data-md-level="0">
|
||||
- <label class="md-nav__title md-nav__title--site" for="__drawer">
|
||||
- <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-nav__button md-logo">
|
||||
- {% if config.theme.logo.icon %}
|
||||
- <i class="md-icon">{{ config.theme.logo.icon }}</i>
|
||||
+ <label class="md-nav__title" for="__drawer">
|
||||
+ <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" aria-label="{{ config.site_name }}" class="md-nav__button md-logo">
|
||||
+ {% if config.theme.logo %}
|
||||
+ <img src="{{ config.theme.logo | url }}" alt="logo">
|
||||
{% else %}
|
||||
- <img alt="logo" src="{{ config.theme.logo | url }}" width="48" height="48">
|
||||
+ {% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
|
||||
{% endif %}
|
||||
</a>
|
||||
{{ config.site_name }}
|
||||
```
|
||||
|
||||
#### `partials/search.html`
|
||||
|
||||
``` diff
|
||||
@@ -6,15 +6,18 @@
|
||||
<label class="md-search__overlay" for="__search"></label>
|
||||
<div class="md-search__inner" role="search">
|
||||
<form class="md-search__form" name="search">
|
||||
- <input type="text" class="md-search__input" aria-label="search" name="query" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
|
||||
+ <input type="text" class="md-search__input" name="query" aria-label="search" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
|
||||
<label class="md-search__icon md-icon" for="__search">
|
||||
+ {% include ".icons/material/magnify.svg" %}
|
||||
+ {% include ".icons/material/arrow-left.svg" %}
|
||||
</label>
|
||||
- <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
|
||||
- 
|
||||
+ <button type="reset" class="md-search__icon md-icon" data-md-component="search-reset" tabindex="-1">
|
||||
+ {% include ".icons/material/close.svg" %}
|
||||
</button>
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||||
- <div class="md-search-result" data-md-component="result">
|
||||
+ <div class="md-search-result" data-md-component="search-result">
|
||||
<div class="md-search-result__meta">
|
||||
{{ lang.t("search.result.placeholder") }}
|
||||
</div>
|
||||
```
|
||||
|
||||
#### `partials/social.html`
|
||||
|
||||
``` diff
|
||||
@@ -3,9 +3,10 @@
|
||||
-#}
|
||||
{% if config.extra.social %}
|
||||
<div class="md-footer-social">
|
||||
- <link rel="stylesheet" href="{{ 'assets/fonts/font-awesome.css' | url }}">
|
||||
{% for social in config.extra.social %}
|
||||
- <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ social.type }}" class="md-footer-social__link fa fa-{{ social.type }}"></a>
|
||||
+ <a href="{{ social.link }}" target="_blank" rel="noopener" class="md-footer-social__link">
|
||||
+ {% include ".icons/" ~ social.icon ~ ".svg" %}
|
||||
+ </a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
```
|
||||
|
||||
#### `partials/source-date.html`
|
||||
|
||||
``` diff
|
||||
@@ -0,0 +1,15 @@
|
||||
+{#-
|
||||
+ This file was automatically generated - do not edit
|
||||
+-#}
|
||||
+{% import "partials/language.html" as lang with context %}
|
||||
+{% set label = lang.t("source.revision.date") %}
|
||||
+<hr>
|
||||
+<div class="md-source-date">
|
||||
+ <small>
|
||||
+ {% if page.meta.git_revision_date_localized %}
|
||||
+ {{ label }}: {{ page.meta.git_revision_date_localized }}
|
||||
+ {% elif page.meta.revision_date %}
|
||||
+ {{ label }}: {{ page.meta.revision_date }}
|
||||
+ {% endif %}
|
||||
+ </small>
|
||||
+</div>
|
||||
```
|
||||
|
||||
#### `partials/source-link.html`
|
||||
|
||||
``` diff
|
||||
@@ -0,0 +1,17 @@
|
||||
+{#-
|
||||
+ This file was automatically generated - do not edit
|
||||
+-#}
|
||||
+{% import "partials/language.html" as lang with context %}
|
||||
+{% set repo = config.repo_url %}
|
||||
+{% if repo | last == "/" %}
|
||||
+ {% set repo = repo[:-1] %}
|
||||
+{% endif %}
|
||||
+{% set path = page.meta.path | default([""]) %}
|
||||
+{% set file = page.meta.source %}
|
||||
+{% set repo_icon = config.extra.repo_icon | default(
|
||||
+ "fontawesome/brands/git-alt"
|
||||
+) %}
|
||||
+<a href="{{ [repo, path, page.meta.source] | join('/') }}" title="{{ file }}" class="md-content__button md-icon">
|
||||
+ {{ lang.t("meta.source") }}
|
||||
+ {% include ".icons/" ~ repo_icon ~ ".svg" %}
|
||||
+</a>
|
||||
```
|
||||
|
||||
#### `partials/source.html`
|
||||
|
||||
``` diff
|
||||
@@ -2,24 +2,10 @@
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% import "partials/language.html" as lang with context %}
|
||||
-{% set platform = config.extra.repo_icon or config.repo_url %}
|
||||
-{% if "github" in platform %}
|
||||
- {% set repo_type = "github" %}
|
||||
-{% elif "gitlab" in platform %}
|
||||
- {% set repo_type = "gitlab" %}
|
||||
-{% elif "bitbucket" in platform %}
|
||||
- {% set repo_type = "bitbucket" %}
|
||||
-{% else %}
|
||||
- {% set repo_type = "" %}
|
||||
-{% endif %}
|
||||
-<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
|
||||
- {% if repo_type %}
|
||||
- <div class="md-source__icon">
|
||||
- <svg viewBox="0 0 24 24" width="24" height="24">
|
||||
- <use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
|
||||
- </svg>
|
||||
- </div>
|
||||
- {% endif %}
|
||||
+<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source">
|
||||
+ <div class="md-source__icon md-icon">
|
||||
+ {% include ".icons/" ~ config.theme.icon.repo ~ ".svg" %}
|
||||
+ </div>
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
</div>
|
||||
```
|
||||
|
||||
#### `partials/tabs-item.html`
|
||||
|
||||
``` diff
|
||||
@@ -1,7 +1,7 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
-{% if nav_item.is_homepage %}
|
||||
+{% if nav_item.is_homepage or nav_item.url == "index.html" %}
|
||||
<li class="md-tabs__item">
|
||||
{% if not page.ancestors | length and nav | selectattr("url", page.url) %}
|
||||
<a href="{{ nav_item.url | url }}" class="md-tabs__link md-tabs__link--active">
|
||||
```
|
||||
|
||||
#### `partials/toc.html`
|
||||
|
||||
``` diff
|
||||
@@ -8,29 +8,16 @@
|
||||
-#}
|
||||
{% endif %}
|
||||
{% if toc | first is defined %}
|
||||
<label class="md-nav__title" for="__toc">
|
||||
+ <span class="md-nav__icon md-icon">
|
||||
+ {% include ".icons/material/arrow-left.svg" %}
|
||||
+ </span>
|
||||
{{ lang.t("toc.title") }}
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
{% for toc_item in toc %}
|
||||
{% include "partials/toc-item.html" %}
|
||||
{% endfor %}
|
||||
- {% if page.meta.source and page.meta.source | length > 0 %}
|
||||
- <li class="md-nav__item">
|
||||
- <a href="#__source" class="md-nav__link md-nav__link--active">
|
||||
- {{ lang.t("meta.source") }}
|
||||
- </a>
|
||||
- </li>
|
||||
- {% endif %}
|
||||
- {% set disqus = config.extra.disqus %}
|
||||
- {% if page and page.meta and page.meta.disqus is string %}
|
||||
- {% set disqus = page.meta.disqus %}
|
||||
- {% endif %}
|
||||
- {% if not page.is_homepage and disqus %}
|
||||
- <li class="md-nav__item">
|
||||
- <a href="#__comments" class="md-nav__link md-nav__link--active">
|
||||
- {{ lang.t("meta.comments") }}
|
||||
- </a>
|
||||
- </li>
|
||||
- {% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</nav>
|
||||
```
|
@ -1,49 +0,0 @@
|
||||
# Migration
|
||||
|
||||
### Material 3.x to 4.x
|
||||
|
||||
* Material for MkDocs 4.x finally fixes incorrect layout on Chinese systems.
|
||||
The fix includes a mandatory change of the base font-size from `10px` to
|
||||
`20px` which means all `rem` values needed to be updated. Within the theme,
|
||||
`px` to `rem` calculation is now encapsulated in a new function called
|
||||
`px2rem` which is part of the SASS code base.
|
||||
|
||||
* If you use Material with custom CSS that is based on `rem` values, note that
|
||||
those values must now be divided by 2. Now, `1.0rem` doesn't map to `10px`,
|
||||
but `20px`. To learn more about the problem and implications, please refer
|
||||
to [the issue][2] in which the problem was discovered and fixed.
|
||||
|
||||
[2]: https://github.com/squidfunk/mkdocs-material/issues/911
|
||||
|
||||
### Material 2.x to 3.x
|
||||
|
||||
* Material for MkDocs 3.x requires MkDocs 1.0 because the way paths are resolved
|
||||
internally changed significantly. Furthermore, `pages` was renamed to `nav`,
|
||||
so remember to adjust your `mkdocs.yml` file.
|
||||
|
||||
* All extended templates *should* continue to work but in order to make them
|
||||
future-proof the `url` filter should be introduced on all paths. Please see
|
||||
the [official release notes][1] for further guidance.
|
||||
|
||||
[1]: https://www.mkdocs.org/about/release-notes/#version-10-2018-08-03
|
||||
|
||||
### Material 1.x to 2.x
|
||||
|
||||
* Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced
|
||||
changes to the way themes can define options. The following variables inside
|
||||
your project's `mkdocs.yml` need to be renamed:
|
||||
|
||||
* `extra.feature` becomes `theme.feature`
|
||||
* `extra.palette` becomes `theme.palette`
|
||||
* `extra.font` becomes `theme.font`
|
||||
* `extra.logo` becomes `theme.logo`
|
||||
|
||||
* Favicon support has been dropped by MkDocs, it must now be defined in
|
||||
`theme.favicon` (previously `site_favicon`).
|
||||
|
||||
* Localization is now separated into theme language and search language. While
|
||||
there can only be a single language on theme-level, the search supports
|
||||
multiple languages which can be separated by commas. See the getting started
|
||||
guide for more guidance.
|
||||
|
||||
* The search tokenizer can now be set through `extra.search.tokenizer`.
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
24
material/assets/javascripts/vendor.264ccd72.min.js
vendored
Normal file
24
material/assets/javascripts/vendor.264ccd72.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/vendor.264ccd72.min.js.map
Normal file
1
material/assets/javascripts/vendor.264ccd72.min.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
{
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.bc2a2a8a.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.bc2a2a8a.min.js.map",
|
||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.8ffe16eb.min.js",
|
||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.8ffe16eb.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.f67bf828.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.f67bf828.min.js.map",
|
||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.264ccd72.min.js",
|
||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.264ccd72.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.542c1c70.min.js",
|
||||
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.542c1c70.min.js.map",
|
||||
"assets/stylesheets/main.css": "assets/stylesheets/main.0bf868a3.min.css",
|
||||
"assets/stylesheets/main.css": "assets/stylesheets/main.405513d5.min.css",
|
||||
"assets/stylesheets/palette.css": "assets/stylesheets/palette.31180ff2.min.css"
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -41,7 +41,7 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.0bf868a3.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.405513d5.min.css' | url }}">
|
||||
{% if palette.primary or palette.accent %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.31180ff2.min.css' | url }}">
|
||||
{% endif %}
|
||||
@ -177,8 +177,8 @@
|
||||
<script>var __config={}</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/vendor.8ffe16eb.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.bc2a2a8a.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/vendor.264ccd72.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.f67bf828.min.js' | url }}"></script>
|
||||
{%- set translations = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -30,7 +30,7 @@ repo_url: https://github.com/squidfunk/mkdocs-material
|
||||
edit_uri: ""
|
||||
|
||||
# Copyright
|
||||
copyright: 'Copyright © 2016 - 2020 Martin Donath'
|
||||
copyright: Copyright © 2016 - 2020 Martin Donath
|
||||
|
||||
# Configuration
|
||||
theme:
|
||||
@ -137,8 +137,9 @@ nav:
|
||||
- Minification: plugins/minification.md
|
||||
- Revision date: plugins/revision-date.md
|
||||
- Releases:
|
||||
- Material for MkDocs 5: releases/5.md
|
||||
- Material for MkDocs 4: releases/4.md
|
||||
- Changelog: releases/changelog.md
|
||||
- Migration: releases/migration.md
|
||||
- Customization: customization.md
|
||||
- Data privacy: data-privacy.md
|
||||
- Contributing: contributing.md
|
||||
|
@ -149,5 +149,15 @@
|
||||
margin-left: initial;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset code inside Admonition titles
|
||||
> code {
|
||||
margin: inherit;
|
||||
padding: inherit;
|
||||
color: inherit;
|
||||
background-color: inherit;
|
||||
border-radius: initial;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user