How to use the yaml-front-matter/dist/yamlFront.safeLoadFront function in yaml-front-matter

To help you get started, we’ve selected a few yaml-front-matter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magda-io / magda / magda-web-client / src / Components / Static / StaticPage.js View on Github external
render() {
        const title =;
        const contentRaw =;

        const content = safeLoadFront(contentRaw);
        const bodyContent = content.__content;

        const breadcrumb = [

        const hasEditPermissions = this.props.hasEditPermissions;

        const save = field =&gt; {
            return newValue =&gt; {
                const { title, content } =;
                const page = { title, content };
                page[field] = newValue;


yaml front matter for JS. Parse yaml or JSON from the beginning of files.

Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis