Browse Source

Merge branch 'pull-upstream' of charlesreid1/mkdocs-material into master

Charles Reid 1 year ago
parent
commit
b0c6890853
53 changed files with 12661 additions and 8636 deletions
  1. 54
    0
      CHANGELOG
  2. 2
    2
      CONTRIBUTING.md
  3. 1
    1
      Dockerfile
  4. 2
    0
      MANIFEST.in
  5. 47
    0
      docs/compliance.md
  6. 0
    1
      docs/contributing.md
  7. 82
    0
      docs/contributing.md
  8. 4
    4
      docs/customization.md
  9. 82
    2
      docs/extensions/codehilite.md
  10. 7
    4
      docs/extensions/pymdown.md
  11. 26
    17
      docs/getting-started.md
  12. 2
    2
      docs/index.md
  13. 79
    0
      docs/release-notes.md
  14. 4
    4
      docs/specimen.md
  15. 4
    0
      material/assets/fonts/font-awesome.css
  16. 13
    0
      material/assets/fonts/material-icons.css
  17. BIN
      material/assets/fonts/specimen/FontAwesome.ttf
  18. BIN
      material/assets/fonts/specimen/FontAwesome.woff
  19. BIN
      material/assets/fonts/specimen/FontAwesome.woff2
  20. BIN
      material/assets/fonts/specimen/MaterialIcons-Regular.ttf
  21. BIN
      material/assets/fonts/specimen/MaterialIcons-Regular.woff
  22. BIN
      material/assets/fonts/specimen/MaterialIcons-Regular.woff2
  23. 1
    1
      material/assets/images/icons/bitbucket.1b09e088.svg
  24. 1
    1
      material/assets/images/icons/github.f0b8504a.svg
  25. 1
    1
      material/assets/images/icons/gitlab.6dd19c00.svg
  26. 0
    1
      material/assets/javascripts/application.0cf9b500.js
  27. 1
    0
      material/assets/javascripts/application.e72fd936.js
  28. 1176
    0
      material/assets/stylesheets/application-palette.22915126.css
  29. 0
    2
      material/assets/stylesheets/application-palette.6079476c.css
  30. 2552
    0
      material/assets/stylesheets/application.451f80e5.css
  31. 0
    2
      material/assets/stylesheets/application.8d40d89b.css
  32. 30
    23
      material/base.html
  33. 3
    3
      material/partials/footer.html
  34. 4
    6
      material/partials/header.html
  35. 20
    0
      material/partials/language/cs.html
  36. 19
    0
      material/partials/language/fi.html
  37. 22
    0
      material/partials/language/hi.html
  38. 20
    0
      material/partials/language/sh.html
  39. 19
    0
      material/partials/language/sk.html
  40. 22
    0
      material/partials/language/sr.html
  41. 4
    4
      material/partials/nav-item.html
  42. 4
    6
      material/partials/nav.html
  43. 39
    0
      material/partials/palette.html
  44. 2
    2
      material/partials/search.html
  45. 1
    2
      material/partials/social.html
  46. 1
    1
      material/partials/source.html
  47. 5
    5
      material/partials/tabs-item.html
  48. 1
    1
      material/partials/toc.html
  49. 2
    1
      mkdocs.yml
  50. 8276
    8524
      package-lock.json
  51. 8
    7
      package.json
  52. 2
    5
      requirements.txt
  53. 16
    1
      webpack.config.js

+ 54
- 0
CHANGELOG View File

@@ -1,3 +1,57 @@
1
+mkdocs-material-3.0.3 (2018-08-07)
2
+
3
+  * Fixed #841: Additional path levels for extra CSS and JS
4
+
5
+mkdocs-material-3.0.2 (2018-08-06)
6
+
7
+  * Fixed #839: Lunr.js stemmer imports incorrect
8
+
9
+mkdocs-material-3.0.1 (2018-08-05)
10
+
11
+  * Fixed #838: Search result links incorrect
12
+
13
+mkdocs-material-3.0.0 (2018-08-05)
14
+
15
+  * Upgraded MkDocs to 1.0
16
+  * Upgraded Python in official Docker image to 3.6
17
+  * Added Serbian and Serbo-Croatian translations
18
+
19
+mkdocs-material-2.9.4 (2018-07-29)
20
+
21
+  * Fixed build error after MkDocs upgrade
22
+
23
+mkdocs-material-2.9.3 (2018-07-29)
24
+
25
+  * Added link to home for logo in drawer
26
+  * Fixed dependency problems between MkDocs and Tornado
27
+
28
+mkdocs-material-2.9.2 (2018-06-29)
29
+
30
+  * Added Hindi and Czech translations
31
+
32
+mkdocs-material-2.9.1 (2018-06-18)
33
+
34
+  * Added support for different spellings for theme color
35
+  * Fixed #799: Added support for web font minification in production
36
+  * Fixed #800: Added .highlighttable as an alias for .codehilitetable
37
+
38
+mkdocs-material-2.9.0 (2018-06-13)
39
+
40
+  * Added support for theme color on Android
41
+  * Fixed #796: Rendering of nested tabbed code blocks
42
+
43
+mkdocs-material-2.8.0 (2018-06-10)
44
+
45
+  * Added support for grouping code blocks with tabs
46
+  * Added Material and FontAwesome icon fonts to distribution files (GDPR)
47
+  * Added note on compliance with GDPR
48
+  * Added Slovak translations
49
+  * Fixed #790: Prefixed id attributes with "__" to avoid name clashes
50
+
51
+mkdocs-material-2.7.3 (2018-04-26)
52
+
53
+  * Added Finnish translations
54
+
1 55
 mkdocs-material-2.7.2 (2018-04-09)
2 56
 
3 57
   * Fixed rendering issue for details on Edge

+ 2
- 2
CONTRIBUTING.md View File

@@ -78,5 +78,5 @@ go ahead.
78 78
 After your PR is merged, you can safely delete your branch and pull the changes
79 79
 from the main (upstream) repository.
80 80
 
81
-  [4]: http://squidfunk.github.io/mkdocs-material/customization/#environment-setup
82
-  [5]: http://squidfunk.github.io/mkdocs-material/customization/#build-process
81
+  [4]: https://squidfunk.github.io/mkdocs-material/customization/#environment-setup
82
+  [5]: https://squidfunk.github.io/mkdocs-material/customization/#build-process

+ 1
- 1
Dockerfile View File

@@ -18,7 +18,7 @@
18 18
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 19
 # IN THE SOFTWARE.
20 20
 
21
-FROM jfloff/alpine-python:2.7-slim
21
+FROM jfloff/alpine-python:3.6-slim
22 22
 MAINTAINER Martin Donath <martin.donath@squidfunk.com>
23 23
 
24 24
 # Set build directory

+ 2
- 0
MANIFEST.in View File

@@ -1,5 +1,7 @@
1 1
 recursive-include material *.js *.css *.html *.svg *.png *.yml
2
+recursive-include material *.ttf *.woff *.woff2
2 3
 recursive-exclude site *
4
+recursive-exclude src *
3 5
 recursive-exclude * __pycache__
4 6
 recursive-exclude * *.py[co]
5 7
 include LICENSE

+ 47
- 0
docs/compliance.md View File

