Skip to content

Commit a644f57

Browse files
committed
Updated documentation
1 parent 2673caf commit a644f57

File tree

6 files changed

+119
-74
lines changed

6 files changed

+119
-74
lines changed

.stylelintignore

-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@ docs
2323
material
2424
src/**/*.html
2525

26-
# Don't lint shame
27-
src/assets/stylesheets/_shame.scss
28-
2926
# Prevent stylelint from constantly complaining
3027
*.ts

docs/changelog/index.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ template: overrides/main.html
88

99
### 8.0.0 <small>_ November 28, 2021</small> { id="8.0.0" }
1010

11-
_This is a release with several template changes, many of which were previously
12-
deprecated, which might break your site if you customized the theme. Please see
13-
the [upgrade guide] for instructions._
14-
1511
- Added support for code annotations
1612
- Added support for anchor tracking
1713
- Added support for version warning
@@ -20,9 +16,9 @@ the [upgrade guide] for instructions._
2016
- Removed deprecated `seealso` admonition type
2117
- Removed deprecated `site_keywords` setting (unsupported by MkDocs)
2218
- Removed deprecated prebuilt search index support
23-
- Removed deprecated web app manifest
24-
- Removed `extracopyright` variable
25-
- Removed Disqus integation in favor of overrides
19+
- Removed deprecated web app manifest – use customization
20+
- Removed `extracopyright` variable – use new `copyright` partial
21+
- Removed Disqus integation – use customization
2622
- Switched to `:is()` selectors for simple selector lists
2723
- Switched autoprefixer from `last 4 years` to `last 2 years`
2824
- Improved CSS overall to match modern standards
@@ -32,8 +28,6 @@ the [upgrade guide] for instructions._
3228
- Improved keyboard navigation for footnotes
3329
- Fixed #3214: Search highlighting breaks site when empty
3430

35-
[upgrade guide]: ../upgrade.md##upgrading-from-7x-to-8x
36-
3731
### 7.3.6 <small>_ October 30, 2021</small> { id="7.3.6" }
3832

3933
- Added support for adding titles to code blocks

docs/customization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ assets may also be put in the `overrides` directory:
9797
├─ assets/
9898
│ ├─ images/ # Images and icons
9999
│ ├─ javascripts/ # JavaScript files
100-
│ └─ stylesheets/ # Stylesheets
100+
│ └─ stylesheets/ # Style sheets
101101
├─ partials/
102102
│ ├─ integrations/ # Third-party integrations
103103
│ │ ├─ analytics/ # Analytics integrations

