{"id":32821269,"url":"https://github.com/tabone/metahelper","last_synced_at":"2026-06-25T03:31:18.474Z","repository":{"id":18400376,"uuid":"21581858","full_name":"tabone/metahelper","owner":"tabone","description":"This is a library which helps web developers to better manage Open Graph, Twitter Cards and HTML Meta Data which are important for Search Engine Optimization.","archived":false,"fork":false,"pushed_at":"2014-07-08T08:40:31.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-07T14:11:54.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tabone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T18:26:46.000Z","updated_at":"2014-07-07T18:30:52.000Z","dependencies_parsed_at":"2022-09-09T22:50:33.446Z","dependency_job_id":null,"html_url":"https://github.com/tabone/metahelper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tabone/metahelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fmetahelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fmetahelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fmetahelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fmetahelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabone","download_url":"https://codeload.github.com/tabone/metahelper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fmetahelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34758773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-11-07T14:05:43.971Z","updated_at":"2026-06-25T03:31:18.450Z","avatar_url":"https://github.com/tabone.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#MetaHelper\n\nThis is a library which helps web developers to better manage Open Graph, Twitter Cards and HTML Meta Data enabling them to implement Search Engine Optimization easier.\n\n##Installation\nAdd the package to your `composer.json` and run `composer update` in your shell.\n\n    {\n        require: {\n            \"jwebkid/metahelper\": \"dev-master\"\n        }\n    }\n    \nIf you use Laravel you may also add an alias in your `app/config/app.php` file:\n\n    'aliases' =\u003e array(\n        'App'             =\u003e 'Illuminate\\Support\\Facades\\App',\n        'Artisan'         =\u003e 'Illuminate\\Support\\Facades\\Artisan',\n        'Auth'            =\u003e 'Illuminate\\Support\\Facades\\Auth',\n        'Blade'           =\u003e 'Illuminate\\Support\\Facades\\Blade',\n        ...\n        'MetaHelper'       =\u003e 'JWebKid\\MetaHelper'\n    ),\n\n##Quick Start\n###Example 1\n    \u003chtml lang=\"en\"\u003e\n    \u003chead\u003e\n        \u003c?php\n            $meta = new MetaHelper();\n            $meta-\u003etitle(\"MetaHelper Rocks\")\n                -\u003edescription(\"A small description...\")\n                -\u003echarset(\"UTF-8)\n                -\u003eview();\n        ?\u003e\n    ...\n\n##Meta Data\n---------\n`MetaHelper` library cater for the following meta tags:\n\n|Meta Tag     | Default Value      | HTML Displayed                                   | Syntax\n|-------------|--------------------|--------------------------------------------------|-----------------------------\n| Title       | null               | `\u003ctitle\u003e\u003c/title\u003e`                                | `$helper-\u003etitle(\"\")`\n| Description | null               | `\u003cmeta name=\"description\" content=\"\" /\u003e`         | `$helper-\u003edescription(\"\")`\n| charset     | UTF-8              | `\u003cmeta charset=\"\"/\u003e`                             | `$helper-\u003echarset(\"\")`\n| Next        | null               | `\u003clink rel=\"next\" href=\"\" /\u003e`                    | `$helper-\u003enext(\"\")`\n| Prev        | null               | `\u003clink rel=\"prev\" href=\"\" /\u003e`                    | `$helper-\u003eprev(\"\")`\n| Canonical   | null               | `\u003clink rel=\"canonical\" href=\"\" /\u003e`               | `$helper-\u003ecanonical(\"\")`\n\n##Open Graph\nAs mentioned, you can easily use `MetaHelper` to display [Open Graph](http://ogp.me/) information about your web page.\n\n    \u003c?php\n        $ogConfig = array(\n            'title' =\u003e 'MetaHelper Rocks',\n            'type' =\u003e 'website',\n            'image' =\u003e array(\n                'url' =\u003e 'http://example.com/logo.png',\n                'secure_url' =\u003e 'https://example.com/logo.png',\n                'type' =\u003e 'image/jpeg',\n                'width' =\u003e '300',\n                'height' =\u003e '500'\n            )\n        );\n        $metaHelper-\u003eog($ogConfig)-\u003eview();\n\nThis would display the following meta tags:\n    `\u003cmeta charset=\"UTF-8\"\u003e\u003cmeta property=\"og:title\" content=\"MetaHelper Rocks\"\u003e`\n    \n    `\u003cmeta property=\"og:type\" content=\"website\"\u003e`\n    \n    `\u003cmeta property=\"og:image:url\" content=\"http://example.com/logo.png\"\u003e`\n    \n    `\u003cmeta property=\"og:image:secure_url\" content=\"https://example.com/logo.png\"\u003e`\n    \n    `\u003cmeta property=\"og:image:type\" content=\"image/jpeg\"\u003e`\n    \n    `\u003cmeta property=\"og:image:width\" content=\"300\"\u003e`\n    \n    `\u003cmeta property=\"og:image:height\" content=\"500\"\u003e`\n\n##Twitter Cards\nFinally `MetaHelper` can also take care of [Twitter Cards](https://dev.twitter.com/docs/cards). `MetaHelper` caters for all the different cards which Twitter Cards provide (Summery Card, Summery Image Card, Photo Card, Gallery Card, App Card, Product Card, Player Card).\n\n###Summery Cards Example\n    //To Create a Summery Card\n    $metaHelper = new MetaHelper();\n    \n    $metaHelper-\u003ecard('SummerCard', [\n            'title' =\u003e 'This is a title',\n            'description' =\u003e 'This is a description',\n            'image' =\u003e 'http://example.com/logo.png',\n        ]\n    );\n    \n    //You can also change individual attributes\n    $metaHelper-\u003esetCard()-\u003etitle(\"A New Title\");\n\nAll attribute names of all the Twitter Cards available follow the below convention:\n\n| Twitter Card Attribute Style     | MetaHelper Style        |\n|----------------------------------|-------------------------|\n| twitter:app                      | `$helper-\u003eapp()`          |\n| twitter:app:name:googleplay        | `$helper-\u003eappNameGoogleplay`|\n\nThe only exception is the Summery Card with Large Image where for its `twitter:image:src` the normal `image` attribuet is used.\n\n| Twitter Card                   | MetaHelper Keyword  |\n|--------------------------------|---------------------|\n| Summery Card                   | `SummeryCard`    |\n| Summery With Large Image Card  | `SummeryImageCard`|\n| Gallery Card                   | `GalleryCard`|\n| Photo Card                     | `PhotoCard`|\n| Player Card                    | `PlayerCard`|\n| App Card                       | `AppCard`    |        \n| Product Card                   | `ProductCard`       |\n\nIt is important to keep in mind that all of these meta data can be used together like so:\n\n    \u003c?php\n        $metaHelper = new MetaHelper();\n        \n        $metaHelper-\u003etitle(\"Title\")\n            -\u003edescription(\"A description\")\n            -\u003ecard(\"SummeryCard\", [\"title\"])\n            -\u003eog([\"Title\" =\u003e \"title])\n            -\u003eview();\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabone%2Fmetahelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabone%2Fmetahelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabone%2Fmetahelper/lists"}