@@ -0,0 +1,47 @@
1
+# Compliance with GDPR
2
+
3
+## Material does not process any personal data
4
+
5
+Material is a theme for MkDocs, a static site generator. In itself, Material
6
+does not perform any tracking or processing of personal data. However, some of
7
+the third-party services that Material integrates with may actually be in breach
8
+with the [General Data Protection Regulation][1] (GDPR) and need to be evaluated
9
+carefully.
10
+
11
+  [1]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation
12
+
13
+## Third-party services
14
+
15
+### Google Fonts
16
+
17
+Material makes fonts [easily configurable][2] by relying on Google Fonts CDN.
18
+However, embedding fonts from Google is currently within a gray area as there's
19
+no official statement or ruling regarding GDPR compliance and the topic is still
20
+[actively discussed][3]. For this reason, if you need to ensure GDPR compiance,
21
+you should disable the usage of the Google Font CDN with:
22
+
23
+``` yaml
24
+theme:
25
+  font: false
26
+```
27
+
28
+When Google Fonts are disabled, Material will default to **Helvetica Neue** and
29
+**Monaco** with their corresponding fall backs, relying on system fonts. You
30
+could however include your own, self-hosted webfont by [overriding][4] the
31
+`fonts` block.
32
+
33
+The icon fonts (Material and FontAwesome) are bundled with the theme, and thus
34
+self-hosted so there's no third-party involved.
35
+
36
+  [2]: getting-started.md#font-family
37
+  [3]: https://github.com/google/fonts/issues/1495
38
+  [4]: customization.md/#overriding-template-blocks
39
+
40
+### Google Analytics and Disqus
41
+
42
+Material comes with [Google Analytics][4] and [Disqus][5] integrations that need
43
+to be *enabled explicitly*. Disable both integrations in order to be in
44
+compliance with the GDPR.
45
+
46
+  [5]: getting-started.md#google-analytics
47
+  [6]: getting-started.md#disqus

+ 0
- 1
docs/contributing.md View File

@@ -1 +0,0 @@
1
-../CONTRIBUTING.md

+ 82
- 0
docs/contributing.md View File

@@ -0,0 +1,82 @@
1
+# Contributing
2
+
3
+Interested in contributing to the Material theme? Want to report a bug? Before
4
+you do, please read the following guidelines.
5
+
6
+## Submission context
7
+
8
+### Got a question or problem?
9
+
10
+For quick questions there's no need to open an issue as you can reach us on
11
+[gitter.im][1].
12
+
13
+  [1]: https://gitter.im/squidfunk/mkdocs-material
14
+
15
+### Found a bug?
16
+
17
+If you found a bug in the source code, you can help us by submitting an issue
18
+to the [issue tracker][2] in our GitHub repository. Even better, you can submit
19
+a Pull Request with a fix. However, before doing so, please read the
20
+[submission guidelines][3].
21
+
22
+  [2]: https://github.com/squidfunk/mkdocs-material/issues
23
+  [3]: #submission-guidelines
24
+
25
+### Missing a feature?
26
+
27
+You can request a new feature by submitting an issue to our GitHub Repository.
28
+If you would like to implement a new feature, please submit an issue with a
29
+proposal for your work first, to be sure that it is of use for everyone, as
30
+the Material theme is highly opinionated. Please consider what kind of change
31
+it is:
32
+
33
+* For a **major feature**, first open an issue and outline your proposal so
34
+  that it can be discussed. This will also allow us to better coordinate our
35
+  efforts, prevent duplication of work, and help you to craft the change so
36
+  that it is successfully accepted into the project.
37
+
38
+* **Small features and bugs** can be crafted and directly submitted as a Pull
39
+  Request. However, there is no guarantee that your feature will make it into
40
+  the master, as it's always a matter of opinion whether if benefits the
41
+  overall functionality of the theme.
42
+
43
+## Submission guidelines
44
+
45
+### Submitting an issue
46
+
47
+Before you submit an issue, please search the issue tracker, maybe an issue for
48
+your problem already exists and the discussion might inform you of workarounds
49
+readily available.
50
+
51
+We want to fix all the issues as soon as possible, but before fixing a bug we
52
+need to reproduce and confirm it. In order to reproduce bugs we will
53
+systematically ask you to provide a minimal reproduction scenario using the
54
+custom issue template. Please stick to the issue template.
55
+
56
+Unfortunately we are not able to investigate / fix bugs without a minimal
57
+reproduction scenario, so if we don't hear back from you we may close the issue.
58
+
59
+### Submitting a Pull Request (PR)
60
+
61
+Search GitHub for an open or closed PR that relates to your submission. You
62
+don't want to duplicate effort. If you do not find a related issue or PR,
63
+go ahead.
64
+
65
+1. **Development**: Fork the project, set up the [development environment][4],
66
+  make your changes in a separate git branch and add descriptive messages to
67
+  your commits.
68
+
69
+2. **Build**: Before submitting a pull requests, [build the theme][5]. This is
70
+  a mandatory requirement for your PR to get accepted, as the theme should at
71
+  all times be installable through GitHub.
72
+
73
+3. **Pull Request**: After building the theme, commit the compiled output, push
74
+  your branch to GitHub and send a PR to `mkdocs-material:master`. If we
75
+  suggest changes, make the required updates, rebase your branch and push the
76
+  changes to your GitHub repository, which will automatically update your PR.
77
+
78
+After your PR is merged, you can safely delete your branch and pull the changes
79
+from the main (upstream) repository.
80
+
81
+  [4]: https://squidfunk.github.io/mkdocs-material/customization/#environment-setup
82
+  [5]: https://squidfunk.github.io/mkdocs-material/customization/#build-process

+ 4
- 4
docs/customization.md View File

@@ -13,7 +13,7 @@ necessary to preserve the desired style.
13 13
 few tweaks to an existing theme, you can just add your stylesheets and
14 14
 JavaScript files to the `docs` directory.
15 15
 
16
-  [1]: http://www.mkdocs.org
16
+  [1]: https://www.mkdocs.org
17 17
 
18 18
 ### Additional stylesheets
19 19
 
@@ -57,7 +57,7 @@ extra_javascript:
57 57
 
58 58
 Further assistance can be found in the [MkDocs documentation][2].
59 59
 
60
-  [2]: http://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme
60
+  [2]: https://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme
61 61
 
62 62
 ## Extending the theme
63 63
 
@@ -66,7 +66,7 @@ extend the theme. From version 0.16 on MkDocs implements [theme extension][3],
66 66
 an easy way to override parts of a theme without forking and changing the
67 67
 main theme.
68 68
 
69
-  [3]: http://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme_dir
69
+  [3]: https://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme-custom_dir
70 70
 
71 71
 ### Setup and theme structure
72 72
 
@@ -167,7 +167,7 @@ The Material theme provides the following template blocks:
167 167
 
168 168
 For more on this topic refer to the [MkDocs documentation][4]
169 169
 
170
-  [4]: http://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
170
+  [4]: https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
171 171
 
172 172
 ## Theme development
173 173
 

+ 82
- 2
docs/extensions/codehilite.md View File

@@ -108,7 +108,7 @@ Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
108 108
 ``` yaml
109 109
 markdown_extensions:
110 110
   - codehilite:
111
-      linenums:true
111
+      linenums: true
112 112
 ```
113 113
 
114 114
 Example:
@@ -134,6 +134,87 @@ Result:
134 134
                 if items[j] > items[j + 1]:
135 135
                     items[j], items[j + 1] = items[j + 1], items[j]
136 136
 
137
+### Grouping code blocks
138
+
139
+The [SuperFences][5] extension which is part of the [PyMdown Extensions][6]
140
+package adds support for grouping code blocks with tabs. This is especially
141
+useful for documenting projects with multiple language bindings.
142
+
143
+Example:
144
+
145
+````
146
+``` bash tab="Bash"
147
+#!/bin/bash
148
+
149
+echo "Hello world!"
150
+```
151
+
152
+``` c tab="C"
153
+#include <stdio.h>
154
+
155
+int main(void) {
156
+  printf("Hello world!\n");
157
+}
158
+```
159
+
160
+``` c++ tab="C++"
161
+#include <iostream>
162
+
163
+int main() {
164
+  std::cout << "Hello world!" << std::endl;
165
+  return 0;
166
+}
167
+```
168
+
169
+``` c# tab="C#"
170
+using System;
171
+
172
+class Program {
173
+  static void Main(string[] args) {
174
+    Console.WriteLine("Hello world!");
175
+  }
176
+}
177
+```
178
+````
179
+
180
+Result:
181
+
182
+``` bash tab="Bash"
183
+#!/bin/bash
184
+
185
+echo "Hello world!"
186
+```
187
+
188
+``` c tab="C"
189
+#include <stdio.h>
190
+
191
+int main(void) {
192
+  printf("Hello world!\n");
193
+}
194
+```
195
+
196
+``` c++ tab="C++"
197
+#include <iostream>
198
+
199
+int main() {
200
+  std::cout << "Hello world!" << std::endl;
201
+  return 0;
202
+}
203
+```
204
+
205
+``` c# tab="C#"
206
+using System;
207
+
208
+class Program {
209
+  static void Main(string[] args) {
210
+    Console.WriteLine("Hello world!");
211
+  }
212
+}
213
+```
214
+
215
+  [5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
216
+  [6]: https://facelessuser.github.io/pymdown-extensions
217
+
137 218
 ### Highlighting specific lines
138 219
 
139 220
 Specific lines can be highlighted by passing the line numbers to the `hl_lines`
@@ -162,7 +243,6 @@ Result:
162 243
                 if items[j] > items[j + 1]:
163 244
                     items[j], items[j + 1] = items[j + 1], items[j]
164 245
 
165
-
166 246
 ## Supported languages <small>excerpt</small>
167 247
 
168 248
 CodeHilite uses [Pygments][2], a generic syntax highlighter with support for

+ 7
- 4
docs/extensions/pymdown.md View File

@@ -237,12 +237,15 @@ symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...).
237 237
 lists and other block elements, which the [Fenced Code Blocks][23] extension
238 238
 from the standard Markdown library doesn't parse correctly.
239 239
 
240
+SuperFences does also allow [grouping code blocks with tabs][24].
241
+
240 242
   [22]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
241 243
   [23]: https://python-markdown.github.io/extensions/fenced_code_blocks/
244
+  [24]: codehilite.md#grouping-code-blocks
242 245
 
243 246
 ### Tasklist
244 247
 
245
-[Tasklist][24] adds support for styled checkbox lists. This is useful for
248
+[Tasklist][25] adds support for styled checkbox lists. This is useful for
246 249
 keeping track of tasks and showing what has been done and has yet to be done.
247 250
 Checkbox lists are like regular lists, but prefixed with `[ ]` for empty or
248 251
 `[x]` for filled checkboxes.
