ajaxray/bagisto-opengraph

Setting OpenGraph meta tags for your Bagisto store.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:bagisto-module

v1.0.1 2025-06-06 12:51 UTC

This package is auto-updated.

Last update: 2025-06-06 12:58:20 UTC


README

A Laravel package for Bagisto e-commerce platform that helps to set an Open Graph image for better social media sharing.

Purpose

This package allows you to easily add Open Graph meta tags to your Bagisto e-commerce pages. Open Graph protocol enables any web page to become a rich object in a social graph, making it more engaging when shared on social media platforms like Facebook, Twitter, and LinkedIn.

Features

  • Easy integration with Bagisto
  • Setting Open Graph Image, Title, Description etc. from Bagisto settings panel
  • Add twitter sharing meta tags along with og tags.
  • Dynamic Open Graph meta tag generation
  • Inject meta tags only if not set by Bagisto (because Bagisto sets them for some pages)

Installation

You can install the package via composer:

composer require ajaxray/opengraph

Usage

Once the package is installed, you can set Social preview image in your Bagisto admin panel. Go to Configuration > Design > Social Preview Image and set the image and other details. Social Preview Image

Then, it'll phsh the og:* and twitter:* meta tags in the <head>. Social Preview Tags

Troubleshooting

Even though the package is pushing the \Ajaxray\OpenGraph\Http\Middleware\InjectOpenGraphTags middlewire in the web middlewireGroup, in some cases it dosen't work. If you face the same issue, just add the middlewire manually in the app/Http/Kernel.php file.

protected $middlewareGroups = [
    'web' => [
        // Other middlewires ...
        \Ajaxray\OpenGraph\Http\Middleware\InjectOpenGraphTags::class,
    ],
    
    // Other groups
];

Support

If you have any issues or questions, please open an issue at the GitHub issues.

License

The MIT License (MIT). Please see License File for more information.

Contributing

Thank you for considering contributing to the OpenGraph package! Please read our Contribution Guidelines for details.

Security

If you discover any security-related issues, please email me directly at anis(dot)programmer(at)gmail(dot)com.

🇵🇸 Gaza needs your support.