Skip to content

Commit f26cfaa

Browse files
committed
Documentation
1 parent 23f1886 commit f26cfaa

File tree

7 files changed

+119
-12
lines changed

7 files changed

+119
-12
lines changed

docs/insiders/changelog/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Material for MkDocs Insiders
44

5+
### 4.53.0 <small>February 24, 2024</small> { id="4.53.0" }
6+
7+
- Added support for automatic instant previews
8+
- Added support for pinned blog posts
9+
510
### 4.52.3 <small>February 21, 2024</small> { id="4.52.3" }
611

712
- Fixed resolution of URLs in instant previews

docs/insiders/index.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,17 @@ a handful of them, [thanks to our awesome sponsors]!
8888
## What's in it for me?
8989

9090
The moment you [become a sponsor][how to become a sponsor], you'll get __immediate
91-
access to 25 additional features__ that you can __start using now__, and
91+
access to 26 additional features__ that you can __start using now__, and
9292
which are currently exclusively available to sponsors:
9393

9494
<div class="mdx-columns" markdown>
9595

96-
- [x] [Instant previews] :material-alert-decagram:{ .mdx-pulse title="Added on January 28, 2023" }
97-
- [x] [Footnote tooltips] :material-alert-decagram:{ .mdx-pulse title="Added on January 24, 2023" }
98-
- [x] [Tags plugin: advanced settings] :material-alert-decagram:{ .mdx-pulse title="Added on December 23, 2023" }
99-
- [x] [Tags plugin: nested tags] :material-alert-decagram:{ .mdx-pulse title="Added on December 23, 2023" }
100-
- [x] [Tags plugin: shadow tags] :material-alert-decagram:{ .mdx-pulse title="Added on December 23, 2023" }
96+
- [x] [Blog plugin: pinned posts] :material-alert-decagram:{ .mdx-pulse title="Added on February 24, 2024" }
97+
- [x] [Instant previews] :material-alert-decagram:{ .mdx-pulse title="Added on January 28, 2024" }
98+
- [x] [Footnote tooltips] :material-alert-decagram:{ .mdx-pulse title="Added on January 24, 2024" }
99+
- [x] [Tags plugin: advanced settings]
100+
- [x] [Tags plugin: nested tags]
101+
- [x] [Tags plugin: shadow tags]
101102
- [x] [Stay on page when switching languages]
102103
- [x] [Blog plugin: author profiles]
103104
- [x] [Blog plugin: advanced settings]
@@ -303,6 +304,7 @@ are released for general availability.
303304
- [x] [Instant prefetching]
304305
- [x] [Blog plugin: advanced settings]
305306
- [x] [Blog plugin: author profiles]
307+
- [x] [Blog plugin: pinned posts]
306308
- [x] [Footnote tooltips]
307309

308310
[Optimize plugin]: ../plugins/optimize.md
@@ -313,6 +315,7 @@ are released for general availability.
313315
[Instant prefetching]: ../setup/setting-up-navigation.md#instant-prefetching
314316
[Blog plugin: advanced settings]: ../setup/setting-up-a-blog.md#advanced-settings
315317
[Blog plugin: author profiles]: ../setup/setting-up-a-blog.md#adding-author-profiles
318+
[Blog plugin: pinned posts]: ../setup/setting-up-a-blog.md#pinning-a-post
316319
[Footnote tooltips]: ../reference/footnotes.md#footnote-tooltips
317320

318321
#### $ 24,000 – Blockpaprika

docs/plugins/blog.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,29 @@ draft: true
15851585

15861586
---
15871587

1588+
#### <!-- md:setting meta.pin -->
1589+
1590+
<!-- md:sponsors -->
1591+
<!-- md:version insiders-4.53.0 -->
1592+
<!-- md:flag metadata -->
1593+
<!-- md:default `false` -->
1594+
<!-- md:flag experimental -->
1595+
1596+
Use this property to pin a post to the top of a view. In case multiple posts are
1597+
pinned, the pinned posts are sorted by descending order and appear before all
1598+
other posts. Pin a post with:
1599+
1600+
``` yaml
1601+
---
1602+
ping: true
1603+
---
1604+
1605+
# Post title
1606+
...
1607+
```
1608+
1609+
---
1610+
15881611
#### <!-- md:setting meta.links -->
15891612

15901613
<!-- md:sponsors -->

docs/setup/changing-the-language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The following properties are available for each alternate language:
9797
[ISO 639-1 language code]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
9898
[Language selector preview]: ../assets/screenshots/language-selection.png
9999

100-
#### Stay on page :material-alert-decagram:{ .mdx-pulse title="Added on December 8, 2023" }
100+
#### Stay on page
101101

102102
<!-- md:sponsors -->
103103
<!-- md:version insiders-4.47.0 -->

