Download the PHP package setono/prerender-bundle without Composer
On this page you can find all versions of the php package setono/prerender-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/prerender-bundle
More information about setono/prerender-bundle
Files in setono/prerender-bundle
Package prerender-bundle
Short Description A Symfony bundle that integrates 'prerender' services, i.e. rendertron or prerender.io
License MIT
Informations about the package prerender-bundle
Symfony Prerender Bundle
Use this bundle to (pre)render a request or URL. This is useful if you render your page using javascript and want to show the HTML output of that page to Googlebot or other clients not very fond of javascript.
See Googles own help page on this topic: Implement dynamic rendering.
Installation
To install this bundle, simply run:
This will install the bundle and enable it if you're using Symfony Flex. If you're not using Flex, add the bundle
manually to bundles.php
instead.
Configuration
The bundle is already preconfigured for you if you want to use the open source version of prerender.io. Then you just need to run that service. However, you can configure it easily like so:
If you want to create your own prerenderer service, just implement the PrerendererInterface
and tag your service with setono_prerender.prerenderer
. Then in the configuration of the bundle do this:
Usage
Here is a very basic example of a product controller where we want to render the index action:
All versions of prerender-bundle with dependencies
league/uri Version ^6.5
league/uri-components Version ^2.4
setono/bot-detection-bundle Version ^1.9
symfony/config Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/event-dispatcher Version ^5.4 || ^6.0
symfony/http-client Version ^5.4 || ^6.0
symfony/http-client-contracts Version ^2.5 || ^3.0
symfony/http-foundation Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
webmozart/assert Version ^1.10