@@ -275,12 +278,12 @@ Result:
275 278
 * [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
276 279
 * [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
277 280
 
278
-[24]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
281
+[25]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
279 282
 
280 283
 ### Tilde
281 284
 
282
-[Tilde][25] provides an easy way to ~~strike through~~ cross out text.
285
+[Tilde][26] provides an easy way to ~~strike through~~ cross out text.
283 286
 The portion of text that should be erased must be enclosed in two tildes
284 287
 `~~...~~` and the extension will take care of the rest.
285 288
 
286
-  [25]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
289
+  [26]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/

+ 26
- 17
docs/getting-started.md View File

@@ -24,7 +24,7 @@ pip install mkdocs && mkdocs --version
24 24
 
25 25
 Material requires MkDocs >= 0.17.1.
26 26
 
27
-  [1]: http://www.mkdocs.org
27
+  [1]: https://www.mkdocs.org
28 28
 
29 29
 ### Installing Material
30 30
 
@@ -319,37 +319,44 @@ translations for all template variables and labels in the following languages:
319 319
     <tr>
320 320
       <td><code>ar</code> / Arabic</td>
321 321
       <td><code>ca</code> / Catalan</td>
322
+      <td><code>cs</code> / Czech</td>
322 323
       <td><code>da</code> / Danish</td>
323
-      <td><code>nl</code> / Dutch</td>
324 324
     </tr>
325 325
     <tr>
326
+      <td><code>nl</code> / Dutch</td>
326 327
       <td><code>en</code> / English</td>
328
+      <td><code>fi</code> / Finnish</td>
327 329
       <td><code>fr</code> / French</td>
328
-      <td><code>fr</code> / Galician</td>
329
-      <td><code>de</code> / German</td>
330 330
     </tr>
331 331
     <tr>
332
+      <td><code>gl</code> / Galician</td>
333
+      <td><code>de</code> / German</td>
332 334
       <td><code>he</code> / Hebrew</td>
335
+      <td><code>hi</code> / Hindi</td>
336
+    </tr>
337
+    <tr>
333 338
       <td><code>hu</code> / Hungarian</td>
334 339
       <td><code>it</code> / Italian</td>
335 340
       <td><code>ja</code> / Japanese</td>
341
+      <td><code>kr</code> / Korean</td>
336 342
     </tr>
337 343
     <tr>
338
-      <td><code>kr</code> / Korean</td>
339 344
       <td><code>no</code> / Norwegian</td>
340 345
       <td><code>fa</code> / Persian</td>
341 346
       <td><code>pl</code> / Polish</td>
347
+      <td><code>pt</code> / Portugese</td>
342 348
     </tr>
343 349
     <tr>
344
-      <td><code>pt</code> / Portugese</td>
345 350
       <td><code>ru</code> / Russian</td>
346
-      <td><code>es</code> / Spanish</td>
347
-      <td><code>sv</code> / Swedish</td>
351
+      <td><code>sr</code> / Serbian</td>
352
+      <td><code>sh</code> / Serbo-Croatian</td>
353
+      <td><code>sk</code> / Slovak</td>
348 354
     </tr>
349 355
     <tr>
356
+      <td><code>es</code> / Spanish</td>
357
+      <td><code>sv</code> / Swedish</td>
350 358
       <td><code>tr</code> / Turkish</td>
351 359
       <td><code>uk</code> / Ukrainian</td>
352
-      <td colspan="2"><code>vi</code> / Vietnamese</td>
353 360
     </tr>
354 361
     <tr>
355 362
       <td colspan="2">
@@ -360,11 +367,11 @@ translations for all template variables and labels in the following languages:
360 367
       </td>
361 368
     </tr>
362 369
     <tr>
363
-      <td colspan="4" align="right">
370
+      <td><code>vi</code> / Vietnamese</td>
371
+      <td colspan="3" align="right">
364 372
         <a href="http://bit.ly/2EbzFc8">Submit a new language</a>
365 373
       </td>
366 374
     </tr>
367
-    </tr>
368 375
   </tbody>
369 376
 </table>
370 377
 
@@ -452,11 +459,13 @@ At the time of writing, the following languages are supported:
452 459
   </tbody>
453 460
 </table>
454 461
 
455
-!!! info "Search language support for Chinese"
462
+!!! warning "MkDocs 1.0 compatibility"
456 463
 
457
-    [lunr-languages][18] currently doesn't include a stemmer for Chinese or
458
-    other Asian languages, but uses the Japanese stemmer, as some users
459
-    reported pretty decent results.
464
+    While MkDocs 1.0 supports prebuilding the search index, Material currently
465
+    doesn't support this setting as the default search behavior of the original
466
+    theme was heavily modified for the sake of a better UX. Integration is
467
+    possible, but a small subset of the features Material provides will not be
468
+    portable to the prebuilt index mainly due to missing localization.
460 469
 
461 470
 !!! warning "Only specify the languages you really need"
462 471
 
@@ -536,7 +545,7 @@ set explicitly by setting `extra.repo_icon` to `github`, `gitlab` or
536 545
     guidance regarding the `edit_uri` attribute, which defines whether the edit
537 546
     button is shown or not.
538 547
 
539
-  [19]: http://www.mkdocs.org/user-guide/configuration/#edit_uri
548
+  [19]: https://www.mkdocs.org/user-guide/configuration/#edit_uri
540 549
 
541 550
 ### Adding social links
542 551
 
@@ -635,7 +644,7 @@ Material theme including more information regarding installation and usage:
635 644
 * [Permalinks][29]
636 645
 * [PyMdown Extensions][30]
637 646
 
638
-  [24]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
647
+  [24]: https://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
639 648
   [25]: extensions/admonition.md
640 649
   [26]: extensions/codehilite.md
641 650
   [27]: extensions/footnotes.md

+ 2
- 2
docs/index.md View File

@@ -8,7 +8,7 @@ guidelines.
8 8
 
9 9
 [![Material for MkDocs](assets/images/material.png)](assets/images/material.png)
10 10
 
11
-  [1]: http://www.mkdocs.org
11
+  [1]: https://www.mkdocs.org
12 12
   [2]: https://material.io/guidelines/material-design/
13 13
 
14 14
 ## Quick start
@@ -29,7 +29,7 @@ theme:
29 29
 ## What to expect
30 30
 
31 31
 * Responsive design and fluid layout for all kinds of screens and devices,
32
-  designed to serve your project documentation in a user-friendly way in 25
32
+  designed to serve your project documentation in a user-friendly way in 31
33 33
   languages with optimal readability.
34 34
 
35 35
 * Easily customizable primary and accent color, fonts, favicon and logo;

+ 79
- 0
docs/release-notes.md View File

@@ -14,6 +14,18 @@ To inspect the currently installed version, use the following command:
14 14
 pip show mkdocs-material
15 15
 ```
16 16
 
17
+### Material 2.x to 3.x
18
+
19
+* Material for MkDocs 3.x requires MkDocs 1.0 because the way paths are resolved
20
+  internally changed significantly. Furthermore, `pages` was renamed to `nav`,
21
+  so remember to adjust your `mkdocs.yml` file.
22
+
23
+* All extended templates *should* continue to work but in order to make them
24
+  future-proof the `url` filter should be introduced on all paths. Please see
25
+  the [official release notes][_1] for further guidance.
26
+
27
+  [_1]: https://www.mkdocs.org/about/release-notes/#version-10-2018-08-03
28
+
17 29
 ### Material 1.x to 2.x
18 30
 
19 31
 * Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced
@@ -37,6 +49,73 @@ pip show mkdocs-material
37 49
 
38 50
 ## Changelog
39 51
 
52
+### 3.0.3 <small>_ August 7, 2018</small>
53
+
54
+* Fixed [#841][841]: Additional path levels for extra CSS and JS
55
+
56
+  [841]: https://github.com/squidfunk/mkdocs-material/issues/841
57
+
58
+### 3.0.2 <small>_ August 6, 2018</small>
59
+
60
+* Fixed [#839][839]: Lunr.js stemmer imports incorrect
61
+
62
+  [839]: https://github.com/squidfunk/mkdocs-material/issues/839
63
+
64
+### 3.0.1 <small>_ August 5, 2018</small>
65
+
66
+* Fixed [#838][838]: Search result links incorrect
67
+
68
+  [838]: https://github.com/squidfunk/mkdocs-material/issues/838
69
+
70
+### 3.0.0 <small>_ August 5, 2018</small>
71
+
72
+* Upgraded MkDocs to 1.0
73
+* Upgraded Python in official Docker image to 3.6
74
+* Added Serbian and Serbo-Croatian translations
75
+
76
+### 2.9.4 <small>_ July 29, 2018</small>
77
+
78
+* Fixed build error after MkDocs upgrade
79
+
80
+### 2.9.3 <small>_ July 29, 2018</small>
81
+
82
+* Added link to home for logo in drawer
83
+* Fixed dependency problems between MkDocs and Tornado
84
+
85
+### 2.9.2 <small>_ June 29, 2018</small>
86
+
87
+* Added Hindi and Czech translations
88
+
89
+### 2.9.1 <small>_ June 18, 2018</small>
90
+
91
+* Added support for different spellings for theme color
92
+* Fixed [#799][799]: Added support for web font minification in production
93
+* Fixed [#800][800]: Added `.highlighttable` as an alias for `.codehilitetable`
94
+
95
+  [799]: https://github.com/squidfunk/mkdocs-material/issues/799
96
+  [800]: https://github.com/squidfunk/mkdocs-material/issues/800
97
+
98
+### 2.9.0 <small>_ June 13, 2018</small>
99
+
100
+* Added support for theme color on Android
101
+* Fixed [#796][796]: Rendering of nested tabbed code blocks
102
+
103
+  [796]: https://github.com/squidfunk/mkdocs-material/issues/796
104
+
105
+### 2.8.0 <small>_ June 10, 2018</small>
106
+
107
+* Added support for grouping code blocks with tabs
108
+* Added Material and FontAwesome icon fonts to distribution files (GDPR)
109
+* Added note on compliance with GDPR
110
+* Added Slovak translations
111
+* Fixed [#790][790]: Prefixed `id` attributes with `__` to avoid name clashes
112
+
113
+  [790]: https://github.com/squidfunk/mkdocs-material/issues/790
114
+
115
+### 2.7.3 <small>_ April 26, 2018</small>
116
+
117
+* Added Finnish translations
118
+
40 119
 ### 2.7.2 <small>_ April 9, 2018</small>
41 120
 
42 121
 * Fixed rendering issue for `details` on Edge

+ 4
- 4
docs/specimen.md View File

@@ -10,7 +10,7 @@ tempor.
10 10
 
11 11
 **Sed suscipit**, orci non pretium pretium, quam mi gravida metus, vel
12 12
 venenatis justo est condimentum diam. Maecenas non ornare justo. Nam a ipsum
13
-eros. [Nulla aliquam](/) orci sit amet nisl posuere malesuada. Proin aliquet
13
+eros. [Nulla aliquam](#) orci sit amet nisl posuere malesuada. Proin aliquet
14 14
 nulla velit, quis ultricies orci feugiat et. `Ut tincidunt sollicitudin`
15 15
 tincidunt. Aenean ullamcorper sit amet nulla at interdum.
16 16
 
@@ -46,7 +46,7 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
46 46
 
47 47
 > **Sed aliquet**, neque at rutrum mollis, neque nisi tincidunt nibh, vitae
48 48
   faucibus lacus nunc at lacus. Nunc scelerisque, quam id cursus sodales, lorem
49
-  [libero fermentum](/) urna, ut efficitur elit ligula et nunc.
49
+  [libero fermentum](#) urna, ut efficitur elit ligula et nunc.
50 50
 
51 51
 > > Mauris dictum mi lacus, sit amet pellentesque urna vehicula fringilla.
52 52
     Ut sit amet placerat ante. Proin sed elementum nulla. Nunc vitae sem odio.
@@ -161,7 +161,7 @@ Cras arcu libero
161 161
 
162 162
 Morbi eget `dapibus felis`. Vivamus *`venenatis porttitor`* tortor sit amet
163 163
 rutrum. Class aptent taciti sociosqu ad litora torquent per conubia nostra,
164
-per inceptos himenaeos. [`Pellentesque aliquet quam enim`](/), eu volutpat urna
164
+per inceptos himenaeos. [`Pellentesque aliquet quam enim`](#), eu volutpat urna
165 165
 rutrum a.
166 166
 
167 167
 Nam vehicula nunc `:::js return target` mauris, a ultricies libero efficitur
@@ -216,7 +216,7 @@ at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
216 216
 | Left       | Center   | Right   |
217 217
 | :--------- | :------: | ------: |
218 218
 | Lorem      | *dolor*  | `amet`  |
219
-| [ipsum](/) | **sit**  |         |
219
+| [ipsum](#) | **sit**  |         |
220 220
 
221 221
 Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
222 222
 lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,

+ 4
- 0
material/assets/fonts/font-awesome.css
File diff suppressed because it is too large
View File


+ 13
- 0
material/assets/fonts/material-icons.css View File

@@ -0,0 +1,13 @@
1
+/*!
2
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
3
+ * use this file except in compliance with the License. You may obtain a copy
4
+ * of the License at:
5
+ *
6
+ *   http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
9
+ * DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
10
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
+ * SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
12
+ * LIMITATIONS UNDER THE LICENSE.
13
+ */@font-face{font-family:"Material Icons";font-style:normal;font-weight:400;src:local("Material Icons"),local("MaterialIcons-Regular"),url("specimen/MaterialIcons-Regular.woff2") format("woff2"),url("specimen/MaterialIcons-Regular.woff") format("woff"),url("specimen/MaterialIcons-Regular.ttf") format("truetype")}

BIN
material/assets/fonts/specimen/FontAwesome.ttf View File


BIN
material/assets/fonts/specimen/FontAwesome.woff View File


BIN
material/assets/fonts/specimen/FontAwesome.woff2 View File


BIN
material/assets/fonts/specimen/MaterialIcons-Regular.ttf View File


BIN
material/assets/fonts/specimen/MaterialIcons-Regular.woff View File


BIN
material/assets/fonts/specimen/MaterialIcons-Regular.woff2 View File


material/assets/images/icons/bitbucket.4ebea66e.svg → material/assets/images/icons/bitbucket.1b09e088.svg View File

@@ -1,5 +1,5 @@
1 1
 <svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
2
-    viewBox="0 0 352 448" id="bitbucket">
2
+    viewBox="0 0 352 448" id="__bitbucket">
3 3
   <path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
4 4
         1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
5 5
         6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75

material/assets/images/icons/github.a4034fb1.svg → material/assets/images/icons/github.f0b8504a.svg View File

@@ -1,5 +1,5 @@
1 1
 <svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
2
-    viewBox="0 0 416 448" id="github">
2
+    viewBox="0 0 416 448" id="__github">
3 3
   <path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
4 4
         8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
5 5
         18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75

material/assets/images/icons/gitlab.348cdb3a.svg → material/assets/images/icons/gitlab.6dd19c00.svg View File

@@ -1,5 +1,5 @@
1 1
 <svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
2
-    viewBox="0 0 500 500" id="gitlab">
2
+    viewBox="0 0 500 500" id="__gitlab">
3 3
   <g transform="translate(156.197863, 1.160267)">
4 4
   	<path fill="currentColor"
5 5
         d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,

+ 0
- 1
material/assets/javascripts/application.0cf9b500.js
File diff suppressed because it is too large
View File


+ 1
- 0
material/assets/javascripts/application.e72fd936.js
File diff suppressed because it is too large
View File


+ 1176
- 0
material/assets/stylesheets/application-palette.22915126.css
File diff suppressed because it is too large
View File


+ 0
- 2
material/assets/stylesheets/application-palette.6079476c.css
File diff suppressed because it is too large
View File


+ 2552
- 0
material/assets/stylesheets/application.451f80e5.css
File diff suppressed because it is too large
View File


+ 0
- 2
material/assets/stylesheets/application.8d40d89b.css
File diff suppressed because it is too large
View File


+ 30
- 23
material/base.html View File

@@ -35,8 +35,8 @@
35 35
       ] %}
36 36
         <meta name="lang:{{ key }}" content="{{ lang.t(key) }}">
37 37
       {% endfor %}
38
-      <link rel="shortcut icon" href="{{ base_url }}/{{ config.theme.favicon }}">
39
-      <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-2.7.2">
38
+      <link rel="shortcut icon" href="{{ config.theme.favicon | url }}">
39
+      <meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-3.0.3">
40 40
     {% endblock %}
41 41
     {% block htmltitle %}
42 42
       {% if page and page.meta and page.meta.title %}
@@ -48,13 +48,20 @@
48 48
       {% endif %}
49 49
     {% endblock %}
50 50
     {% block styles %}
51
-      <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.8d40d89b.css">
51
+      <link rel="stylesheet" href="{{ 'assets/stylesheets/application.451f80e5.css' | url }}">
52 52
       {% if palette.primary or palette.accent %}
53
-        <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-palette.6079476c.css">
53
+        <link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.22915126.css' | url }}">
54
+      {% endif %}
55
+      {% if palette.primary %}
56
+        {% import "partials/palette.html" as map %}
57
+        {% set primary = map.primary(
58
+          palette.primary | replace(" ", "-") | lower
59
+        ) %}
60
+        <meta name="theme-color" content="{{ primary }}">
54 61
       {% endif %}
55 62
     {% endblock %}
56 63
     {% block libs %}
57
-      <script src="{{ base_url }}/assets/javascripts/modernizr.1aa3b519.js"></script>
64
+      <script src="{{ 'assets/javascripts/modernizr.1aa3b519.js' | url }}"></script>
58 65
     {% endblock %}
59 66
     {% block fonts %}
60 67
       <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
@@ -65,10 +72,10 @@
65 72
             }}">
66 73
         <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>
67 74
       {% endif %}
68
-      <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
69 75
     {% endblock %}
70
-    {% for path in extra_css %}
71
-      <link rel="stylesheet" href="{{ path }}">
76
+    <link rel="stylesheet" href="{{ 'assets/fonts/material-icons.css' | url }}">
77
+    {% for path in config["extra_css"] %}
78
+      <link rel="stylesheet" href="{{ path | url }}">
72 79
     {% endfor %}
73 80
     {% block extrahead %}{% endblock %}
74 81
   </head>
@@ -83,19 +90,19 @@
83 90
       <defs>
84 91
         {% set platform = config.extra.repo_icon or config.repo_url %}
85 92
         {% if "github" in platform %}
86
-          {% include "assets/images/icons/github.a4034fb1.svg" %}
93
+          {% include "assets/images/icons/github.f0b8504a.svg" %}
87 94
         {% elif "gitlab" in platform %}
88
-          {% include "assets/images/icons/gitlab.348cdb3a.svg" %}
95
+          {% include "assets/images/icons/gitlab.6dd19c00.svg" %}
89 96
         {% elif "bitbucket" in platform %}
90
-          {% include "assets/images/icons/bitbucket.4ebea66e.svg" %}
97
+          {% include "assets/images/icons/bitbucket.1b09e088.svg" %}
91 98
         {% endif %}
92 99
       </defs>
93 100
     </svg>
94
-    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer" autocomplete="off">
95
-    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="search" autocomplete="off">
96
-    <label class="md-overlay" data-md-component="overlay" for="drawer"></label>
101
+    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
102
+    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
103
+    <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
97 104
     {% if page.toc | first is defined %}
98
-      <a href="{{ (page.toc | first).url }}" tabindex="1" class="md-skip">
105
+      <a href="{{ (page.toc | first).url | url }}" tabindex="1" class="md-skip">
99 106
         {{ lang.t('skip.link.title') }}
100 107
       </a>
101 108
     {% endif %}
@@ -167,30 +174,30 @@
167 174
       {% endblock %}
168 175
     </div>
169 176
     {% block scripts %}
170
-      <script src="{{ base_url }}/assets/javascripts/application.0cf9b500.js"></script>
177
+      <script src="{{ 'assets/javascripts/application.e72fd936.js' | url }}"></script>
171 178
       {% if lang.t("search.language") != "en" %}
172 179
         {% set languages = lang.t("search.language").split(",") %}
173 180
         {% if languages | length and languages[0] != "" %}
174
-          {% set path = base_url + "/assets/javascripts/lunr" %}
175
-          <script src="{{ path }}/lunr.stemmer.support.js"></script>
181
+          {% set path = "assets/javascripts/lunr/" %}
182
+          <script src="{{ (path ~ 'lunr.stemmer.support.js') | url }}"></script>
176 183
           {% for language in languages | map("trim") %}
177 184
             {% if language != "en" %}
178 185
               {% if language == "jp" %}
179
-                <script src="{{ path }}/tinyseg.js"></script>
186
+                <script src="{{ (path ~ 'tinyseg.js') | url }}"></script>
180 187
               {% endif %}
181 188
               {% if language in ("da", "de", "du", "es", "fi", "fr", "hu", "it", "jp", "no", "pt", "ro", "ru", "sv", "tr") %}
182
-                <script src="{{ path }}/lunr.{{ language }}.js"></script>
189
+                <script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}"></script>
183 190
               {% endif %}
184 191
             {% endif %}
185 192
           {% endfor %}
186 193
           {% if languages | length > 1 %}
187
-            <script src="{{ path }}/lunr.multi.js"></script>
194
+            <script src="{{ (path ~ 'lunr.multi.js') | url }}"></script>
188 195
           {% endif %}
189 196
         {% endif %}
190 197
       {% endif %}
191 198
       <script>app.initialize({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script>
192
-      {% for path in extra_javascript %}
193
-        <script src="{{ path }}"></script>
199
+      {% for path in config["extra_javascript"] %}
200
+        <script src="{{ path | url }}"></script>
194 201
       {% endfor %}
195 202
     {% endblock %}
196 203
     {% block analytics %}

+ 3
- 3
material/partials/footer.html View File

@@ -4,7 +4,7 @@
4 4
     <div class="md-footer-nav">
5 5
       <nav class="md-footer-nav__inner md-grid">
6 6
         {% if page.previous_page %}
7
-          <a href="{{ page.previous_page.url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
7
+          <a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
8 8
             <div class="md-flex__cell md-flex__cell--shrink">
9 9
               <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
10 10
             </div>
@@ -19,7 +19,7 @@
19 19
           </a>
20 20
         {% endif %}
21 21
         {% if page.next_page %}
22
-          <a href="{{ page.next_page.url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
22
+          <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
23 23
             <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
24 24
               <span class="md-flex__ellipsis">
25 25
                 <span class="md-footer-nav__direction">
@@ -45,7 +45,7 @@
45 45
           </div>
46 46
         {% endif %}
47 47
         powered by
48
-        <a href="http://www.mkdocs.org">MkDocs</a>
48
+        <a href="https://www.mkdocs.org">MkDocs</a>
49 49
         and
50 50
         <a href="https://squidfunk.github.io/mkdocs-material/">
51 51
           Material for MkDocs</a>

+ 4
- 6
material/partials/header.html View File

@@ -2,18 +2,16 @@
2 2
   <nav class="md-header-nav md-grid">
3 3
     <div class="md-flex">
4 4
       <div class="md-flex__cell md-flex__cell--shrink">
5
-        <a href="{{ config.site_url | default(nav.homepage.url, true) }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
5
+        <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
6 6
           {% if config.theme.logo.icon %}
7 7
             <i class="md-icon">{{ config.theme.logo.icon }}</i>
8
-          {% elif config.theme.logo.startswith("http") %}
9
-            <img src="{{ config.theme.logo }}" width="24" height="24">
10 8
           {% else %}
11
-            <img src="{{ base_url }}/{{ config.theme.logo }}" width="24" height="24">
9
+            <img src="{{ config.theme.logo | url }}" width="24" height="24">
12 10
           {% endif %}
13 11
         </a>
14 12
       </div>
15 13
       <div class="md-flex__cell md-flex__cell--shrink">
16
-        <label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
14
+        <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
17 15
       </div>
18 16
       <div class="md-flex__cell md-flex__cell--stretch">
19 17
         <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
@@ -34,7 +32,7 @@
34 32
       <div class="md-flex__cell md-flex__cell--shrink">
35 33
         {% block search_box %}
36 34
           {% if "search" in config["plugins"] %}
37
-            <label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
35
+            <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
38 36
             {% include "partials/search.html" %}
39 37
           {% endif %}
40 38
         {% endblock %}

+ 20
- 0
material/partials/language/cs.html View File

@@ -0,0 +1,20 @@
1
+{% macro t(key) %}{{ {
2
+  "language": "cs",
3
+  "clipboard.copy": "Kopírovat do schránky",
4
+  "clipboard.copied": "Zkopírováno do schránky",
5
+  "edit.link.title": "Upravit tuto stránku",
6
+  "footer.previous": "Předchozí",
7
+  "footer.next": "Další",
8
+  "meta.comments": "Komentáře",
9
+  "meta.source": "Zdroj",
10
+  "search.language": "ro",
11
+  "search.placeholder": "Hledat",
12
+  "search.result.placeholder": "Pište co se má vyhledat",
13
+  "search.result.none": "Nenalezeny žádné dokumenty",
14
+  "search.result.one": "Nalezený dokument: 1",
15
+  "search.result.other": "Nalezené dokumenty: #",
16
+  "search.tokenizer": "[\s\-]+",
17
+  "skip.link.title": "Přeskočit obsah",
18
+  "source.link.title": "Přejít do repozitáře",
19
+  "toc.title": "Obsah"
20
+}[key] }}{% endmacro %}

+ 19
- 0
material/partials/language/fi.html View File

@@ -0,0 +1,19 @@
1
+{% macro t(key) %}{{ {
2
+  "language": "fi",
3
+  "clipboard.copy": "Kopioi leikepöydälle",
4
+  "clipboard.copied": "Kopioitu leikepöydälle",
5
+  "edit.link.title": "Muokkaa tätä sivua",
6
+  "footer.previous": "Edellinen",
7
+  "footer.next": "Seuraava",
8
+  "meta.comments": "Kommentit",
9
+  "meta.source": "Lähdekodi",
10
+  "search.language": "fi",
11
+  "search.placeholder": "Hae",
12
+  "search.result.placeholder": "Kirjoita aloittaaksesi haun",
13
+  "search.result.none": "Ei täsmääviä dokumentteja",
14
+  "search.result.one": "1 täsmäävä dokumentti",
15
+  "search.result.other": "# täsmäävää dokumenttia",
16
+  "skip.link.title": "Hyppää sisältöön",
17
+  "source.link.title": "Mene repositoryyn",
18
+  "toc.title": "Sisällysluettelo"
19
+}[key] }}{% endmacro %}

+ 22
- 0
material/partials/language/hi.html View File

@@ -0,0 +1,22 @@
1
+{% macro t(key) %}{{ {
2
+  "language": "hi",
3
+  "clipboard.copy": "क्लिपबोर्ड पर कॉपी करें",
4
+  "clipboard.copied": "क्लिपबोर्ड पर कॉपी कर दिया गया",
5
+  "edit.link.title": "इस पृष्ठ को संपादित करें",
6
+  "footer.previous": "पिछला",
7
+  "footer.next": "आगामी",
8
+  "meta.comments": "टिप्पणियाँ",
9
+  "meta.source": "स्रोत",
10
+  "search.language": "",
11
+  "search.pipeline.stopwords": false,
12
+  "search.pipeline.trimmer": false,
13
+  "search.placeholder": "खोज",
14
+  "search.result.placeholder": "खोज शुरू करने के लिए टाइप करें",
15
+  "search.result.none": "कोई मिलान डॉक्यूमेंट नहीं",
16
+  "search.result.one": "1 मिलान डॉक्यूमेंट",
17
+  "search.result.other": "# मिलान डाक्यूमेंट्स",
18
+  "search.tokenizer": "[\s\-]+",
19
+  "skip.link.title": "विषय पर बढ़ें",
20
+  "source.link.title": "रिपॉजिटरी पर जाएं",
21
+  "toc.title": "विषय - सूची"
22
+}[key] }}{% endmacro %}

+ 20
- 0
material/partials/language/sh.html View File

@@ -0,0 +1,20 @@
1
+{% macro t(key) %}{{ {
2
+  "language": "sh",
3
+  "clipboard.copy": "Kopiraj u klipbord",
4
+  "clipboard.copied": "Iskopirano u klipbord",
5
+  "edit.link.title": "Uredi stranicu",
6
+  "footer.previous": "Prethodno",
7
+  "footer.next": "Sledeće",
8
+  "meta.comments": "Komentari",
9
+  "meta.source": "Izvor",
10
+  "search.language": "ro",
11
+  "search.placeholder": "Pretraga",
12
+  "search.result.placeholder": "Unesite pojam pretrage",
13
+  "search.result.none": "Ništa nije pronađeno",
14
+  "search.result.one": "1 rezultat pretrage",
15
+  "search.result.other": "# rezultata pretrage",
16
+  "search.tokenizer": "[\s\-]+",
17
+  "skip.link.title": "Idi na tekst",
18
+  "source.link.title": "Idi u repozitorijum",
19
+  "toc.title": "Sadržaj"
20
+}[key] }}{% endmacro %}

+ 19
- 0
material/partials/language/sk.html View File

@@ -0,0 +1,19 @@
1
+{% macro t(key) %}{{ {
2
+  "language": "sk",
3
+  "clipboard.copy": "Kopírovať do schránky",
4
+  "clipboard.copied": "Skopírované do schránky",
5
+  "edit.link.title": "Upraviť túto stránku",
6
+  "footer.previous": "Späť",
7
+  "footer.next": "Ďalej",
8
+  "meta.comments": "Komentáre",
9
+  "meta.source": "Zdroj",
10
+  "search.language": "sk",
11
+  "search.placeholder": "Hľadať",
12
+  "search.result.placeholder": "Pre vyhľadávanie začni písať",
13
+  "search.result.none": "Žiadne vyhovujúce dokumenty",
14
+  "search.result.one": "Vyhovujúci dokument: 1",
15
+  "search.result.other": "Vyhovujúce dokumenty: #",
16
+  "skip.link.title": "Preskočiť na obsah",
17
+  "source.link.title": "Zobraziť repozitár",
18
+  "toc.title": "Obsah"
19
+}[key] }}{% endmacro %}

+ 22
- 0
material/partials/language/sr.html View File

@@ -0,0 +1,22 @@
1
+{% macro t(key) %}{{ {
2
+  "language": "sr",
3
+  "clipboard.copy": "Копирај у клипборд",
4
+  "clipboard.copied": "Ископирано у клипборд",
5
+  "edit.link.title": "Уреди страницу",
6
+  "footer.previous": "Претходно",
7
+  "footer.next": "Следеће",
8
+  "meta.comments": "Коментари",
9
+  "meta.source": "Извор",
10
+  "search.language": "",
11
+  "search.pipeline.stopwords": false,
12
+  "search.pipeline.trimmer": false,
13
+  "search.placeholder": "Претрага",
14
+  "search.result.placeholder": "Унесите појам претраге",
15
+  "search.result.none": "Нису пронађени документи",
16
+  "search.result.one": "1 резултат претраге",
17
+  "search.result.other": "# резултата претраге",
18
+  "search.tokenizer": "[\s\-]+",
19
+  "skip.link.title": "Иди на текст",
20
+  "source.link.title": "Иди у репозиторијум",
21
+  "toc.title": "Садржај"
22
+}[key] }}{% endmacro %}

+ 4
- 4
material/partials/nav-item.html View File

@@ -29,16 +29,16 @@
29 29
 {% elif nav_item == page %}
30 30
   <li class="{{ class }}">
31 31
     {% set toc_ = page.toc %}
32
-    <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
32
+    <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
33 33
     {% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
34 34
       {% set toc_ = (toc_ | first).children %}
35 35
     {% endif %}
36 36
     {% if toc_ | first is defined %}
37
-      <label class="md-nav__link md-nav__link--active" for="toc">
37
+      <label class="md-nav__link md-nav__link--active" for="__toc">
38 38
         {{ nav_item.title }}
39 39
       </label>
40 40
     {% endif %}
41
-    <a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
41
+    <a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
42 42
       {{ nav_item.title }}
43 43
     </a>
44 44
     {% if toc_ | first is defined %}
@@ -47,7 +47,7 @@
47 47
   </li>
48 48
 {% else %}
49 49
   <li class="{{ class }}">
50
-    <a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link">
50
+    <a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-nav__link">
51 51
       {{ nav_item.title }}
52 52
     </a>
53 53
   </li>

+ 4
- 6
material/partials/nav.html View File

@@ -1,14 +1,12 @@
1 1
 <nav class="md-nav md-nav--primary" data-md-level="0">
2
-  <label class="md-nav__title md-nav__title--site" for="drawer">
3
-    <span class="md-nav__button md-logo">
2
+  <label class="md-nav__title md-nav__title--site" for="__drawer">
3
+    <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-nav__button md-logo">
4 4
       {% if config.theme.logo.icon %}
5 5
         <i class="md-icon">{{ config.theme.logo.icon }}</i>
6
-      {% elif config.theme.logo.startswith("http") %}
7
-        <img src="{{ config.theme.logo }}" width="48" height="48">
8 6
       {% else %}
9
-        <img src="{{ base_url }}/{{ config.theme.logo }}" width="48" height="48">
7
+        <img src="{{ config.theme.logo | url }}" width="48" height="48">
10 8
       {% endif %}
11
-    </span>
9
+    </a>
12 10
     {{ config.site_name }}
13 11
   </label>
14 12
   {% if config.repo_url %}

+ 39
- 0
material/partials/palette.html View File

@@ -0,0 +1,39 @@
1
+{% macro primary(key) %}{{ {
2
+  "red":         "#ef5350",
3
+  "pink":        "#e91e63",
4
+  "purple":      "#ab47bc",
5
+  "deep-purple": "#7e57c2",
6
+  "indigo":      "#3f51b5",
7
+  "blue":        "#2196f3",
8
+  "light-blue":  "#03a9f4",
9
+  "cyan":        "#00bcd4",
10
+  "teal":        "#009688",
11
+  "green":       "#4caf50",
12
+  "light-green": "#7cb342",
13
+  "lime":        "#c0ca33",
14
+  "yellow":      "#f9a825",
15
+  "amber":       "#ffa000",
16
+  "orange":      "#fb8c00",
17
+  "deep-orange": "#ff7043",
18
+  "brown":       "#795548",
19
+  "grey":        "#757575",
20
+  "blue-grey":   "#546e7a"
21
+}[key] }}{% endmacro %}
22
+{% macro accent(key) %}{{ {
23
+  "red":         "#ff1744",
24
+  "pink":        "#f50057",
25
+  "purple":      "#e040fb",
26
+  "deep-purple": "#7c4dff",
27
+  "indigo":      "#536dfe",
28
+  "blue":        "#448aff",
29
+  "light-blue":  "#0091ea",
30
+  "cyan":        "#00b8d4",
31
+  "teal":        "#00bfa5",
32
+  "green":       "#00c853",
33
+  "light-green": "#64dd17",
34
+  "lime":        "#aeea00",
35
+  "yellow":      "#ffd600",
36
+  "amber":       "#ffab00",
37
+  "orange":      "#ff9100",
38
+  "deep-orange": "#ff6e40"
39
+}[key] }}{% endmacro %}

+ 2
- 2
material/partials/search.html View File

@@ -1,10 +1,10 @@
1 1
 {% import "partials/language.html" as lang with context %}
2 2
 <div class="md-search" data-md-component="search" role="dialog">
3
-  <label class="md-search__overlay" for="search"></label>
3
+  <label class="md-search__overlay" for="__search"></label>
4 4
   <div class="md-search__inner" role="search">
5 5
     <form class="md-search__form" name="search">
6 6
       <input type="text" class="md-search__input" name="query" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
7
-      <label class="md-icon md-search__icon" for="search"></label>
7
+      <label class="md-icon md-search__icon" for="__search"></label>
8 8
       <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
9 9
         &#xE5CD;
10 10
       </button>

+ 1
- 2
material/partials/social.html View File

@@ -1,7 +1,6 @@
1 1
 {% if config.extra.social %}
2 2
   <div class="md-footer-social">
3
-    {% set path = "ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" %}
4
-    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/{{ path }}">
3
+    <link rel="stylesheet" href="{{ base_url }}/assets/fonts/font-awesome.css">
5 4
     {% for social in config.extra.social %}
6 5
       <a href="{{ social.link }}" class="md-footer-social__link fa fa-{{ social.type }}"></a>
7 6
     {% endfor %}

+ 1
- 1
material/partials/source.html View File

@@ -14,7 +14,7 @@
14 14
     {% if repo_type %}
15 15
       <div class="md-source__icon">
16 16
         <svg viewBox="0 0 24 24" width="24" height="24">
17
-          <use xlink:href="#{{ repo_type }}" width="24" height="24"></use>
17
+          <use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
18 18
         </svg>
19 19
       </div>
20 20
     {% endif %}

+ 5
- 5
material/partials/tabs-item.html View File

@@ -1,28 +1,28 @@
1 1
 {% if nav_item.is_homepage %}
2 2
   <li class="md-tabs__item">
3 3
     {% if not page.ancestors | length and nav | selectattr("url", page.url) %}
4
-      <a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-tabs__link md-tabs__link--active">
4
+      <a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-tabs__link md-tabs__link--active">
5 5
         {{ nav_item.title }}
6 6
       </a>
7 7
     {% else %}
8
-      <a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-tabs__link">
8
+      <a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-tabs__link">
9 9
         {{ nav_item.title }}
10 10
       </a>
11 11
     {% endif %}
12 12
   </li>
13 13
 {% elif nav_item.children and nav_item.children | length > 0 %}
14 14
   {% set title = title | default(nav_item.title) %}
15
-  {% if (nav_item.children | first).children | length > 0 %}
15
+  {% if (nav_item.children | first).children %}
16 16
     {% set nav_item = nav_item.children | first %}
17 17
     {% include "partials/tabs-item.html" %}
18 18
   {% else %}
19 19
     <li class="md-tabs__item">
20 20
       {% if nav_item.active %}
21
-        <a href="{{ (nav_item.children | first).url }}" title="{{ title }}" class="md-tabs__link md-tabs__link--active">
21
+        <a href="{{ (nav_item.children | first).url | url }}" title="{{ title }}" class="md-tabs__link md-tabs__link--active">
22 22
           {{ title }}
23 23
         </a>
24 24
       {% else %}
25
-        <a href="{{ (nav_item.children | first).url }}" title="{{ title }}" class="md-tabs__link">
25
+        <a href="{{ (nav_item.children | first).url | url }}" title="{{ title }}" class="md-tabs__link">
26 26
           {{ title }}
27 27
         </a>
28 28
       {% endif %}

+ 1
- 1
material/partials/toc.html View File

@@ -5,7 +5,7 @@
5 5
     {% set toc_ = (toc_ | first).children %}
6 6
   {% endif %}
7 7
   {% if toc_ | first is defined %}
8
-    <label class="md-nav__title" for="toc">{{ lang.t("toc.title") }}</label>
8
+    <label class="md-nav__title" for="__toc">{{ lang.t("toc.title") }}</label>
9 9
     <ul class="md-nav__list" data-md-scrollfix>
10 10
       {% for toc_item in toc_ %}
11 11
         {% include "partials/toc-item.html" %}

+ 2
- 1
mkdocs.yml View File

@@ -100,7 +100,7 @@ markdown_extensions:
100 100
   - pymdownx.tilde
101 101
 
102 102
 # Page tree
103
-pages:
103
+nav:
104 104
   - Material: index.md
105 105
   - Getting started: getting-started.md
106 106
   - Extensions:
@@ -112,6 +112,7 @@ pages:
112 112
     - PyMdown: extensions/pymdown.md
113 113
   - Specimen: specimen.md
114 114
   - Customization: customization.md
115
+  - Compliance with GDPR: compliance.md
115 116
   - Release notes: release-notes.md
116 117
   - Author's notes: authors-notes.md
117 118
   - Contributing: contributing.md

+ 8276
- 8524
package-lock.json
File diff suppressed because it is too large
View File


+ 8
- 7
package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "mkdocs-material",
3
-  "version": "2.7.2",
3
+  "version": "3.0.3",
4 4
   "description": "A Material Design theme for MkDocs",
5 5
   "keywords": [
6 6
     "mkdocs",
@@ -31,20 +31,21 @@
31 31
   },
32 32
   "dependencies": {},
33 33
   "devDependencies": {
34
-    "autoprefixer": "^8.0.0",
34
+    "autoprefixer": "^9.0.1",
35 35
     "babel-cli": "^6.26.0",
36 36
     "babel-core": "^6.25.0",
37 37
     "babel-eslint": "^8.0.0",
38 38
     "babel-loader": "^7.1.1",
39
-    "babel-plugin-add-module-exports": "^0.2.1",
39
+    "babel-plugin-add-module-exports": "^0.3.1",
40 40
     "babel-plugin-transform-react-jsx": "^6.24.1",
41 41
     "babel-preset-env": "^1.6.1",
42 42
     "chalk": "^2.0.1",
43 43
     "clipboard": "^2.0.0",
44 44
     "copy-webpack-plugin": "^4.2.1",
45
-    "css-loader": "^0.28.7",
46
-    "css-mqpacker": "^6.0.1",
47
-    "custom-event-polyfill": "^0.3.0",
45
+    "css-loader": "^1.0.0",
46
+    "css-mqpacker": "^7.0.0",
47
+    "cssmin": "^0.4.3",
48
+    "custom-event-polyfill": "^1.0.6",
48 49
     "customizr": "^1.0.0-alpha",
49 50
     "escape-string-regexp": "^1.0.5",
50 51
     "eslint": "^4.3.0",
@@ -65,7 +66,7 @@
65 66
     "modularscale-sass": "^3.0.3",
66 67
     "node-sass": "^4.7.2",
67 68
     "postcss-loader": "^2.0.8",
68
-    "promise-polyfill": "^7.0.0",
69
+    "promise-polyfill": "^8.0.0",
69 70
     "sass-loader": "^6.0.6",
70 71
     "style-loader": "^0.20.0",
71 72
     "stylelint": "^9.0.0",

+ 2
- 5
requirements.txt View File

@@ -19,9 +19,6 @@
19 19
 # IN THE SOFTWARE.
20 20
 
21 21
 # Direct dependencies
22
-mkdocs>=0.17.1
22
+mkdocs>=1
23 23
 Pygments>=2.2
24
-pymdown-extensions>=4.10
25
-
26
-# Temporary fix for build errors on Travis
27
-tornado<5
24
+pymdown-extensions>=4.11

+ 16
- 1
webpack.config.js View File

@@ -21,6 +21,7 @@
21 21
  */
22 22
 
23 23
 const fs = require("fs")
24
+const cssmin = require("cssmin")
24 25
 const path = require("path")
25 26
 const html = require("html-minifier")
26 27
 const uglify = require("uglify-js")
@@ -40,7 +41,7 @@ const ManifestPlugin = require("webpack-manifest-plugin")
40 41
  * Configuration
41 42
  * ------------------------------------------------------------------------- */
42 43
 
43
-module.exports = env => {
44
+module.exports = env => { // eslint-disable-line complexity
44 45
   const config = {
45 46
 
46 47
     /* Entrypoints */
@@ -122,6 +123,20 @@ module.exports = env => {
122 123
           }
123 124
         },
124 125
 
126
+        /* Copy web font files */
127
+        {
128
+          context: "src",
129
+          from: "assets/fonts/**/*",
130
+          ignore: "**/*.css"
131
+        },
132
+
133
+        /* Copy and minify web font stylesheets */
134
+        {
135
+          context: "src",
136
+          from: "assets/fonts/*.css",
137
+          transform: content => cssmin(content.toString())
138
+        },
139
+
125 140
         /* Copy images without cache busting */
126 141
         {
127 142
           context: "src",