Markdown redirect frontmatter

Reviewed By: danielbuechele

Differential Revision: D6987631

fbshipit-source-id: 8b3431fa885fb94d4a87119b5a5199db0b36b20c
This commit is contained in:
Emil Sjölander
2018-02-14 08:42:49 -08:00
committed by Facebook Github Bot
parent 740ef6cd9e
commit 3ec41b656f
24 changed files with 207 additions and 110 deletions

View File

@@ -49,7 +49,7 @@ export default ({data}) => (
node.fileAbsolutePath.indexOf(`/${category}/`) > -1,
)
.map(({node}) => (
node.frontmatter.path.startsWith('http')
node.frontmatter.redirect
? (<a key={node.id} href={node.frontmatter.path}>
{node.frontmatter.title}
</a>)
@@ -74,6 +74,7 @@ export const query = graphql`
frontmatter {
title
path
redirect
}
fileAbsolutePath
}