Add initial MarkMark spec and integrate my own links.mark.md file
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-20 22:53:59 -06:00
parent a6e1819d2d
commit 575a253651
19 changed files with 871 additions and 5 deletions

26
src/markmark/types.ts Normal file
View File

@@ -0,0 +1,26 @@
import {hasOwnProperty} from '@extollo/lib'
export type MarkMark = {
frontmatter: FrontMatter,
sections: Section[],
}
export type FrontMatter = {
syntax: 'v1',
authorName?: string,
authorEmail?: string,
authorHref?: string,
}
export type AnonymousSection = { links: Link[] }
export type NamedSection = { title: string, description?: string, links: Link[] }
export type Section = AnonymousSection | NamedSection
export const isNamedSection = (what: Section): what is NamedSection =>
hasOwnProperty(what, 'title') && (typeof what.title === 'string')
export type Link = {
title: string,
tags: string[],
urls: string[],
}