diff --git a/composer.json b/composer.json index edd0d9c..7ebb891 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "simplesoftwareio/simple-qrcode": "^4.2", "spatie/image": "^3.7", "spatie/laravel-google-fonts": "^1.4", + "spatie/laravel-markdown": "^2.5", "spatie/laravel-medialibrary": "^11.9", "spatie/laravel-sluggable": "^3.6", "spatie/laravel-tags": "^4.6", diff --git a/composer.lock b/composer.lock index a87d0be..6e406d8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "84d9debf7e9e72bf3e450a771225396d", + "content-hash": "84b5a6a420aba2ae3bf94bad89b46a41", "packages": [ { "name": "akuechler/laravel-geoly", @@ -6127,6 +6127,66 @@ }, "time": "2024-01-09T14:57:04+00:00" }, + { + "name": "spatie/commonmark-shiki-highlighter", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/commonmark-shiki-highlighter.git", + "reference": "3dd337649d87a9b264838320a07a89d22e75d41b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/commonmark-shiki-highlighter/zipball/3dd337649d87a9b264838320a07a89d22e75d41b", + "reference": "3dd337649d87a9b264838320a07a89d22e75d41b", + "shasum": "" + }, + "require": { + "league/commonmark": "^2.4.2", + "php": "^8.0", + "spatie/shiki-php": "^2.0", + "symfony/process": "^6.0|^7.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19|^v3.49.0", + "phpunit/phpunit": "^9.5", + "spatie/phpunit-snapshot-assertions": "^4.2.7", + "spatie/ray": "^1.28" + }, + "type": "commonmark-extension", + "autoload": { + "psr-4": { + "Spatie\\CommonMarkShikiHighlighter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Highlight code blocks with league/commonmark and Shiki", + "homepage": "https://github.com/spatie/commonmark-shiki-highlighter", + "keywords": [ + "commonmark-shiki-highlighter", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/commonmark-shiki-highlighter/tree/2.4.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-04-11T12:12:10+00:00" + }, { "name": "spatie/eloquent-sortable", "version": "4.4.0", @@ -6411,6 +6471,82 @@ ], "time": "2024-03-14T09:50:35+00:00" }, + { + "name": "spatie/laravel-markdown", + "version": "2.5.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-markdown.git", + "reference": "66660b21cbc8e50c6129cfe9fac4d96beac8f8e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-markdown/zipball/66660b21cbc8e50c6129cfe9fac4d96beac8f8e5", + "reference": "66660b21cbc8e50c6129cfe9fac4d96beac8f8e5", + "shasum": "" + }, + "require": { + "illuminate/cache": "^9.0|^10.0|^11.0", + "illuminate/contracts": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "illuminate/view": "^9.0|^10.0|^11.0", + "league/commonmark": "^2.4.2", + "php": "^8.1", + "spatie/commonmark-shiki-highlighter": "^2.3", + "spatie/laravel-package-tools": "^1.4.3" + }, + "require-dev": { + "brianium/paratest": "^6.2", + "nunomaduro/collision": "^5.3|^6.0", + "orchestra/testbench": "^6.15|^7.0|^8.0", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.3", + "spatie/laravel-ray": "^1.23", + "spatie/pest-plugin-snapshots": "^1.1", + "vimeo/psalm": "^4.8" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelMarkdown\\MarkdownServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\LaravelMarkdown\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "A highly configurable markdown renderer and Blade component for Laravel", + "homepage": "https://github.com/spatie/laravel-markdown", + "keywords": [ + "Laravel-Markdown", + "laravel", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/laravel-markdown/tree/2.5.2" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-04-22T14:16:23+00:00" + }, { "name": "spatie/laravel-medialibrary", "version": "11.9.2", @@ -6791,6 +6927,71 @@ ], "time": "2024-07-24T14:26:27+00:00" }, + { + "name": "spatie/shiki-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/shiki-php.git", + "reference": "dc2305e2f96420219b741c70df86d6f452f15688" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/shiki-php/zipball/dc2305e2f96420219b741c70df86d6f452f15688", + "reference": "dc2305e2f96420219b741c70df86d6f452f15688", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.4|^8.0", + "symfony/process": "^5.4|^6.4|^7.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.0", + "pestphp/pest": "^1.8", + "phpunit/phpunit": "^9.5", + "spatie/pest-plugin-snapshots": "^1.1", + "spatie/ray": "^1.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ShikiPhp\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rias Van der Veken", + "email": "rias@spatie.be", + "role": "Developer" + }, + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Highlight code using Shiki in PHP", + "homepage": "https://github.com/spatie/shiki-php", + "keywords": [ + "shiki", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/shiki-php/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-09-29T17:24:24+00:00" + }, { "name": "spatie/temporary-directory", "version": "2.2.1", diff --git a/config/markdown.php b/config/markdown.php new file mode 100644 index 0000000..d2cc5ff --- /dev/null +++ b/config/markdown.php @@ -0,0 +1,106 @@ + [ + /* + * 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' => [], + + /* + * 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, + + + /* + * When cache_store is enabled, this value will be used to determine + * how long the cache will be valid. If you set this to `null` the + * cache will never expire. + * + */ + 'cache_duration' => 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' => [ + // + ], + + /* + * 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] + ], +]; diff --git a/package.json b/package.json index 5c2d53f..f2f4b67 100644 --- a/package.json +++ b/package.json @@ -23,5 +23,8 @@ "vite": "^5.0", "webln": "^0.3.2" }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", + "dependencies": { + "shiki": "^1.22.0" + } } diff --git a/resources/views/pages/association/project-support/index.blade.php b/resources/views/pages/association/project-support/index.blade.php index 97a894c..421a350 100644 --- a/resources/views/pages/association/project-support/index.blade.php +++ b/resources/views/pages/association/project-support/index.blade.php @@ -42,7 +42,7 @@ state([ -
+
@@ -52,7 +52,7 @@ state([ + label="Projekt einreichen"/>
@@ -93,7 +93,7 @@ state([ Meetup 01 + src="{{ asset('einundzwanzig-alpha.jpg') }}" alt="Meetup 01">