diff --git a/.env.example b/.env.example index b1cb3f4a..34cdf006 100644 --- a/.env.example +++ b/.env.example @@ -66,6 +66,7 @@ VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" APP_AUTHOR="musimana" APP_COPYRIGHT="MIT (2024)" APP_DESCRIPTION="Laravel VILT stack template app with server-side rendering (SSR), Larastan, Pest & Dusk test suites. Created by Musimana." +APP_IMAGE_OPEN_GRAPH="resources/img/open-graph.png" #APP_KEYWORDS="Musimana, Bassform, Laravel, VILT" APP_LINK_PROJECT_REPO="https://github.com/musimana/bassform" diff --git a/README.md b/README.md index d94b4fb0..78c36ce3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Bassform - VILT SSR +![Bassform - VILT SSR](resources/img/banner-readme.png) + VILT stack template app for PHP 8.2.x created by Musimana. Features include server-side rendering (SSR) and Larastan, Pest & Dusk test suites. [Vue3](https://vuejs.org/), diff --git a/app/Http/Controllers/Public/HomepageController.php b/app/Http/Controllers/Public/HomepageController.php index e8dac86f..4c57935b 100644 --- a/app/Http/Controllers/Public/HomepageController.php +++ b/app/Http/Controllers/Public/HomepageController.php @@ -4,6 +4,7 @@ use App\Http\Controllers\Controller; use App\Http\Resources\Views\Public\Content\HomepageContentResource; +use App\Http\Resources\Views\Public\Metadata\HomepageMetadataResource; use App\Repositories\Views\PublicViewRepository; use Inertia\Response; @@ -16,7 +17,8 @@ public function __invoke(): Response { return (new PublicViewRepository)->getViewDetails( self::TEMPLATE_PUBLIC_INDEX, - (new HomepageContentResource)->getItem() + (new HomepageContentResource)->getItem(), + (new HomepageMetadataResource)->getItem() ); } } diff --git a/app/Http/Resources/Views/Public/Metadata/HomepageMetadataResource.php b/app/Http/Resources/Views/Public/Metadata/HomepageMetadataResource.php new file mode 100644 index 00000000..73118189 --- /dev/null +++ b/app/Http/Resources/Views/Public/Metadata/HomepageMetadataResource.php @@ -0,0 +1,21 @@ + + */ + public function getItem(): array + { + return [ + 'openGraphImage' => Vite::asset(config('metadata.open_graph_image')), + ]; + } +} diff --git a/config/metadata.php b/config/metadata.php index e1773916..9ce81cab 100644 --- a/config/metadata.php +++ b/config/metadata.php @@ -37,6 +37,23 @@ 'description' => env('APP_DESCRIPTION', ''), + /* + |-------------------------------------------------------------------------- + | Open Graph Image + |-------------------------------------------------------------------------- + | + | The string for the filename of the image to be used for the app's + | Open Graph image. Should be in the resources/images directory, so it's + | included in Vite's asset bundling. + | + | Max size: 8MB, 1200px x 630px. + | [Open Graph Docs](https://ogp.me/) + | [Good Blog](https://kaydee.net/blog/open-graph-image/) + | + */ + + 'open_graph_image' => env('APP_IMAGE_OPEN_GRAPH'), + /* |-------------------------------------------------------------------------- | Social Media Links diff --git a/resources/img/banner-readme.png b/resources/img/banner-readme.png new file mode 100644 index 00000000..16f5b49f Binary files /dev/null and b/resources/img/banner-readme.png differ diff --git a/resources/img/open-graph.png b/resources/img/open-graph.png new file mode 100644 index 00000000..8017c338 Binary files /dev/null and b/resources/img/open-graph.png differ diff --git a/resources/js/Components/Icons/IconAppLogo.vue b/resources/js/Components/Icons/IconAppLogo.vue index 40d40a7d..44212723 100644 --- a/resources/js/Components/Icons/IconAppLogo.vue +++ b/resources/js/Components/Icons/IconAppLogo.vue @@ -7,8 +7,8 @@ stroke="currentColor" stroke-width="1" > - + - + diff --git a/resources/js/Components/Sections/AppHead.vue b/resources/js/Components/Sections/AppHead.vue index f0482b39..833b2b41 100644 --- a/resources/js/Components/Sections/AppHead.vue +++ b/resources/js/Components/Sections/AppHead.vue @@ -23,11 +23,11 @@ defineProps({ - - - - - + + + + + diff --git a/resources/js/Components/Sections/AppPanelLink.vue b/resources/js/Components/Sections/AppPanelLink.vue index 1d63c793..d9a83c85 100644 --- a/resources/js/Components/Sections/AppPanelLink.vue +++ b/resources/js/Components/Sections/AppPanelLink.vue @@ -12,7 +12,7 @@ defineProps({