Skip to content

Commit 3b194f6

Browse files
committed
add new content, add new capability to index creator for mass unlinkage of content in a folder
1 parent a1091ac commit 3b194f6

11 files changed

Lines changed: 158 additions & 13 deletions

File tree

content/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ path: '/'
1010
consider viewing this document on my github pages instead!
1111
</p>
1212

13-
do you know me? i probably don't know you. no one ever checks these webpages anyways! why do i bother..\
13+
do you know [me](/me)? i probably don't know you.
1414
\
15-
anyways, again, my name is *evelyn nightshade*. it's a really odd name, but it's [one that i gave myself](https://youtube.com/watch?v=eoq2e4h_avs). if that's a mouthful for you, you can call me *evie*. anyways, let's move on with the introductions.\
15+
again, my name is *evelyn nightshade*. it's a really odd name, but it's [one that i gave myself](https://youtube.com/watch?v=eoq2e4h_avs). if that's a mouthful for you, you can call me *evie*. anyways, let's move on with the introductions.\
1616
am {age} years old.\
1717
i'm a girl who really really loves procrastination. chronically tired, occasionally wired.\
1818
\

content/me.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# i truly am the most repulsive person in this earth
2+
<p class="github-only">
3+
<b>hi curious github user skimming through my page's source code</b>
4+
<br>
5+
this markdown document may not be displayed properly because i have added custom """formatting""" that regular or github markdown doesn't have
6+
<br>
7+
consider viewing this document on my github pages instead!
8+
</p>
9+
10+
just a couple hours ago as of the time writing this post [-time 1770719731552],\
11+
i have destroyed almost if not all of the builds of an old "housing" of mine,\
12+
[-mutter (a minecraft building plot world thing with a limited size hosted on the <a href="https://hypixel.net">hypixel network</a>, sorta like those "creative" worlds sometimes seen on minecraft servers)]\
13+
solely because i wanted more space for building.
14+
15+
the reason why i chose to destroy this "housing" was because i was completely maxed out on the amount of "housings" that i could have, and this "housing" was... pretty abandoned.\
16+
no one joined it, no one cared about it [-mutter (or so i thought)]... it was just there.
17+
18+
during the destruction i have chosen to preserve some of the builds only because i thought my girlfriend [-mutter (yes i have a girlfriend. yes i'm a lesbian.)] would miss them if they were gone.\
19+
when she found out just a little bit later she was quite upset with me for... simply just destroying.\
20+
she didn't really care that i saved the builds that i thought she cared about,\
21+
she was just upset.
22+
23+
when i asked her why was she upset,\
24+
she simply responded with something like\
25+
"i had fun memories here"\
26+
"you destroyed history"
27+
28+
granted i didn't think much of it at the time\
29+
but i did eventually realize what she was on about\
30+
*it didn't really matter that i saved some builds*.\
31+
i didn't save the entire thing. like, ***the entire thing***.
32+
33+
all of the blocks\
34+
they had at least some history to them\
35+
even if i were to rebuild it\
36+
it wouldn't be **the same thing**.
37+
38+
it would just be *a replica*.
39+
40+
why was i so unreluctant to the destruction?\
41+
why did i truly think my creations had no meaning to them?\
42+
sure, none of my creations have ever done anything significant to anyone\
43+
but\
44+
at least they *existed*.
45+
46+
i guess the actions of oneself really does speak up about the personality of themselves\
47+
i truly felt nothing during the destruction of this minecraft world\
48+
49+
nothing.\
50+
***nothing at all.***
51+
52+
it's starting to scare me now\
53+
how empty i am
54+
55+
the damage is done\
56+
there is no coming back
57+
58+
all i can do now\
59+
[-mutter is hope that i don't make the same mistakes.]

content/occasions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# some occasions in my life that i have decided to talk about
2+
<p class="github-only">
3+
<b>hi curious github user skimming through my page's source code</b>
4+
<br>
5+
this markdown document may not be displayed properly because i have added custom """formatting""" that regular or github markdown doesn't have
6+
<br>
7+
consider viewing this document on my github pages instead!
8+
<br>
9+
</p>
10+
11+
truly no time like the past, the present and the future (to come!) to document all of my *fun* experiences at certain points in my life!
12+
13+
here is the nav list:
14+
15+
[my birthday in 2026](/occasions/birthday-2026)

content/occasions/.unlink

Whitespace-only changes.

content/occasions/birthday-2026.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# y ay!! i'm [ONE] year closer to [the destruction of my current lifeforce]!!!
2+
3+
as of today [-time long 1770656400000]
4+
i'm now 19!!! what an honor.\
5+
[-mutter how did i even live for this long]
6+
7+
people who cared this year: 5 [-mutter (better than last year!)]
8+
9+
people who cared this year in my family: 0 [-mutter (well i don't feel like announcing my birthday in front of my family and my family is quite busy so...)]
10+
11+
presents received this year: 0 [-mutter (i really couldn't care less! i'm just glad people still cared to tell me happy birthday)]
12+
13+
truly an extravagant birthday!! hopefully there won't be more to come.
14+
15+
[-mutter and yes the day went on as usual...]
16+
17+
[go back](/occasions)

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"node": ">=24.13.0"
88
},
99
"scripts": {
10-
"build": "node scripts/build.js",
1110
"make-content-index": "node scripts/make-content-index.js",
1211
"run-server": "node scripts/run.js"
1312
},

scripts/build.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/make-content-index.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
import { readdir, readFile, writeFile } from 'node:fs/promises'
2+
import { posix } from 'node:path'
23
import matter from 'gray-matter'
34

5+
const explicitly_unlinked = [
6+
7+
]
8+
49
const _default = async () => {
510
return await readdir('content', { recursive: true })
6-
.then((dir) => dir.filter((file) => file.endsWith('.md')))
11+
.then((dir) => dir.map((file) => file.replaceAll('\\', '/')))
12+
.then((dir) => dir.filter((file) => {
13+
if (posix.basename(file) === '.unlink')
14+
explicitly_unlinked.push(posix.dirname(file))
15+
16+
return posix.extname(file) === '.md'
17+
}))
718
.then((dir) => Promise.all(
819
dir.map(async (file) => [
9-
file.replaceAll('\\', '/'),
20+
file,
1021
await readFile(
11-
'content/' + file.replaceAll('\\', '/'),
22+
posix.join('content', file),
1223
{ encoding: 'utf-8' }
1324
)
1425
]
1526
)
1627
))
1728
.then((list) => list.reduce(
1829
(list, [file, content]) => {
19-
list[file.replace('.md', '')] = {
30+
const key = file.replace('.md', '')
31+
32+
list[key] = {
2033
path: '/content/' + file,
21-
metadata: matter(content).data
34+
metadata: matter(content).data ?? {}
2235
}
2336

37+
if (explicitly_unlinked.some((dir) => dir === posix.dirname(file)))
38+
list[key].metadata.unlinked = true
39+
2440
return list
2541
},
2642
{}

src/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ sidebar.append(
2323
.filter(([_, { metadata }]) => !metadata?.unlinked)
2424
.flatMap(([name, { metadata }]) => {
2525
const e = document.createElement('a')
26-
e.innerText = name
27-
e.href = metadata?.path || name
26+
e.innerText = metadata?.name || name
27+
28+
const path = metadata?.path || name
29+
e.href = path.startsWith('/') ? path : '/' + path
2830

2931
return [e, ' ']
3032
})

src/preprocessor.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@ const preprocessors = Object.freeze(
88
}
99
},
1010

11+
{
12+
filter: /\[-time(\slong)?\s+([0-9]+)\s*\]/g,
13+
replacer: (_, modifier = '', timestamp) => {
14+
const long = new Intl.DateTimeFormat(undefined, {
15+
weekday: 'long',
16+
month: 'long',
17+
day: 'numeric',
18+
year: 'numeric',
19+
hour: 'numeric',
20+
minute: 'numeric'
21+
})
22+
.format(Number(timestamp))
23+
24+
const short = new Intl.DateTimeFormat(undefined, {
25+
hour: 'numeric',
26+
minute: 'numeric'
27+
})
28+
.format(Number(timestamp))
29+
30+
return `<span class="timestamp" title="${long}">${ modifier.trim() === 'long' ? long : short }</span>`
31+
}
32+
},
33+
1134
{
1235
filter: /\[-([^\n\s]+)\s+([^\]]+)\s*\]/g,
1336
replacer: (_, mod, content) =>

0 commit comments

Comments
 (0)