0

I'm creating a blog with Scully and looking for a good way to setup code highlight there.

for example, such block of code(with defining the language):

```typescript
@NgModule({
  declarations: [BlogComponent],
  imports: [CommonModule, BlogRoutingModule, ScullyLibModule],
})
export class BlogModule {}
.```
Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176

1 Answers1

0

I found that there are two ways now:

  1. Use highlight.js that is included in the library. You just need to activate it in Scully config:
setPluginConfig('md', { enableSyntaxHighlighting: true });
  1. Scully Docs suggest using Primsjs by installing it and including to your project.

It looks like Scully team wants to get rid of core dependency for highlight.js and that's why it's wise to use the second option.

Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176