Skip to content

Prism.js plugin #25

@aileen

Description

@aileen

Problem description

Prism.js doesn't work "out of the box" for Ghost posts currently. There is a workaround to use Prism.js, which is used in the Ghost Docs repository here:

class Post extends React.Component {
    componentDidMount() {
        Prism.highlightAll()
    }
   ...
}

This solution only supports basic languages, which handlebars, yaml, and json for example are not being considered as.

Proposal

Similar to the gatsby-remark-prismjs plugin, we can create a plugin for Ghost that does the same for Ghost posts.

Maybe there are other solutions for this. This needs to be investigated further.

Todos

  • investigate do-ability further
  • write up tech spec and agree on solution with core team
  • implement solution
  • publish plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions