Add fuzzy search to web docs.
This commit is contained in:

committed by
Brenden Matthews

parent
7f47b5f94e
commit
6f5a74c903
@@ -11,11 +11,13 @@ const DOC_PATH = path.join(process.cwd(), '..', 'doc')
|
||||
|
||||
export interface Documentation {
|
||||
desc: string
|
||||
desc_md: string
|
||||
values: DocItem[]
|
||||
}
|
||||
export interface DocItem {
|
||||
name: string
|
||||
desc: string
|
||||
desc_md: string
|
||||
default: string | undefined
|
||||
args: string[]
|
||||
}
|
||||
@@ -27,8 +29,12 @@ function getDocumentation(source: string): Documentation {
|
||||
)
|
||||
const parsed = yaml.load(configSettingsFile.toString()) as Documentation
|
||||
const docs = {
|
||||
desc: processMarkdown(parsed.desc),
|
||||
values: parsed.values.map((c) => ({ ...c, desc: processMarkdown(c.desc) })),
|
||||
...parsed,
|
||||
desc_md: processMarkdown(parsed.desc),
|
||||
values: parsed.values.map((c) => ({
|
||||
...c,
|
||||
desc_md: processMarkdown(c.desc),
|
||||
})),
|
||||
}
|
||||
|
||||
return docs
|
||||
|
Reference in New Issue
Block a user