Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 7ced3a2

Browse files
authored
Merge pull request #3 from mkdocs-material/statusbadge
added example for page statuses
2 parents 092099c + 8179be9 commit 7ced3a2

File tree

7 files changed

+59
-0
lines changed

7 files changed

+59
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
status: deprecated
3+
---
4+
5+
# This is a page with deprecated content

examples/statusbadge/docs/happy.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
status: happy
3+
---
4+
5+
# Happy, happy page!
6+
7+
This page has a custom page status.

examples/statusbadge/docs/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Page Status Example
2+
3+
The example shows how to add a [page status] to a page. This works for
4+
section index pages as well as 'normal' pages.
5+
6+
You can add the existing status identifiers `new`
7+
and `deprecated` but also define custom ones by:
8+
9+
1. defining the tooltip in your `mkdocs.yml`
10+
2. defining the icon to use in your `extra.css`
11+
12+
[page status]: https://squidfunk.github.io/mkdocs-material/reference/#setting-the-page-status
13+
14+
15+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
status: new
3+
---
4+
5+
# Brand new content!
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Another page in the new section

examples/statusbadge/docs/stylesheets/extra.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/statusbadge/mkdocs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
site_name: Page Status Example
2+
3+
theme:
4+
name: material
5+
features:
6+
- navigation.indexes
7+
8+
extra:
9+
status:
10+
new: Recently Added
11+
happy: Happy!
12+
13+
extra_css:
14+
- stylesheets/extra.css
15+
16+
nav:
17+
- "Home": index.md
18+
- "Deprecated": deprecated.md
19+
- "Happy": happy.md
20+
- "New Section":
21+
- newsect/index.md
22+
- "Other": newsect/other.md

0 commit comments

Comments
 (0)