forked from laravel/laravel.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Tailwind, Alpine, and colors * Upgrade to Laravel 8 * wip * Implement new home page design * updating text * formatting * Search improvements * compile * Fix search colors * compile * formatting * wip * Add Octane to the ecosystem * fixes * wip * Add Breeze to ecosystem * formatting * Update testimonials section * wip * add more testimonials * Update testimonials * Use Torchlight dark mode * Fix markdown issues * wip * wip * compile * Try using dark cod eblocks. * Dark code all the way * Add torchlight attribution * Add attribute commonmark extension * remove unneeded code Co-authored-by: Jason Beggs <[email protected]>
- Loading branch information
1 parent
617110a
commit ec0756e
Showing
72 changed files
with
8,651 additions
and
8,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace App\Markdown; | ||
|
||
use League\CommonMark\MarkdownConverter; | ||
use League\CommonMark\Environment\Environment; | ||
use App\Markdown\GithubFlavoredMarkdownExtension; | ||
use Torchlight\Commonmark\V2\TorchlightExtension; | ||
use League\CommonMark\Environment\EnvironmentInterface; | ||
use League\CommonMark\Extension\Attributes\AttributesExtension; | ||
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension; | ||
|
||
/** | ||
* Converts GitHub Flavored Markdown to HTML. | ||
*/ | ||
class GithubFlavoredMarkdownConverter extends MarkdownConverter | ||
{ | ||
/** | ||
* Create a new Markdown converter pre-configured for GFM | ||
* | ||
* @param array<string, mixed> $config | ||
*/ | ||
public function __construct(array $config = []) | ||
{ | ||
$environment = new Environment($config); | ||
$environment->addExtension(new CommonMarkCoreExtension()); | ||
$environment->addExtension(new GithubFlavoredMarkdownExtension()); | ||
$environment->addExtension(new AttributesExtension()); | ||
$environment->addExtension(new TorchlightExtension()); | ||
|
||
parent::__construct($environment); | ||
} | ||
|
||
public function getEnvironment(): EnvironmentInterface | ||
{ | ||
\assert($this->environment instanceof EnvironmentInterface); | ||
|
||
return $this->environment; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace App\Markdown; | ||
|
||
use League\CommonMark\Extension\ExtensionInterface; | ||
use League\CommonMark\Extension\Table\TableExtension; | ||
use League\CommonMark\Extension\Autolink\AutolinkExtension; | ||
use League\CommonMark\Extension\TaskList\TaskListExtension; | ||
use League\CommonMark\Environment\EnvironmentBuilderInterface; | ||
use League\CommonMark\Extension\Strikethrough\StrikethroughExtension; | ||
|
||
final class GithubFlavoredMarkdownExtension implements ExtensionInterface | ||
{ | ||
public function register(EnvironmentBuilderInterface $environment): void | ||
{ | ||
$environment->addExtension(new AutolinkExtension()); | ||
$environment->addExtension(new StrikethroughExtension()); | ||
$environment->addExtension(new TableExtension()); | ||
$environment->addExtension(new TaskListExtension()); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.