diff --git a/bin/create-uploads-dir b/bin/create-uploads-dir index 660afd9..03cc96b 100755 --- a/bin/create-uploads-dir +++ b/bin/create-uploads-dir @@ -34,12 +34,6 @@ $entityManager = $container->get(EntityManager::class); $postRepository = $entityManager->getRepository(Post::class); /** - * Index every file anywhere under public/ by basename, so we can locate the - * source file for each image referenced from a template or markdown - * article - including images already sitting in some other article's - * uploads/article/{uuid}/ directory (e.g. left over from before a post's - * UUID changed), not just loose files dropped outside uploads/article/. - * * @return array */ function indexUploadSources(string $publicDir): array @@ -65,11 +59,6 @@ function indexUploadSources(string $publicDir): array } /** - * Extract every (uuid, filename) pair referenced via an - * "uploads/article/{uuid}/{filename}" path in Markdown article content - - * these are hardcoded literally in .md files, unlike the dynamic - * `~ article.id ~` expression used in .html.twig templates. - * * @return list */ function extractArticleImageRefs(string $contents): array @@ -99,7 +88,6 @@ function extractArticleImageRefs(string $contents): array $sourceIndex = indexUploadSources($publicDir); -// Matches the filename in: asset('uploads/article/' ~ article.id ~ '/filename.ext') $pattern = '/~\s*article\.id\s*~\s*\'\/([^\']+)\'/'; $filesProcessed = 0; @@ -171,16 +159,6 @@ foreach ($templateIterator as $file) { } } -/** - * Markdown articles (public/md-articles/{category-slug}/{article-slug}.md) - * embed uploads/article/{uuid}/{filename} paths as literal text, unlike - * .html.twig templates whose `~ article.id ~` is resolved dynamically. Since - * a Post's UUID (uuid7) is generated fresh the first time its slug is - * fixture-inserted in a given environment, a UUID hardcoded in a .md file - * drifts from the Post's real UUID as soon as that slug is (re)seeded - * elsewhere. This pass detects that drift, rewrites the file to the real - * UUID, and makes sure the image is available under the corrected path. - */ $mdArticlesDir = 'public/md-articles'; $mdFilesProcessed = 0; @@ -200,10 +178,6 @@ if (is_dir($mdArticlesDir)) { } $path = $file->getPathname(); - - // Only handle files one level under a category directory, i.e. - // public/md-articles/{category-slug}/{article-slug}.md - skips - // stray top-level files such as md-articles/index.md. $relative = ltrim(substr($path, strlen($mdArticlesDir)), '/'); if (substr_count($relative, '/') !== 1) { continue; diff --git a/public/md-articles/best-practice/basic-security-in-dotkernel-headless-platform.md b/public/md-articles/best-practice/basic-security-in-dotkernel-headless-platform.md index a3ac45d..871c516 100644 --- a/public/md-articles/best-practice/basic-security-in-dotkernel-headless-platform.md +++ b/public/md-articles/best-practice/basic-security-in-dotkernel-headless-platform.md @@ -48,7 +48,7 @@ Let's take a practical view on software security in Dotkernel. You should never trust that the user inputs correct data by passing it directly into your business logic. By defining the configuration for an input filter, you ensure that a field is both present, and of the correct type. -[Dotkernel API](https://www.dotkernel.org) makes use of [laminas/laminas-inputfilter](https://github.com/laminas/laminas-inputfilter) for this purpose. +[Dotkernel API](https://www.dotkernel.com/api/) makes use of [laminas/laminas-inputfilter](https://github.com/laminas/laminas-inputfilter) for this purpose. In addition to the above filtering, Dotkernel Admin also makes use of [laminas/laminas-form](https://github.com/laminas/laminas-form). laminas-form contains: diff --git a/public/md-articles/dotkernel-api/dotkernel-api-versus-laminas-api-tools.md b/public/md-articles/dotkernel-api/dotkernel-api-versus-laminas-api-tools.md index fec262c..e4e3900 100644 --- a/public/md-articles/dotkernel-api/dotkernel-api-versus-laminas-api-tools.md +++ b/public/md-articles/dotkernel-api/dotkernel-api-versus-laminas-api-tools.md @@ -22,7 +22,7 @@ It's intended to highlight the differences between the two and also to showcase | | **API Tools (formerly Apigility)** | **Dotkernel API** | | --- | --- | --- | -| URL | [api-tools](https://api-tools.getlaminas.org/) | [Dotkernel API](https://www.dotkernel.org) | +| URL | [api-tools](https://api-tools.getlaminas.org/) | [Dotkernel API](https://www.dotkernel.com/api/) | | First Release | 2012 | 2018 | | PHP Version | <= 8.2 | ![PHP Version](https://img.shields.io/packagist/php-v/dotkernel/api) | | Architecture | MVC, Event Driven | Middleware | diff --git a/public/md-articles/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.md b/public/md-articles/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.md index ebd417e..ff7ffa8 100644 --- a/public/md-articles/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.md +++ b/public/md-articles/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.md @@ -153,6 +153,6 @@ A: Both live in src/App/templates/layout/default.html.twig: the top menu items a ## Resources -- [dotkernel.org](https://www.dotkernel.org) - a working example +- [dotkernel.org](https://www.dotkernel.com/api/) - a working example - [Dotkernel Light](https://github.com/dotkernel/light) - [More from Dotkernel](https://github.com/dotkernel) diff --git a/public/md-articles/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.md b/public/md-articles/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.md index 1bb19c9..337d468 100644 --- a/public/md-articles/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.md +++ b/public/md-articles/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.md @@ -19,7 +19,7 @@ Using both together, sharing a common Core module, gives consistent entities and The Dotkernel Headless Platform contains two major components: -- [Dotkernel API](https://www.dotkernel.org) - a REST API based on the [Mezzio skeleton](https://github.com/mezzio/mezzio-skeleton). +- [Dotkernel API](https://www.dotkernel.com/api/) - a REST API based on the [Mezzio skeleton](https://github.com/mezzio/mezzio-skeleton). - [Dotkernel Admin](https://github.com/dotkernel/admin) - a complementary component aimed at quickly setting up a backend for your platform. The Admin is not bundled by default but is available as a first-party, installable application designed to work seamlessly alongside your API. diff --git a/src/App/templates/partial/left-menu.html.twig b/src/App/templates/partial/left-menu.html.twig index 1fc59b9..9bc6b5b 100644 --- a/src/App/templates/partial/left-menu.html.twig +++ b/src/App/templates/partial/left-menu.html.twig @@ -65,7 +65,7 @@
  • - + Dotkernel API