docs/setup/setting-up-navigation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ especially useful for large documentation sites.
4141
4242
### Anchor tracking
4343
44-
[:octicons-tag-24: 8.0.0b1][Anchor tracking support] ·
44+
[:octicons-tag-24: 8.0.0][Anchor tracking support] ·
4545
:octicons-unlock-24: Feature flag ·
4646
:octicons-beaker-24: Experimental
4747
@@ -55,7 +55,7 @@ theme:
5555
- navigation.tracking
5656
```
5757

58-
[Anchor tracking support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0b1
58+
[Anchor tracking support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0
5959

6060
### Navigation tabs
6161

docs/setup/setting-up-versioning.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Check out the versioning example to see it in action –
6262

6363
### Version warning
6464

65-
[:octicons-tag-24: 8.0.0b1][Version warning support] ·
65+
[:octicons-tag-24: 8.0.0][Version warning support] ·
6666
:octicons-file-symlink-file-24: Customization
6767

6868
If you're using versioning, you might want to display a warning when the user
@@ -102,7 +102,7 @@ extra:
102102

103103
Make sure that this matches the [default version].
104104

105-
[Version warning support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0b1
105+
[Version warning support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.0.0
106106
[theme extension]: ../customization.md#extending-the-theme
107107
[overriding blocks]: ../customization.md#overriding-blocks
108108
[Version warning preview]: ../assets/screenshots/version-warning.png

docs/upgrade.md

+111-57
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ pip show mkdocs-material
2828
- Removed deprecated `seealso` admonition type
2929
- Removed deprecated `site_keywords` setting (unsupported by MkDocs)
3030
- Removed deprecated prebuilt search index support
31-
- Removed deprecated web app manifest
32-
- Removed `extracopyright` variable
33-
- Removed Disqus integation in favor of overrides
31+
- Removed deprecated web app manifest – use customization
32+
- Removed `extracopyright` variable – use new `copyright` partial
33+
- Removed Disqus integation – use customization
3434
- Switched to `:is()` selectors for simple selector lists
3535
- Switched autoprefixer from `last 4 years` to `last 2 years`
3636
- Improved CSS overall to match modern standards
@@ -78,6 +78,102 @@ matches the new structure:
7878

7979
=== ":octicons-file-code-16: base.html"
8080

81+
``` diff
82+
@@ -13,11 +13,6 @@
83+
{% elif config.site_description %}
84+
<meta name="description" content="{{ config.site_description }}">
85+
{% endif %}
86+
- {% if page and page.meta and page.meta.keywords %}
87+
- <meta name="keywords" content="{{ page.meta.keywords }}">
88+
- {% elif config.site_keywords %}
89+
- <meta name="keywords" content="{{ config.site_keywords }}">
90+
- {% endif %}
91+
{% if page and page.meta and page.meta.author %}
92+
<meta name="author" content="{{ page.meta.author }}">
93+
{% elif config.site_author %}
94+
@@ -61,15 +56,13 @@
95+
font.text | replace(' ', '+') + ':300,400,400i,700%7C' +
96+
font.code | replace(' ', '+')
97+
}}&display=fallback">
98+
- <style>:root{--md-text-font-family:"{{ font.text }}";--md-code-font-family:"{{ font.code }}"}</style>
99+
+ <style>:root{--md-text-font:"{{ font.text }}";--md-code-font:"{{ font.code }}"}</style>
100+
{% endif %}
101+
{% endblock %}
102+
- {% if config.extra.manifest %}
103+
- <link rel="manifest" href="{{ config.extra.manifest | url }}" crossorigin="use-credentials">
104+
- {% endif %}
105+
{% for path in config["extra_css"] %}
106+
<link rel="stylesheet" href="{{ path | url }}">
107+
{% endfor %}
108+
+ {% include "partials/javascripts/base.html" %}
109+
{% block analytics %}
110+
{% include "partials/integrations/analytics.html" %}
111+
{% endblock %}
112+
@@ -89,7 +82,6 @@
113+
<body dir="{{ direction }}">
114+
{% endif %}
115+
{% set features = config.theme.features or [] %}
116+
- {% include "partials/javascripts/base.html" %}
117+
{% if not config.theme.palette is mapping %}
118+
{% include "partials/javascripts/palette.html" %}
119+
{% endif %}
120+
@@ -106,13 +98,25 @@
121+
</div>
122+
<div data-md-component="announce">
123+
{% if self.announce() %}
124+
- <aside class="md-banner md-announce">
125+
- <div class="md-banner__inner md-announce__inner md-grid md-typeset">
126+
+ <aside class="md-banner">
127+
+ <div class="md-banner__inner md-grid md-typeset">
128+
{% block announce %}{% endblock %}
129+
</div>
130+
</aside>
131+
{% endif %}
132+
</div>
133+
+ {% if config.extra.version %}
134+
+ <div data-md-component="outdated" hidden>
135+
+ <aside class="md-banner md-banner--warning">
136+
+ {% if self.outdated() %}
137+
+ <div class="md-banner__inner md-grid md-typeset">
138+
+ {% block outdated %}{% endblock %}
139+
+ </div>
140+
+ {% include "partials/javascripts/outdated.html" %}
141+
+ {% endif %}
142+
+ </aside>
143+
+ </div>
144+
+ {% endif %}
145+
{% block header %}
146+
{% include "partials/header.html" %}
147+
{% endblock %}
148+
@@ -156,25 +160,7 @@
149+
<div class="md-content" data-md-component="content">
150+
<article class="md-content__inner md-typeset">
151+
{% block content %}
152+
- {% if page.edit_url %}
153+
- <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-content__button md-icon">
154+
- {% include ".icons/material/pencil.svg" %}
155+
- </a>
156+
- {% endif %}
157+
- {% if not "\x3ch1" in page.content %}
158+
- <h1>{{ page.title | d(config.site_name, true)}}</h1>
159+
- {% endif %}
160+
- {{ page.content }}
161+
- {% if page and page.meta %}
162+
- {% if page.meta.git_revision_date_localized or
163+
- page.meta.revision_date
164+
- %}
165+
- {% include "partials/source-file.html" %}
166+
- {% endif %}
167+
- {% endif %}
168+
- {% endblock %}
169+
- {% block disqus %}
170+
- {% include "partials/integrations/disqus.html" %}
171+
+ {% include "partials/content.html" %}
172+
{% endblock %}
173+
</article>
174+
</div>
175+
```
176+
81177
``` diff
82178
@@ -38,13 +38,6 @@
83179
<meta name="description" content="{{ config.site_description }}" />
@@ -213,30 +309,10 @@ matches the new structure:
213309
=== ":octicons-file-code-16: partials/copyright.html"
214310

215311
``` diff
216-
@@ -0,0 +1,39 @@
217-
+<!--
218-
+ Copyright (c) 2016-2021 Martin Donath <[email protected]>
219-
+
220-
+ Permission is hereby granted, free of charge, to any person obtaining a copy
221-
+ of this software and associated documentation files (the "Software"), to
222-
+ deal in the Software without restriction, including without limitation the
223-
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
224-
+ sell copies of the Software, and to permit persons to whom the Software is
225-
+ furnished to do so, subject to the following conditions:
226-
+
227-
+ The above copyright notice and this permission notice shall be included in
228-
+ all copies or substantial portions of the Software.
229-
+
230-
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
231-
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
232-
+ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
233-
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
234-
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
235-
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
236-
+ IN THE SOFTWARE.
237-
+-->
238-
+
239-
+<!-- Copyright and theme information -->
312+
@@ -0,0 +1,16 @@
313+
+{#-
314+
+ This file was automatically generated - do not edit
315+
+-#}
240316
+<div class="md-copyright">
241317
+ {% if config.copyright %}
242318
+ <div class="md-copyright__highlight">
@@ -245,10 +321,7 @@ matches the new structure:
245321
+ {% endif %}
246322
+ {% if not config.extra.generator == false %}
247323
+ Made with
248-
+ <a
249-
+ href="https://squidfunk.github.io/mkdocs-material/"
250-
+ target="_blank" rel="noopener"
251-
+ >
324+
+ <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
252325
+ Material for MkDocs
253326
+ </a>
254327
+ {% endif %}
@@ -258,12 +331,10 @@ matches the new structure:
258331
=== ":octicons-file-code-16: partials/footer.html"
259332

260333
``` diff
261-
@@ -83,28 +81,12 @@
262-
<!-- Further information -->
334+
@@ -41,21 +40,10 @@
335+
{% endif %}
263336
<div class="md-footer-meta md-typeset">
264337
<div class="md-footer-meta__inner md-grid">
265-
-
266-
- <!-- Copyright and theme information -->
267338
- <div class="md-footer-copyright">
268339
- {% if config.copyright %}
269340
- <div class="md-footer-copyright__highlight">
@@ -272,19 +343,14 @@ matches the new structure:
272343
- {% endif %}
273344
- {% if not config.extra.generator == false %}
274345
- Made with
275-
- <a
276-
- href="https://squidfunk.github.io/mkdocs-material/"
277-
- target="_blank" rel="noopener"
278-
- >
346+
- <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
279347
- Material for MkDocs
280348
- </a>
281349
- {% endif %}
282350
- {{ extracopyright }}
283351
- </div>
284-
+ {% include "partials/copyright.html" %}
285-
286-
<!-- Social links -->
287352
- {% include "partials/social.html" %}
353+
+ {% include "partials/copyright.html" %}
288354
+ {% if config.extra.social %}
289355
+ {% include "partials/social.html" %}
290356
+ {% endif %}
@@ -296,8 +362,7 @@ matches the new structure:
296362
=== ":octicons-file-code-16: partials/social.html"
297363

298364
``` diff
299-
@@ -22,23 +22,21 @@
300-
-<!-- Social links in footer -->
365+
@@ -4,17 +4,15 @@
301366
-{% if config.extra.social %}
302367
- <div class="md-footer-social">
303368
- {% for social in config.extra.social %}
@@ -306,31 +371,20 @@ matches the new structure:
306371
- {% set _,url = social.link.split("//") %}
307372
- {% set title = url.split("/")[0] %}
308373
- {% endif %}
309-
- <a
310-
- href="{{ social.link }}"
311-
- target="_blank" rel="noopener"
312-
- title="{{ title | e }}"
313-
- class="md-footer-social__link"
314-
- >
374+
- <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="md-footer-social__link">
315375
- {% include ".icons/" ~ social.icon ~ ".svg" %}
316376
- </a>
317377
- {% endfor %}
318378
- </div>
319379
-{% endif %}
320-
+<!-- Social links -->
321380
+<div class="md-social">
322381
+ {% for social in config.extra.social %}
323382
+ {% set title = social.name %}
324383
+ {% if not title and "//" in social.link %}
325384
+ {% set _, url = social.link.split("//") %}
326385
+ {% set title = url.split("/")[0] %}
327386
+ {% endif %}
328-
+ <a
329-
+ href="{{ social.link }}"
330-
+ target="_blank" rel="noopener"
331-
+ title="{{ title | e }}"
332-
+ class="md-social__link"
333-
+ >
387+
+ <a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="md-social__link">
334388
+ {% include ".icons/" ~ social.icon ~ ".svg" %}
335389
+ </a>
336390
+ {% endfor %}

0 commit comments

Comments
 (0)