From ba7caaf0f23158475952e5db258ce847a22cb21e Mon Sep 17 00:00:00 2001 From: Antoine Benevaut Date: Thu, 2 Nov 2023 14:26:23 +0100 Subject: [PATCH 1/8] wip --- .idea/opensource.iml | 25 +- .idea/php.xml | 124 ++++ .idea/phpspec.xml | 3 + .idea/phpunit.xml | 8 + laravel-one/composer.json | 1 + laravel-one/composer.lock | 736 ++++++++++++++++++++++-- laravel-one/config/app.php | 1 + laravel-one/config/markdown.php | 97 ++++ laravel-one/content/index.yml | 27 + laravel-one/theme/home.blade.php | 52 +- laravel-one/theme/layouts/app.blade.php | 9 + 11 files changed, 963 insertions(+), 120 deletions(-) create mode 100644 laravel-one/config/markdown.php diff --git a/.idea/opensource.iml b/.idea/opensource.iml index eadf124a..8fb07980 100644 --- a/.idea/opensource.iml +++ b/.idea/opensource.iml @@ -2,13 +2,6 @@ - - - - - - - @@ -16,7 +9,14 @@ - + + + + + + + + @@ -173,6 +173,15 @@ + + + + + + + + + diff --git a/.idea/php.xml b/.idea/php.xml index 87c23289..bc84f3c7 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -973,6 +973,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/phpspec.xml b/.idea/phpspec.xml index a232211f..2e07e089 100644 --- a/.idea/phpspec.xml +++ b/.idea/phpspec.xml @@ -35,6 +35,9 @@ + + \ No newline at end of file diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml index cda53219..ed8d206a 100644 --- a/.idea/phpunit.xml +++ b/.idea/phpunit.xml @@ -5,7 +5,15 @@ diff --git a/laravel-one/composer.json b/laravel-one/composer.json index d55afeaf..97f4f305 100644 --- a/laravel-one/composer.json +++ b/laravel-one/composer.json @@ -24,6 +24,7 @@ "illuminate/view": "^10.9", "nunomaduro/termwind": "^1.15", "spatie/laravel-data": "^3.5", + "spatie/laravel-markdown": "^2.4", "spatie/laravel-sitemap": "^6.3", "symfony/yaml": "^6.2" }, diff --git a/laravel-one/composer.lock b/laravel-one/composer.lock index 2ab3ad51..a9c96f6c 100644 --- a/laravel-one/composer.lock +++ b/laravel-one/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": "559ca0c9bdf665589e1f518124b04202", + "content-hash": "74c04938b50fb482868e475b6373ea01", "packages": [ { "name": "abenevaut/laravel-infrastructure", @@ -69,6 +69,81 @@ }, "time": "2023-01-01T14:58:55+00:00" }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "f41715465d65213d644d3141a6a93081be5d3549" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", + "reference": "f41715465d65213d644d3141a6a93081be5d3549", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + }, + "time": "2022-10-27T11:44:00+00:00" + }, { "name": "doctrine/deprecations", "version": "v1.1.1", @@ -743,6 +818,68 @@ }, "time": "2023-05-22T13:32:28+00:00" }, + { + "name": "illuminate/cache", + "version": "v10.9.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/cache.git", + "reference": "905e85483a8caa21d8b4929a29fbb43548064b6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/cache/zipball/905e85483a8caa21d8b4929a29fbb43548064b6f", + "reference": "905e85483a8caa21d8b4929a29fbb43548064b6f", + "shasum": "" + }, + "require": { + "illuminate/collections": "^10.0", + "illuminate/contracts": "^10.0", + "illuminate/macroable": "^10.0", + "illuminate/support": "^10.0", + "php": "^8.1" + }, + "provide": { + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "suggest": { + "ext-apcu": "Required to use the APC cache driver.", + "ext-filter": "Required to use the DynamoDb cache driver.", + "ext-memcached": "Required to use the memcache cache driver.", + "illuminate/database": "Required to use the database cache driver (^10.0).", + "illuminate/filesystem": "Required to use the file cache driver (^10.0).", + "illuminate/redis": "Required to use the redis cache driver (^10.0).", + "symfony/cache": "Required to use PSR-6 cache bridge (^6.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Cache package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2023-04-18T18:18:06+00:00" + }, { "name": "illuminate/collections", "version": "v10.20.0", @@ -1595,6 +1732,194 @@ ], "time": "2022-05-21T17:30:32+00:00" }, + { + "name": "league/commonmark", + "version": "2.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "3669d6d5f7a47a93c08ddff335e6d945481a1dd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/3669d6d5f7a47a93c08ddff335e6d945481a1dd5", + "reference": "3669d6d5f7a47a93c08ddff335e6d945481a1dd5", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2023-08-30T16:55:00+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" + }, { "name": "league/flysystem", "version": "3.15.1", @@ -2193,6 +2518,154 @@ ], "time": "2023-08-03T09:00:52+00:00" }, + { + "name": "nette/schema", + "version": "v1.2.5", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a", + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": "7.1 - 8.3" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "๐Ÿ“ Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.5" + }, + "time": "2023-10-05T20:37:59+00:00" + }, + { + "name": "nette/utils", + "version": "v4.0.2", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "cead6637226456b35e1175cc53797dd585d85545" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/cead6637226456b35e1175cc53797dd585d85545", + "reference": "cead6637226456b35e1175cc53797dd585d85545", + "shasum": "" + }, + "require": { + "php": ">=8.0 <8.4" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "^2.5", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.9" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "๐Ÿ›  Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.0.2" + }, + "time": "2023-09-19T11:58:07+00:00" + }, { "name": "nicmart/tree", "version": "0.3.1", @@ -3222,6 +3695,66 @@ ], "time": "2023-01-03T19:12:47+00:00" }, + { + "name": "spatie/commonmark-shiki-highlighter", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/commonmark-shiki-highlighter.git", + "reference": "52528a02f61d84030b313b5c7b0c4dd8edca7187" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/commonmark-shiki-highlighter/zipball/52528a02f61d84030b313b5c7b0c4dd8edca7187", + "reference": "52528a02f61d84030b313b5c7b0c4dd8edca7187", + "shasum": "" + }, + "require": { + "league/commonmark": "^2.0", + "php": "^8.0", + "spatie/shiki-php": "^1.1.1", + "symfony/process": "^5.3|^6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "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.1.1" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-11-28T08:03:04+00:00" + }, { "name": "spatie/crawler", "version": "7.1.3", @@ -3497,6 +4030,82 @@ ], "time": "2023-05-05T15:24:41+00:00" }, + { + "name": "spatie/laravel-markdown", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-markdown.git", + "reference": "38d11c666ccdbf111535677c1d927b349b64aca4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-markdown/zipball/38d11c666ccdbf111535677c1d927b349b64aca4", + "reference": "38d11c666ccdbf111535677c1d927b349b64aca4", + "shasum": "" + }, + "require": { + "illuminate/cache": "^8.49|^9.0|^10.0", + "illuminate/contracts": "^8.37|^9.0|^10.0", + "illuminate/support": "^8.49|^9.0|^10.0", + "illuminate/view": "^8.49|^9.0|^10.0", + "league/commonmark": "^2.2", + "php": "^8.0", + "spatie/commonmark-shiki-highlighter": "^2.0", + "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.4.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-08-17T06:59:15+00:00" + }, { "name": "spatie/laravel-package-tools", "version": "1.15.0", @@ -3692,6 +4301,69 @@ ], "time": "2022-05-18T15:14:21+00:00" }, + { + "name": "spatie/shiki-php", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/shiki-php.git", + "reference": "34fe61405b405c735c82a9c56feffd3f7c5544ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/shiki-php/zipball/34fe61405b405c735c82a9c56feffd3f7c5544ff", + "reference": "34fe61405b405c735c82a9c56feffd3f7c5544ff", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "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/1.3.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-06-01T11:28:41+00:00" + }, { "name": "spatie/temporary-directory", "version": "2.1.2", @@ -6430,68 +7102,6 @@ }, "time": "2020-07-09T08:09:16+00:00" }, - { - "name": "illuminate/cache", - "version": "v10.9.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/cache.git", - "reference": "905e85483a8caa21d8b4929a29fbb43548064b6f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/905e85483a8caa21d8b4929a29fbb43548064b6f", - "reference": "905e85483a8caa21d8b4929a29fbb43548064b6f", - "shasum": "" - }, - "require": { - "illuminate/collections": "^10.0", - "illuminate/contracts": "^10.0", - "illuminate/macroable": "^10.0", - "illuminate/support": "^10.0", - "php": "^8.1" - }, - "provide": { - "psr/simple-cache-implementation": "1.0|2.0|3.0" - }, - "suggest": { - "ext-apcu": "Required to use the APC cache driver.", - "ext-filter": "Required to use the DynamoDb cache driver.", - "ext-memcached": "Required to use the memcache cache driver.", - "illuminate/database": "Required to use the database cache driver (^10.0).", - "illuminate/filesystem": "Required to use the file cache driver (^10.0).", - "illuminate/redis": "Required to use the redis cache driver (^10.0).", - "symfony/cache": "Required to use PSR-6 cache bridge (^6.2)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Cache package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2023-04-18T18:18:06+00:00" - }, { "name": "illuminate/config", "version": "v10.9.0", diff --git a/laravel-one/config/app.php b/laravel-one/config/app.php index a433b005..7124614b 100644 --- a/laravel-one/config/app.php +++ b/laravel-one/config/app.php @@ -70,6 +70,7 @@ App\Providers\AppServiceProvider::class, Illuminate\Routing\RoutingServiceProvider::class, Spatie\Sitemap\SitemapServiceProvider::class, + Spatie\LaravelMarkdown\MarkdownServiceProvider::class, \abenevaut\Infrastructure\App\Providers\ArkitectServiceProvider::class, ], diff --git a/laravel-one/config/markdown.php b/laravel-one/config/markdown.php new file mode 100644 index 00000000..e4f2898f --- /dev/null +++ b/laravel-one/config/markdown.php @@ -0,0 +1,97 @@ + [ + /* + * 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, + + /* + * 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/laravel-one/content/index.yml b/laravel-one/content/index.yml index cc1b1e2c..3188c9a5 100644 --- a/laravel-one/content/index.yml +++ b/laravel-one/content/index.yml @@ -5,3 +5,30 @@ seo: description: laravel-one, tool to generate static webpages with blade keywords: laravel-one, static webpages, sitemap, blade php author: Antoine Benevaut + +readme: >1 + # laravel-one documentation + Tool to generate static webpages based on Blade Templates. + + - credits to tailwindtoolbox for the HTML template + + ## Install + - Available on Packagist.org - abenevaut/laravel-one + + ### Globally + ``` + composer global require abenevaut/laravel-one + ``` + + #### Usage + ``` + laravel-one generate https://my-website.com + ``` + + To setup your first website, follow the wiki + + ## Build + ``` + php laravel-one app:build laravel-one + php laravel-one app:build laravel-one --build-version=0.0.X + ``` diff --git a/laravel-one/theme/home.blade.php b/laravel-one/theme/home.blade.php index d0463d91..798d27ba 100644 --- a/laravel-one/theme/home.blade.php +++ b/laravel-one/theme/home.blade.php @@ -3,55 +3,9 @@ @section('content')
- -
-

laravel-one documentation

-
- - - Tool to generate static webpages based on Blade Templates. - - - -

Install

- - - -

Globally

-
-            
-composer global require abenevaut/laravel-one
-            
-        
- -

Usage

-
-            
-laravel-one generate https://my-website.com
-            
-        
- - - To setup your first website, follow the wiki - - -

Build

-
-            
-php laravel-one app:build laravel-one
-php laravel-one app:build laravel-one --build-version=0.0.X
-            
-        
- + + {!! $readme !!} +
-
@endsection diff --git a/laravel-one/theme/layouts/app.blade.php b/laravel-one/theme/layouts/app.blade.php index 0c3fa8cd..d3c7cbc4 100644 --- a/laravel-one/theme/layouts/app.blade.php +++ b/laravel-one/theme/layouts/app.blade.php @@ -57,7 +57,16 @@ function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTim + - @yield('content') -
-
-
-
-
-

About

-

- Tool to generate static webpages based on Blade Templates. -

-
-
-
-
-

Project

- -
-
-
-
-
- - From 37aed91f08b3e664161bcc2607d74520823f32d2 Mon Sep 17 00:00:00 2001 From: Antoine B Date: Sun, 5 Nov 2023 13:50:51 +0100 Subject: [PATCH 8/8] wip --- .github/workflows/laravel-one-release.yml | 6 +++--- .github/workflows/laravel-one-test.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/laravel-one-release.yml b/.github/workflows/laravel-one-release.yml index 2ae4db60..57206918 100644 --- a/.github/workflows/laravel-one-release.yml +++ b/.github/workflows/laravel-one-release.yml @@ -24,9 +24,6 @@ jobs: container: ghcr.io/abenevaut/vapor-ci:php${{ env.php_version }} steps: - - name: Install PHP extension - run: docker-php-ext-install exif - - name: Checkout project uses: actions/checkout@v3 with: @@ -36,6 +33,9 @@ jobs: id: branch-name run: echo "SOURCE_TAG=${GITHUB_REF#refs/tags/phpunit-slicer-}" >> $GITHUB_OUTPUT + - name: Install PHP extension + run: docker-php-ext-install exif + - name: Configure Composer cache id: composer-cache uses: actions/cache@v3 diff --git a/.github/workflows/laravel-one-test.yml b/.github/workflows/laravel-one-test.yml index 017da281..f72064cb 100644 --- a/.github/workflows/laravel-one-test.yml +++ b/.github/workflows/laravel-one-test.yml @@ -31,14 +31,14 @@ jobs: container: ghcr.io/abenevaut/vapor-ci:php${{ matrix.php_version }} steps: - - name: Install PHP extension - run: docker-php-ext-install exif - - name: Checkout project uses: actions/checkout@v3 with: fetch-depth: 2 + - name: Install PHP extension + run: docker-php-ext-install exif + - name: Configure Composer cache id: composer-cache uses: actions/cache@v3