You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
3.5 KiB
PHP
108 lines
3.5 KiB
PHP
<?php
|
|
|
|
use League\CommonMark\Extension\CommonMark\Node\Inline\Image;
|
|
|
|
return [
|
|
'code_highlighting' => [
|
|
/*
|
|
* To highlight code, we'll use Shiki under the hood. Make sure it's installed.
|
|
*
|
|
* More info: https://spatie.be/docs/laravel-markdown/v1/installation-setup
|
|
*/
|
|
'enabled' => true,
|
|
|
|
/*
|
|
* The name of or path to a Shiki theme
|
|
*
|
|
* More info: https://github.com/shikijs/shiki/blob/main/docs/themes.md
|
|
*/
|
|
'theme' => 'github-light',
|
|
],
|
|
|
|
/*
|
|
* When enabled, anchor links will be added to all titles
|
|
*/
|
|
'add_anchors_to_headings' => true,
|
|
|
|
/**
|
|
* When enabled, anchors will be rendered as links.
|
|
*/
|
|
'render_anchors_as_links' => false,
|
|
|
|
/*
|
|
* These options will be passed to the league/commonmark package which is
|
|
* used under the hood to render markdown.
|
|
*
|
|
* More info: https://spatie.be/docs/laravel-markdown/v1/using-the-blade-component/passing-options-to-commonmark
|
|
*/
|
|
'commonmark_options' => [
|
|
'default_attributes' => [
|
|
Image::class => [
|
|
'class' => ['img-fluid', 'rounded-3', ]
|
|
]
|
|
],
|
|
],
|
|
|
|
/*
|
|
* Rendering markdown to HTML can be resource intensive. By default
|
|
* we'll cache the results.
|
|
*
|
|
* You can specify the name of a cache store here. When set to `null`
|
|
* the default cache store will be used. If you do not want to use
|
|
* caching set this value to `false`.
|
|
*/
|
|
'cache_store' => null,
|
|
|
|
/*
|
|
* This class will convert markdown to HTML
|
|
*
|
|
* You can change this to a class of your own to greatly
|
|
* customize the rendering process
|
|
*
|
|
* More info: https://spatie.be/docs/laravel-markdown/v1/advanced-usage/customizing-the-rendering-process
|
|
*/
|
|
'renderer_class' => Spatie\LaravelMarkdown\MarkdownRenderer::class,
|
|
|
|
/*
|
|
* These extensions should be added to the markdown environment. A valid
|
|
* extension implements League\CommonMark\Extension\ExtensionInterface
|
|
*
|
|
* More info: https://commonmark.thephpleague.com/2.4/extensions/overview/
|
|
*/
|
|
'extensions' => [
|
|
League\CommonMark\Extension\Attributes\AttributesExtension::class,
|
|
League\CommonMark\Extension\DefaultAttributes\DefaultAttributesExtension::class,
|
|
],
|
|
|
|
|
|
/*
|
|
* These block renderers should be added to the markdown environment. A valid
|
|
* renderer implements League\CommonMark\Renderer\NodeRendererInterface;
|
|
*
|
|
* More info: https://commonmark.thephpleague.com/2.4/customization/rendering/
|
|
*/
|
|
'block_renderers' => [
|
|
// ['class' => FencedCode::class, 'renderer' => MyCustomCodeRenderer::class, 'priority' => 0]
|
|
],
|
|
|
|
/*
|
|
* These inline renderers should be added to the markdown environment. A valid
|
|
* renderer implements League\CommonMark\Renderer\NodeRendererInterface;
|
|
*
|
|
* More info: https://commonmark.thephpleague.com/2.4/customization/rendering/
|
|
*/
|
|
'inline_renderers' => [
|
|
// ['class' => FencedCode::class, 'renderer' => MyCustomCodeRenderer::class, 'priority' => 0]
|
|
],
|
|
|
|
/*
|
|
* These inline parsers should be added to the markdown environment. A valid
|
|
* parser implements League\CommonMark\Renderer\InlineParserInterface;
|
|
*
|
|
* More info: https://commonmark.thephpleague.com/2.4/customization/inline-parsing/
|
|
*/
|
|
'inline_parsers' => [
|
|
// ['parser' => MyCustomInlineParser::class, 'priority' => 0]
|
|
],
|
|
];
|