docs/setup/setting-up-a-blog.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ authors:
342342
[authors]: ../plugins/blog.md#authors
343343
[authors_file]: ../plugins/blog.md#config.authors_file
344344

345-
#### Adding author profiles :material-alert-decagram:{ .mdx-pulse title="Added on November 26, 2023" }
345+
#### Adding author profiles
346346

347347
<!-- md:sponsors -->
348348
<!-- md:version insiders-4.46.0 -->
@@ -506,6 +506,29 @@ when the site is being built. Of course, you can also reference assets from
506506
posts outside of the `posts` directory. The [built-in blog plugin] ensures that
507507
all links are correct.
508508

509+
#### Pinning a post :material-alert-decagram:{ .mdx-pulse title="Added on February 24, 2024" }
510+
511+
<!-- md:sponsors -->
512+
<!-- md:version insiders-4.53.0 -->
513+
<!-- md:flag experimental -->
514+
515+
If you want to pin a post to the top of the index page, as well as the archive
516+
and category indexes it is part of, you can use the front matter `pin` property:
517+
518+
``` yaml
519+
---
520+
date: 2024-01-31
521+
pin: true
522+
---
523+
524+
# Hello world!
525+
...
526+
```
527+
528+
If multiple posts are pinned, they are sorted by their creation date, with the
529+
most recent pinned post being shown first, followed by the other pinned posts in
530+
descending order.
531+
509532
#### Setting the reading time
510533

511534
When [enabled], the [readtime] package is used to compute the expected reading

docs/setup/setting-up-navigation.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ experience.
9393

9494
Instant previews are a brand new feature that allow the user to preview another
9595
site of your documentation without navigating to it. They can be very helpful to
96-
keep the user in context. A link can be opted into instant previews with the
97-
`data-preview` attribute:
96+
keep the user in context. Instant previews can be enabled on any internal link
97+
with the `data-preview` attribute:
9898

9999
```` markdown title="Link with instant preview"
100100
``` markdown
@@ -108,6 +108,59 @@ keep the user in context. A link can be opted into instant previews with the
108108

109109
</div>
110110

111+
#### Automatic previews
112+
113+
<!-- md:sponsors -->
114+
<!-- md:version insiders-4.53.0 -->
115+
<!-- md:extension -->
116+
<!-- md:flag experimental -->
117+
118+
The recommended way to work with instant previews is to use the Markdown
119+
extension that is included with Material for MkDocs, as it allows you to enable
120+
instant previews on a per-page or per-section level for your documentation:
121+
122+
``` yaml
123+
markdown_extensions:
124+
- material.extensions.preview:
125+
targets:
126+
include:
127+
- changelog/index.md
128+
- customization.md
129+
- insiders/changelog/*
130+
- setup/extensions/*
131+
```
132+
133+
The above configuration is what we use for our documentation. We've enabled
134+
instant previews for our changelogs, customization guide, and Insiders sections,
135+
as well as for all Markdown extensions that we support.
136+
137+
!!! info "Full configuration example"
138+
139+
``` yaml
140+
markdown_extensions:
141+
- material.extensions.preview:
142+
sources: # (1)!
143+
include:
144+
- ...
145+
exclude:
146+
- ...
147+
targets: # (2)!
148+
include:
149+
- ...
150+
exclude:
151+
- ...
152+
```
153+
154+
1. Sources specify the pages _on_ which instant previews should be enabled.
155+
If this setting is omitted, instant previews will be enabled on all
156+
pages. You can use patterns to include or exclude pages. Exclusion is
157+
evaluated on top of inclusion, so if a page is matched by both, it will
158+
be excluded.
159+
160+
2. Targets specify the pages _to_ which instant previews should be enabled.
161+
This is the recommended way to enable instant previews.
162+
---
163+
111164
Instant previews can also be enabled globally by adding the following lines to
112165
`mkdocs.yml`, which will enable instant previews for all internal links,
113166
alleviating the need to add data attributes:

docs/setup/setting-up-tags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For a list of all settings, please consult the [plugin documentation].
2727
2828
[plugin documentation]: ../plugins/tags.md
2929
30-
#### Advanced settings :material-alert-decagram:{ .mdx-pulse title="Added on December 23, 2023" }
30+
#### Advanced settings
3131
3232
<!-- md:sponsors -->
3333
<!-- md:version insiders-4.48.0 -->
@@ -211,7 +211,7 @@ arbitrary content before and after the marker:
211211
[tags.tags_file]: #tags-file
212212
[tags index enabled]: ../assets/screenshots/tags-index.png
213213

214-
### Advanced features :material-alert-decagram:{ .mdx-pulse title="Added on December 23, 2023" }
214+
### Advanced features
215215

216216
[Insiders] ships a __ground up rewrite of the tags plugin__ which is infinitely
217217
more powerful than the current version in the community edition. It allows

0 commit comments

Comments
 (0)