Skip to content

Commit d869cac

Browse files
Tone down legacy warning (#2033)
* Show a red warning only when the doc has moved elsewhere * Redirect legacy docs to their new home * Fix wording
1 parent f8ac604 commit d869cac

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

content/docs/legacy/matrix-bot-sdk-intro.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
+++
22
title = "Usage of matrix-bot-sdk"
33
aliases = ["/docs/guides/usage-of-matrix-bot-sdk"]
4+
extra.new_doc = "https://turt2live.github.io/matrix-bot-sdk/index.html"
45
+++
56

67
This article concerns [matrix-bot-sdk], a TypeScript client SDK for Matrix.

content/docs/legacy/matrix-bot-sdk-room-admin-features.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
+++
22
title = "matrix-bot-sdk Room Admin Features"
33
aliases = ["/docs/guides/matrix-bot-sdk-room-admin-features"]
4+
extra.new_doc = "https://turt2live.github.io/matrix-bot-sdk/index.html"
45
+++
56

67
## Intro

content/docs/legacy/moderation/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title = "Moderation in Matrix"
33
aliases = ["/docs/guides/moderation"]
44
extra.updated = "2022-10-18T16:00:00Z"
5+
extra.new_doc = "/docs/communities/moderation/"
56
+++
67

78
## Introduction

content/docs/legacy/python-nio.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
+++
22
title = "Usage of matrix-nio (Python Matrix client library)"
33
aliases = ["/docs/guides/usage-of-matrix-nio"]
4+
extra.new_doc = "https://matrix-nio.readthedocs.io/en/latest"
45
+++
56

67
This article concerns [matrix-nio](https://github.com/poljar/matrix-nio), and

sass/_legacy-docs.scss

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
.legacy-doc-warning {
22
padding: 1rem;
33
border-radius: .5rem;
4-
background-color: #FDF5F5;
5-
color: #EC5A5B;
4+
background-color: #F6E7D5;
5+
color: #6F420F;
66
margin-top: 1rem;
77
margin-bottom: 1rem;
88

99
h2 {
1010
margin-top: 0px;
1111
margin-bottom: 10px;
1212
}
13+
14+
&.outdated {
15+
background-color: #F6D5D5;
16+
color: #8B1212;
17+
}
1318
}

templates/docs/legacy.html

+20-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,28 @@
22
{% block content %}
33
<article class="content">
44
<header>
5-
<div class="legacy-doc-warning">
6-
<h2>Outdated documentation</h2>
5+
<div class="legacy-doc-warning {% if page.extra.new_doc %}outdated{% endif %}">
6+
<h2>
7+
{% if page.extra.new_doc %}
8+
Outdated
9+
{% else %}
10+
Old
11+
{% endif %}
12+
documentation
13+
</h2>
714
<p>
8-
This article is not actively maintained anymore, it may be
9-
outdated. There may be more current information in
15+
This documentation hasn't been updated in a while. Some
16+
information might no longer be valid.
17+
</p>
18+
19+
<p>
20+
{% if page.extra.new_doc %}
21+
You can find the latest version of the documentation at
22+
<a href="{{ page.extra.new_doc }}">{{ page.extra.new_doc }}</a>
23+
{% else %}
24+
There may be more up to date information in
1025
<a href="/docs">the new documentation section</a>.
26+
{% endif %}
1127
</p>
1228
</div>
1329
<h1>{{ page.title }}</h1>

0 commit comments

Comments
 (0)