Flesh out about page.

This commit is contained in:
Joshua Bemenderfer
2023-02-14 15:04:12 -05:00
parent 8b9a136d88
commit 54ad373744
23 changed files with 379 additions and 80 deletions

View File

@@ -0,0 +1,19 @@
const { contentAsText } = require('../helpers')
module.exports = async (doc, rootLevel) => {
const { next, level, line, head, tail, match } = doc
const node = {
type: head(),
language: tail(),
class: '',
text: ''
}
while (await next(rootLevel)) {
if (match('class')) node.class = tail()
else node.text = await contentAsText(doc, rootLevel, true)
}
return node
}