filter has_ list from actual frontmatter to keep the order
This commit is contained in:
parent
765c1e2b51
commit
dfb272ba6d
|
@ -38,16 +38,20 @@
|
|||
relpath = repo.path;
|
||||
relpermalink = repo.relpermalink
|
||||
protocol = document.location.protocol.substring(0,4)
|
||||
|
||||
let tkey = Object.keys(repo.frontmatter).filter(t => t.toLowerCase() == "title")[0]
|
||||
title = repo.frontmatter[tkey]
|
||||
let xastiers = Object.keys(repo.frontmatter).filter(t => t.startsWith("has_"))
|
||||
if (xastiers.length > 0) {
|
||||
let xastiers = Object.keys(repo.frontmatter).filter(t => t.toLowerCase().startsWith("has_"))
|
||||
if (xastiers.length == 1) {
|
||||
hastiers = xastiers[0].substr(4)
|
||||
tiers = METASP[xastiers[0].split("has_")[1]].tiers.filter(t => repo.frontmatter[xastiers].includes(t.file))
|
||||
if (xastiers.length == 1) {
|
||||
candidates = diffArrr(METASP[xastiers[0].split("has_")[1]].tiers, tiers)
|
||||
}
|
||||
tiers = []
|
||||
repo.frontmatter[xastiers[0]].forEach(t => {
|
||||
METASP[hastiers].tiers.forEach(f => {
|
||||
if (f.file == t) {
|
||||
tiers.push(f)
|
||||
}
|
||||
})
|
||||
})
|
||||
candidates = diffArrr(METASP[hastiers].tiers, tiers)
|
||||
}
|
||||
}
|
||||
el.src = `../js/repo/${location.hash.substring(1)}.js`
|
||||
|
|
Loading…
Reference in New Issue