UNPKG

tgweb

Version:

Teamgenik Website Builder Offline Tool

11 lines (8 loc) 506 B
import { mergeProperties } from "./merge_properties.mjs" const getDocumentProperties = (mainTemplate, wrapper, layout, siteProperties) => { let documentProperties = mergeProperties({plugins: {}}, siteProperties) if (layout) documentProperties = mergeProperties(layout.frontMatter, documentProperties) if (wrapper) documentProperties = mergeProperties(wrapper.frontMatter, documentProperties) return mergeProperties(mainTemplate.frontMatter, documentProperties) } export { getDocumentProperties }