{"id":19697143,"url":"https://github.com/janit/ez-amp-bundle","last_synced_at":"2026-03-16T19:32:41.174Z","repository":{"id":56996460,"uuid":"68128132","full_name":"janit/ez-amp-bundle","owner":"janit","description":"eZ Platform Bundle that provides Accelerated Mobile Pages (AMP) Support","archived":false,"fork":false,"pushed_at":"2020-11-07T21:22:52.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T03:37:23.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Twig","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/janit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-13T16:50:18.000Z","updated_at":"2020-11-07T21:22:55.000Z","dependencies_parsed_at":"2022-08-21T14:10:10.087Z","dependency_job_id":null,"html_url":"https://github.com/janit/ez-amp-bundle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janit%2Fez-amp-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janit%2Fez-amp-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janit%2Fez-amp-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janit%2Fez-amp-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janit","download_url":"https://codeload.github.com/janit/ez-amp-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241008038,"owners_count":19893093,"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":[],"created_at":"2024-11-11T19:37:19.691Z","updated_at":"2026-03-16T19:32:41.118Z","avatar_url":"https://github.com/janit.png","language":"Twig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eZ AMP Bundle\nThis is an extension to the eZ Platform CMS that provides Accelerated Mobile Pages (AMP) Support.\n\nAccelerated Mobile Pages is an initiative from Google to speed up mobile browsing. AMP is an open standard based on HTML. It enforces performance by limiting functionality and includes remote caching from Google to allow quick embedded views to search results.\n\nGiven Google's continuing dominance search both publishers and CMS vendors need to take AMP into account. This bundle enables \u003ca href=\"http://ezplatform.com\"\u003eeZ Platform\u003c/a\u003e installations to have quick access to an AMP formatted version of content objects.\n\n## Installation\n\nInstallation is similar to most Symfony Bundles:\n\n### Install using Composer\n\n```\ncomposer require janit/ez-amp-bundle\n```\n\nThis will download and install the package to your local environment form Packagist (\u003ca href=\"https://packagist.org/packages/janit/ez-amp-bundle\"\u003eez-amp-bundle\u003c/a\u003e)\n\n### Update AppKernel\n\nOpen the Application Kernel and add the bundle:\n\n```\n\n\u003c?php\n// app/AppKernel.php\n\n// ...\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = array(\n            // ...\n            new Janit\\EzAmpBundle\\EzAmpBundle(),\n        );\n    }\n\n    // ...\n}\n```\n\nThis will load and enable the eZ AMP Bundle in your installation when the application bootstraps.\n\n### Add routing\n\nAdd the following to your app/config/routing.yml:\n\n```\nez_amp:\n    resource: \"@EzAmpBundle/Controller/\"\n    type:     annotation\n    prefix:   /\n```\n\nThis will load the routes that provide the custom AMP content generation.\n\n### Add header link to content (to make AMP pages discoverable)\n\nTo enable discovery, find your main layout template and enter the following snippet into the `head` section:\n\n```\n\t{% if content is defined %}\n\t\t\u003clink rel=\"amphtml\" href=\"{{ url('ez_amp', {'objectId': content.versionInfo.contentInfo.id }) }}\" /\u003e\n\t{% endif %}\n\n\u003c/head\u003e\n```\n\nThis will allow the automatic discovery of your AMP versions by robots.\n\n## Verifying installation and troubleshooting\n\nOpen your browser and navigate to:\n\n```\nhttp://example.com/ez-amp/1\n```\n\nThis should display a simple version of your front page, with all the fields looped.\n\nAfter this verify your content pages' head section should contain a reference to the AMP version:\n\n```\n\u003clink rel=\"amphtml\" href=\"http://example.com/ez-amp/1337\" /\u003e\n```\n\nThe AMP version should also contain a canonical link back to the main version of the site:\n\n```\n\u003clink rel=\"canonical\" href=\"http://example.com/jared-leet-o\" /\u003e\n```\n\nWith these links in place search engine crawlers will now find the AMP versions of your content. If you did this in production then soon the Google mobile search results pages will start displaying links to your AMP versions.\n\nNext if you have not yet done so, verify your site on \u003ca href=\"https://www.google.com/webmasters/\"\u003eGoogle Webmaster tools\u003c/a\u003e and follow the state of the AMP validation. One of the errors you may encounter is failing images, because AMP does not allow use of the standard HTML `\u003cimg\u003e` tag, but has it's own `\u003camp-img\u003e` tag instead:\n\n```\n\u003camp-img\n\tsrc=\"/var/site/storage/images/8/8/2/0/288-8-eng-GB/blog3.jpg\"\n\talt=\"\"\n\twidth=\"1840\"\n\theight=\"1232\"\n\tlayout=\"responsive\"\u003e\n\u003c/amp-img\u003e\n```\n\nIt is possible that in some cases this custom image tag template is not rendered. If this happens with regular templates or embedded templates, it's worth taking a look at competing `field_templates` definitions in your bundles/configurations.\n\n## Overriding with bundle inheritance\n\nWhile this bundle aims to provide valid AMP output by default, it is very crude as it is. If you wish to use this version, you can use \u003ca href=\"http://symfony.com/doc/current/bundles/inheritance.html\"\u003eSymfony Bundle Inheritance\u003c/a\u003e to override the templates to have a more pleasing layout and likely extended features that your custom site will require.\n\n## Missing features\n\nThere are quite a few more things that should be added to the bundle to make it feature complete, both on eZ Platform and AMP side, some of which are:\n\n- Allow configuration of templates per content type\n- Allow configuration of content types to be served as AMP\n- Support for JSON-LD metadata\n- Support for analytics\n- Support for ads\n\n## Disclaimer and Licensing\n\nThis is nothing but a hobby project that is mostly an exercise. There may be updates or there may not be updates. There is no warranty whatsoever, but the code is made available under the MIT license so it is free for you to use and abuse.\n\n# eZ Platform is now Ibexa DXP\n\nGoing forward from version 3.2 eZ Platform (Enterprise Edition) will be known as the [Ibexa DXP technology](https://www.ibexa.co/products) that is the base for three products: [Ibexa Content](https://www.ibexa.co/products/ibexa-content), [Ibexa Experience](https://www.ibexa.co/products/ibexa-experience) and [Ibexa Commerce](https://www.ibexa.co/products/ibexa-commerce). Instructions in this code should be relevant since Ibexa DXP is an evolution of eZ Platform, not a revolution. Learn more from the [Ibexa DXP v3.2 launch post](https://www.ibexa.co/blog/product-launch-introducing-ibexa-dxp-3.2) and the [Ibexa developer portal](https://developers.ibexa.co).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanit%2Fez-amp-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanit%2Fez-amp-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanit%2Fez-amp-bundle/lists"}