1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-30 18:24:35 +01:00

Added main template override for official docs

This commit is contained in:
squidfunk 2020-03-26 11:19:20 +01:00
parent 4b700c3dc7
commit 05114b9f2a
30 changed files with 121 additions and 28 deletions

View File

@ -21,6 +21,7 @@
# Distribution files
docs
material
src/**/*.html
# Don't lint shame
src/assets/stylesheets/_shame.scss

View File

@ -1 +1,5 @@
---
template: overrides/main.html
---
--8<-- "CONTRIBUTING.md"

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Customization
## A great starting point

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Data privacy
In itself, Material for MkDocs does not perform any tracking and should adhere

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Admonition
[Admonition][1] is an extension included in the standard Markdown library that

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# CodeHilite
[CodeHilite][1] is an extension that adds syntax highlighting to code blocks

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Footnotes
[Footnotes][1] is another extension included in the standard Markdown library.

View File

@ -1,4 +1,5 @@
---
template: overrides/main.html
hero: Set heroes with metadata
path: tree/master/docs/extensions
source: metadata.md

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Permalinks
Permalinks are a feature of the [Table of Contents][1] extension, which is part

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# PyMdown Extensions
[PyMdown Extensions][1] is a collection of Markdown extensions that add some

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Getting started
## Installation
@ -69,7 +73,7 @@ minutes, as it comes with all dependencies pre-installed. Pull the image for the
docker pull squidfunk/mkdocs-material
```
The `mkdocs` executable is provided as an entrypoint and `serve` is the default
The `mkdocs` executable is provided as an entry point and `serve` is the default
command. Start the development server in your project root the folder where
`mkdocs.yml` resides — with:
@ -113,9 +117,8 @@ Material for MkDocs can be installed with [Chocolatey][9]:
choco install mkdocs-material
```
Note that this is an [unofficial package][10] of Material for MkDocs, so please
understand that the maintainers cannot provide any support for when using this
method.
As this is an [unofficial package][10] of Material for MkDocs, please understand
that the maintainers cannot provide any support for when using this method.
[9]: https://chocolatey.org
[10]: https://chocolatey.org/packages/mkdocs-material
@ -124,7 +127,7 @@ method.
Depending on your installation method, you can now add the following lines to
`mkdocs.yml` in your project root. If you installed Material for MkDocs using
a package manager add:
a package manager, add:
``` yaml
theme:
@ -320,8 +323,8 @@ The following language codes are supported:
</ul>
While many languages are read `ltr` (left-to-right), Material for MkDocs also
supports `rtl` (right-to-left) directionality which is deduced from the selected
language, but can also be set with:
supports `rtl` (right-to-left) directionality which is inferred from the
selected language, but can also be set with:
``` yaml
theme:
@ -653,8 +656,8 @@ google_analytics:
### Disqus
Material for MkDocs is integrated with [Disqus][24], so if you want to add a
comments section to your documentation set the shortname of your Disqus project
in `mkdocs.yml`:
comments section to your documentation set the _shortname_ of your Disqus
project in `mkdocs.yml`:
``` yaml
extra:

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Awesome pages
The [mkdocs-awesome-pages-plugin][1] omits the need to specify all pages in the

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Minification
The [mkdocs-minify-plugin][1] will minify all `*.html` files generated by

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Revision date
The [mkdocs-git-revision-date-localized-plugin][1] will add the date on which a

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Search
The [built-in search plugin][1] provides client-side search inside the browser

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Material for MkDocs 4
## Highlights

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Material for MkDocs 5
## Highlights

View File

@ -1,3 +1,7 @@
---
template: overrides/main.html
---
# Upgrading
To upgrade to the latest version:

View File

@ -1,10 +1,10 @@
{
"assets/javascripts/bundle.js": "assets/javascripts/bundle.e7d31590.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.e7d31590.min.js.map",
"assets/javascripts/bundle.js": "assets/javascripts/bundle.cad4abbb.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.cad4abbb.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.0c35f0aa.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.0c35f0aa.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.2613054f.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.2613054f.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.9b1b8b92.min.css",
"assets/stylesheets/main.css": "assets/stylesheets/main.b32d3181.min.css",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.4444686e.min.css"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -41,7 +41,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.9b1b8b92.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.b32d3181.min.css' | url }}">
{% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.4444686e.min.css' | url }}">
{% endif %}
@ -178,7 +178,7 @@
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.0c35f0aa.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.e7d31590.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.cad4abbb.min.js' | url }}"></script>
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",

View File

@ -119,8 +119,8 @@
transform: translateX(px2rem(5px));
opacity: 0;
transition:
transform 250ms 250ms,
color 250ms,
transform 250ms 250ms,
opacity 125ms 250ms;
// Adjust for right-to-left languages

View File

@ -37,8 +37,8 @@
opacity: 0;
transition:
color 250ms,
opacity 125ms,
visibility 0ms 500ms;
visibility 0ms 500ms
opacity 125ms;
// Adjust for RTL languages
[dir="rtl"] & {
@ -65,8 +65,8 @@
opacity: 1;
transition:
color 250ms,
opacity 125ms,
visibility 0ms;
visibility 0ms,
opacity 125ms;
}
// Active or targeted permalink

View File

@ -36,8 +36,8 @@
border: px2rem(2px) solid currentColor;
border-radius: px2rem(2px);
transition:
background-color 125ms,
color 125ms,
background-color 125ms,
border-color 125ms;
// Primary button

View File

@ -40,8 +40,8 @@
0 0 px2rem(4px) rgba(0, 0, 0, 0),
0 px2rem(4px) px2rem(8px) rgba(0, 0, 0, 0);
transition:
background-color 250ms,
color 250ms;
color 250ms,
background-color 250ms;
// Always hide shadow, in case JavaScript is not available
.no-js & {
@ -55,8 +55,8 @@
0 0 px2rem(4px) rgba(0, 0, 0, 0.1),
0 px2rem(4px) px2rem(8px) rgba(0, 0, 0, 0.2);
transition:
background-color 250ms,
color 250ms,
background-color 250ms,
box-shadow 250ms;
}

View File

@ -265,8 +265,8 @@ $md-toggle__search--checked:
background-color: var(--md-default-fg-color--lighter);
border-radius: px2rem(2px);
transition:
background-color 250ms,
color 250ms;
color 250ms,
background-color 250ms;
// Adjust for right-to-left languages
[dir="rtl"] & {

28
src/overrides/main.html Normal file
View File

@ -0,0 +1,28 @@
<!--
Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
{% extends "base.html" %}
<!-- Announcement bar -->
{% block announce %}
Material for MkDocs 5.0.0rc3
{% endblock %}