Created
June 15, 2026 10:38
-
-
Save blopa/d05922fc68a435952767cc670b3d80a2 to your computer and use it in GitHub Desktop.
Code for post "I built a retro RPG game shop extension for my Magento 2 store"
This file contains hidden or 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
| <?php | |
| $mediaUrl = $block->getViewFileUrl('Werules_GameShop::images/shopkeeper.png'); | |
| $baseUrl = $block->getBaseUrl(); | |
| $pageTitle = __('GameShop - Buy & Sell Games'); | |
| $pageDescription = __('Find the best gaming deals, buy and sell games easily!'); | |
| ?> | |
| <!-- Open Graph Meta Tags --> | |
| <meta property="og:image" content="<?= $mediaUrl ?>"/> | |
| <meta property="og:image:alt" content="GameShop Shopkeeper Avatar"/> | |
| <meta property="og:url" content="<?= $baseUrl ?>game-shop"/> | |
| <!-- Twitter Card --> | |
| <meta name="twitter:image" content="<?= $mediaUrl ?>"/> | |
| <!-- JSON-LD Structured Data --> | |
| <script type="application/ld+json"> | |
| { | |
| "@context": "https://schema.org", | |
| "@type": "WebPage", | |
| "name": "<?= $pageTitle ?>", | |
| "description": "<?= $pageDescription ?>", | |
| "image": "<?= $mediaUrl ?>", | |
| "url": "<?= $baseUrl ?>game-shop", | |
| "publisher": { | |
| "@type": "Organization", | |
| "name": "GameShop", | |
| "logo": "<?= $mediaUrl ?>" | |
| } | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment