Skip to content

Commit 88bf29d

Browse files
committed
Added 16.3 changelog to version links
1 parent fbbddee commit 88bf29d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

content/versions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- title: '16.3.1'
2+
changelog: https://github.com/facebook/react/blob/master/CHANGELOG.md#1631-april-3-2018
13
- title: '16.2.0'
24
path: /version/16.2
35
url: https://5abc31d8be40f1556f06c4be--reactjs.netlify.com

plugins/gatsby-transformer-versions-yaml/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports.onPostBuild = async ({store}) => {
2020

2121
// versions.yml structure is [{path: string, url: string, ...}, ...]
2222
createRedirects(
23-
versions.map(version => ({
23+
versions.filter(version => version.path && version.url).map(version => ({
2424
fromPath: version.path,
2525
toPath: version.url,
2626
})),

src/pages/versions.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ const Versions = () => (
3939
Changelog
4040
</a>
4141
</li>
42-
<li>
43-
<a href={version.path} rel="nofollow">
44-
Documentation
45-
</a>
46-
</li>
42+
{version.path && (
43+
<li>
44+
<a href={version.path} rel="nofollow">
45+
Documentation
46+
</a>
47+
</li>
48+
)}
4749
</ul>
4850
</div>
4951
))}

0 commit comments

Comments
 (0)