{"id":28715593,"url":"https://github.com/abdellahrk/seobundle","last_synced_at":"2025-06-15T02:10:30.412Z","repository":{"id":285750661,"uuid":"958626803","full_name":"abdellahrk/SeoBundle","owner":"abdellahrk","description":"A complete SEO solution for Symfony projects. This bundle handles meta tags, Open Graph, Twitter Cards, canonical URLs, sitemaps, and more—helping your app stay search-engine friendly and socially shareable out of the box.","archived":false,"fork":false,"pushed_at":"2025-04-20T06:53:25.000Z","size":4898,"stargazers_count":23,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-19T03:08:38.665Z","etag":null,"topics":["canonical-urls","meta-tags","meta-tags-management","open-graph","robots-txt","search-engine-optimization","seo","seo-bundle","sitemaps","social-sharing","symfony-seo","twitter-cards","webmaster-tools"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/rami/seo-bundle","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdellahrk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-01T13:59:18.000Z","updated_at":"2025-05-09T12:23:10.000Z","dependencies_parsed_at":"2025-04-17T18:43:35.885Z","dependency_job_id":"61b79e0e-9f41-4cc5-87a7-ee95cbe8c3d3","html_url":"https://github.com/abdellahrk/SeoBundle","commit_stats":null,"previous_names":["abdellahrk/seobundle"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/abdellahrk/SeoBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdellahrk%2FSeoBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdellahrk%2FSeoBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdellahrk%2FSeoBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdellahrk%2FSeoBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdellahrk","download_url":"https://codeload.github.com/abdellahrk/SeoBundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdellahrk%2FSeoBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259910742,"owners_count":22930713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canonical-urls","meta-tags","meta-tags-management","open-graph","robots-txt","search-engine-optimization","seo","seo-bundle","sitemaps","social-sharing","symfony-seo","twitter-cards","webmaster-tools"],"created_at":"2025-06-15T02:10:29.790Z","updated_at":"2025-06-15T02:10:30.405Z","avatar_url":"https://github.com/abdellahrk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"This Bundle supports\n====================\n-   [x] [Meta Tags](docs/meta_tags.md)\n-   [x] [OpenGraph (Twitter Cards, Facebook, LinkedIn, Instagram, Discord and more)](docs/open_graph.md)\n-   [x] [Structured Data (Schema)](docs/schema.md)\n-   [x] [Sitemap Generation](docs/sitemap.md)\n-   [x] [Google Tag](docs/google_tag.md)\n-   [x] [Meta Pixel](docs/meta_pixel.md)\n-   [ ] SEO Profiling [Dev mode]\n-   [ ] Breadcrum Generation\n\n\nInstallation\n============\n\nMake sure Composer is installed globally, as explained in the\n[installation chapter](https://getcomposer.org/doc/00-intro.md)\nof the Composer documentation.\n\nOpen a command console, enter your project directory and execute:\n\n```console\ncomposer require rami/seo-bundle\n```\n\nThis will enable the bundle by adding it to the list of registered bundles\nin the `config/bundles.php` file of your project:\n\n```php\n// config/bundles.php\n\nreturn [\n    // ...\n    Abdellahramadan\\SeoBundle\\SeoBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\n#### For full documentation, click on the desired topic above to be taken to its documentation page\n\n# Meta Tags\n\n##### Example\nDefine Meta Tags in Two ways:\n\n1.  Type hint the `MetaTagsInterface` into a controller\n\n```php\nuse Abdellahramadan\\SeoBundle\\Metas\\MetaTagsManagerInterface;\n\n\npublic function myController(MetaTagsManagerInterface $metaTags): Response \n{\n    $metaTags-\u003esetTitle('My Title')\n        -\u003esetDescription('This is the description of the page')\n        -\u003esetKeywords(['keywords', 'seo', 'meta'])\n        -\u003esetCanonical('https://canonical.com')\n    ;\n}\n```\n\n2.  Directly in twig \n```php\n{{ meta_tags(title: 'My Title', description: 'This is the description of the page' ...)}\n```\n\nMake sure you add this `{{ meta_tags }}` to the head your Twig file (preferably the base template)\n```php\n\u003chead\u003e\n    {{ meta_tags() }}\n\u003c/head\u003e\n```\n\nThis will render in the head the following\n\n```html\n\u003chead\u003e\n    \u003ctitle\u003eMy Title\u003c/title\u003e\n    \u003cmeta name=\"description\" content=\"This is the description of the page'\"\u003e\n    \u003cmeta name=\"keywords\" content=\"keywords, seo, meta\"\u003e\n    \u003clink rel=\"canonical\" href=\"https://canonical.com\"\u003e\n\u003c/head\u003e\n```\n\nOpen Graph\n=\n\n### Example\n\n### Add to template file\nAdd ```{{ open_graph() }}``` to the base template or any page where the meta information will be injected\n\n### Add meta inforation\nIn your controller, type-hint `OpenGraphInterface`\n\n### Example\n```php\n\nuse Abdellahramadan\\OpenGraphBundle\\OpenGraph\\OpenGraphManagerInterface;\n\nclass HomeController extends AbstractController\n{\n    public function index(OpenGraphManagerInterface $openGraph): Response\n    {\n        $openGraph\n            -\u003esetTitle('My website')\n            -\u003esetDescription('Some descriptions ...')\n            -\u003esetSiteName('My Blog')\n        ;\n            ...\n        return $this-render('index.html.twig');\n    }\n}\n```\nThis will render\n```html\n\u003cmeta property=\"og:title\" content=\"My website\"\u003e\n\u003cmeta property=\"og:description\" content=\"Some descriptions ...\"\u003e\n\u003cmeta property=\"og:site_name\" content=\"My Blog\"\u003e\n```\nYou can also leave out setting the properties in the controller and set directly in Twi\n```php\n{{ meta_tags(title: 'My website', siteName: 'My Blog') }}\n```\n\nfull document at [Open Graph Docs](docs/open_graph.md)\n\nSchema Org [Rich Result]\n========================\n\n### Usage\n\n```php\nuse Rami\\SeoBundle\\Schema\\SchemaInterface;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\n...\n    #[Route('/', name: 'app_home')]\n    public function index(SchemaInterface $schema): Response\n    {\n        $person = $schema\n            -\u003eperson()\n            -\u003ename('Abdel Ramadan')\n            -\u003eemail('abdellah@hey.cm')\n            -\u003echildren([\n                $schema-\u003eperson()-\u003ename('Rami')-\u003eemail('ramadanabdel24@gmail.com')-\u003egivenName('Ramadan'), \n                $schema-\u003eperson()-\u003ename('Rami 3')-\u003eemail('test@gmail.com')\n            ]);\n        $schema-\u003erender($person);\n    }\n```\nenable the schema in the config:\n\n```yaml\nseo:\n  schema:\n    enabled: true\n```\n\n\nThis is an example using the `Person` object which will render\n\n```html\n\u003cscript type=\"application/ld+json\"\u003e\n{\n    \"@context\": \"https://schema.org\",\n    \"@type\": \"Person\",\n    \"name\": \"Abdel Ramadan\",\n    \"email\": \"abdellah@hey.cm\",\n    \"children\": [\n        {\n            \"@type\": \"Person\",\n            \"name\": \"Rami\",\n            \"email\": \"ramadanabdel24@gmail.com\",\n            \"givenName\": \"Ramadan\"\n        },\n        {\n            \"@type\": \"Person\",\n            \"name\": \"Rami 3\",\n            \"email\": \"test@gmail.com\"\n        }\n    ]\n}\n\u003c/script\u003e\n```\nFull Schema docs at [Schema Org Docs](docs/schema.md)\n\nSitemap Generation\n==================\n\nThis package automates the generation of sitemaps.\n\n### Usage\n\n```php\n    #[Sitemap()]\n    #[Route('/', name: 'app_home')]\n    public function index() {\n        ...\n    }\n\n    #[Sitemap()]\n    #[Route('/blog', name: 'blog')]\n    public function blogIndex() {\n        ...\n    }\n```\nThis will add the the url entries into `sitemaps/default.xml`\n```xml \n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003curlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://mysite.com/blog\u003c/loc\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://mysite.com/\u003c/loc\u003e\n  \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\nFull Sitemap docs [Sitemap Docs](docs/sitemap.md)\n\nFull documentation at [Documentation](docs/index.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdellahrk%2Fseobundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdellahrk%2Fseobundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdellahrk%2Fseobundle/lists"}