takeit / amphtmlbundle Goto Github PK
View Code? Open in Web Editor NEWAMP HTML⚡ Bundle - provide AMP HTML conversion to your Symfony projects.
License: MIT License
AMP HTML⚡ Bundle - provide AMP HTML conversion to your Symfony projects.
License: MIT License
I used this {{ path(article)|amp }}
and getting below error.
Not implemented yet... at /var/www/info/vendor/takeit/amp-html-bundle/Generator/RouteUrlGenerator.php:21)"} []
Currently, I'm able to get my Article
entities "amp-ified" like this (after changing the default amp-theme to call the correct getters):
takeit_amp_html:
model: MyBundle\Entity\Article
routing:
route_strategy:
pattern: '{controller}/{action}'
parameter: 'url'
With that, I can go to /platform/amp/article/view/article-url-goes-here
and see the amp version.
Now, I'd like to also have the same thing for News
entities. However, I don't see a way to define multiple entities, though. Am I missing something? I'd like something like this or similar:
takeit_amp_html:
entity: 'article'
model: MyBundle\Entity\Article
routing:
route_strategy:
pattern: '{controller}/{action}'
parameter: 'url'
theme:
current_theme: "article-theme"
entity: 'news'
model: MyBundle\Entity\News
routing:
route_strategy:
pattern: '{controller}/{action}'
parameter: 'url'
theme:
current_theme: "news-theme"
I've try to:
$ composer require takeit/amp-html-bundle:0.1.*
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package takeit/amp-html-bundle 0.1.* is satisfiable by takeit/amp-html-bundle[0.1.x-dev] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
my composer.json
{
"name": "staszek/.checkout",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.1.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"symfony/polyfill-apcu": "^1.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"doctrine/doctrine-migrations-bundle": "^1.0",
"emaillabs/emaillabs-php-api" : "dev-master",
"friendsofsymfony/jsrouting-bundle": "^1.6",
"mpdf/mpdf": "^6.0",
"tfox/mpdf-port-bundle": "^1.3",
"leafo/scssphp": "^0.6.6",
"patchwork/jsqueeze": "^2.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
It would be of great help to generate amp-sidebar. Thanks.
To log all converter errors, preferably, custom monolog channel should be created and Injected into converter.
Hi,
I picked the parameter strategy. I am getting this error. I may very well be doing other things wrong.
Unrecognized option "parameter_strategy" under "takeit_amp_html.routing"
I added that to the config.yml
file:
takeit_amp_html:
theme:
current_theme: "amp-theme"
model: AppBundle\Entity\Article
routing:
parameter_strategy:
enabled: true
To be able to define more settings (e.g. adding google analytics id, changing theme, google adsense, enable extra converter statistics etc.) generic form type needs to be created which can be used by other applications.
It should be also possible to provide custom "settings manager" (in bundle's configuration) from 3rd party apps which should take care about management and persisting settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.