Skip to content

Commit b9ca147

Browse files
committed
unlink -> delist (it makes sense)
1 parent 3968e1f commit b9ca147

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

content/me.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
unlinked: true
2+
delisted: true
33
---
44
# i truly am the most repulsive person on this earth
55
<p class="github-only">

content/not-found.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
unlinked: true
2+
delisted: true
33
---
44
# what are you trying to find???
55
<p class="github-only">

content/you.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
unlinked: true
2+
delisted: true
33
---
44
# speaking of which...
55
<p class="github-only">

scripts/make-content-index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { readdir, readFile, writeFile } from 'node:fs/promises'
22
import { posix } from 'node:path'
33
import matter from 'gray-matter'
44

5-
const explicitly_unlinked = [
5+
const delisted = [
66

77
]
88

99
const _default = async () => {
1010
return await readdir('content', { recursive: true })
1111
.then((dir) => dir.map((file) => file.replaceAll('\\', '/')))
1212
.then((dir) => dir.filter((file) => {
13-
if (posix.basename(file) === '.unlink')
14-
explicitly_unlinked.push(posix.dirname(file))
13+
if (posix.basename(file) === '.delist')
14+
delisted.push(posix.dirname(file))
1515

1616
return posix.extname(file) === '.md'
1717
}))
@@ -34,8 +34,8 @@ const _default = async () => {
3434
metadata: matter(content).data ?? {}
3535
}
3636

37-
if (explicitly_unlinked.some((dir) => dir === posix.dirname(file)))
38-
list[key].metadata.unlinked = true
37+
if (delisted.some((dir) => dir === posix.dirname(file)))
38+
list[key].metadata.delisted = true
3939

4040
return list
4141
},

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sidebar.style.width = `calc(${main.getBoundingClientRect().x}px - 32px - 32px)`
2020
sidebar.append(
2121
...Object
2222
.entries(contents)
23-
.filter(([_, { metadata }]) => !metadata?.unlinked)
23+
.filter(([_, { metadata }]) => !metadata?.delisted)
2424
.flatMap(([name, { metadata }]) => {
2525
const e = document.createElement('a')
2626
e.innerText = metadata?.name || name

0 commit comments

Comments
 (0)