How to use the @tryghost/helpers/tags function in @tryghost/helpers

To help you get started, we’ve selected a few @tryghost/helpers 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 TryGhost / gatsby-starter-ghost / src / components / common / Tags.js View on Github external
opts.fn = function process(tag) {
        let tagLink = props.permalink
        tagLink = tagLink.replace(/:slug/, tag.slug) || `/${tag.slug}/`

        return props.autolink ?
            <>
                <span>
                    {tag.name}
                </span>
             :
            &lt;&gt;<span>{tag.name}</span>
    }

    return (
        tagsHelper(props.post, opts)
    )
}

@tryghost/helpers

Javascript Helpers for working with the Ghost [Content API](https://ghost.org/docs/content-api/)

MIT
Latest version published 1 month ago

Package Health Score

69 / 100
Full package analysis

Similar packages