@eryxdoc/siteModel Module

Summary

Functions

siteModel.normalizeMount(mount: string?)string
siteModel.getArticleRoutePath(section: SiteSection, localName: string)string
siteModel.getModuleRoutePath(section: SiteSection, qualifiedName: string)string
siteModel.collect(cfg: LegacyConfig)CollectedSite

API Reference

Functions

siteModel.normalizeMount

siteModel.normalizeMount(mount: string?)string

siteModel.getSectionRoutePath

siteModel.getSectionRoutePath(section: SiteSection)string

siteModel.getArticleRoutePath

siteModel.getArticleRoutePath(section: SiteSection, localName: string)string

siteModel.getModuleRoutePath

siteModel.getModuleRoutePath(section: SiteSection, qualifiedName: string)string

siteModel.collect

siteModel.collect(cfg: LegacyConfig)CollectedSite

Types

SectionLandingConfig

type SectionLandingConfig = { title: string?, description: string?, generate: boolean? }
title: string?
description: string?
generate: boolean?

SectionConfig

type SectionConfig = { id: string, label: string, mount: string?, headerHref: string?, articles: string?, modules: string?, prefix: string?, landing: SectionLandingConfig?, children: { SectionConfig }? }
id: string
label: string
mount: string?
headerHref: string?
articles: string?
modules: string?
prefix: string?
children: { SectionConfig }?

SiteSection

type SiteSection = { id: string, label: string, mount: string?, headerHref: string?, articles: string?, modules: string?, prefix: string?, landing: SectionLandingConfig?, children: { SiteSection }?, parentId: string?, topLevelId: string, isLeaf: boolean }
id: string
label: string
mount: string?
headerHref: string?
articles: string?
modules: string?
prefix: string?
children: { SiteSection }?
parentId: string?
topLevelId: string
isLeaf: boolean

SectionFolderMeta

type SectionFolderMeta = { sectionTitles: { [string]: string }, folderTitles: { [string]: string }, folderOrder: { [string]: number } }
sectionTitles: { [string]: string }
folderTitles: { [string]: string }
folderOrder: { [string]: number }

ArticleEntry

type ArticleEntry = { key: string, localName: string, routePath: string, article: Article.Article, sectionId: string }
key: string
localName: string
routePath: string
article: Article.Article
sectionId: string

CollectedSite

type CollectedSite = { sections: { SiteSection }, leafSections: { SiteSection }, sectionsById: { [string]: SiteSection }, articles: { ArticleEntry }, modules: { any }, moduleSectionByName: { [string]: string }, folderMetaBySectionId: { [string]: SectionFolderMeta }, explicitSections: boolean }
sections: { SiteSection }
leafSections: { SiteSection }
sectionsById: { [string]: SiteSection }
articles: { ArticleEntry }
modules: { any }
moduleSectionByName: { [string]: string }
folderMetaBySectionId: { [string]: SectionFolderMeta }
explicitSections: boolean