Skip to content

[Site] Add GitHub admonition Commonmark extension #2751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ux.symfony.com/assets/styles/components/_Changelog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
border-right: 1px solid var(--bs-secondary-bg);
}

.Changelog blockquote {
color: grey;
border-left: grey 3px solid;
padding-left: .75rem;
}

.ChangelogItem {
display: grid;
gap: 4rem;
Expand Down
3 changes: 2 additions & 1 deletion ux.symfony.com/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"twig/intl-extra": "^3.17",
"twig/markdown-extra": "^3.17",
"twig/string-extra": "^3.17",
"twig/twig": "^3.17"
"twig/twig": "^3.17",
"zenstruck/commonmark-extensions": "1.x-dev"
},
"require-dev": {
"phpunit/phpunit": "^9.6.21",
Expand Down
64 changes: 61 additions & 3 deletions ux.symfony.com/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ux.symfony.com/src/Service/CommonMark/ConverterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use League\CommonMark\Extension\FrontMatter\FrontMatterExtension;
use League\CommonMark\Extension\Mention\MentionExtension;
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
use Zenstruck\CommonMark\Extension\GitHub\AdmonitionExtension;

/**
* @author Kevin Bond <kevinbond@gmail.com>
Expand Down Expand Up @@ -55,6 +56,7 @@ public function __invoke(): CommonMarkConverter
->addExtension(new ExternalLinkExtension())
->addExtension(new MentionExtension())
->addExtension(new FrontMatterExtension())
->addExtension(new AdmonitionExtension())
->addRenderer(FencedCode::class, new CodeBlockRenderer($this->toolkitService))
;

Expand Down