- Add title back to Backlink
- Remove duplicated backlink and self-reference.
This commit is contained in:
parent
ce8de2da9f
commit
758a8c90b4
@ -100,6 +100,7 @@ export function constructGraphData() {
|
||||
.forEach(aFilePath => {
|
||||
// const {currentFilePath} = getFileNames(filename)
|
||||
const aNode = {
|
||||
title: Transformer.parseFileNameFromPath(aFilePath),
|
||||
slug: toSlug(aFilePath),
|
||||
shortSummary: getShortSummary(toSlug(aFilePath))
|
||||
}
|
||||
|
@ -55,14 +55,14 @@ export function getStaticProps({params}) {
|
||||
|
||||
const listOfEdges = edges.filter(anEdge => anEdge.target === params.id)
|
||||
const internalLinks = listOfEdges.map(anEdge => nodes.find(aNode => aNode.slug === anEdge.source)).filter(element => element !== undefined)
|
||||
|
||||
const backLinks = [...new Set(internalLinks)]
|
||||
const graphData = getLocalGraphData(params.id)
|
||||
return {
|
||||
props: {
|
||||
note,
|
||||
tree: tree,
|
||||
flattenNodes: flattenNodes,
|
||||
backLinks: internalLinks,
|
||||
backLinks: backLinks.filter(link => link.slug !== params.id),
|
||||
graphData: graphData
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user