This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <img alt="Recette simple du Mojito alsacien" | |
| data-src="{{ asset(cocktail.image)|imagine_filter('medium_desktop') }}" | |
| data-srcset="{{ asset(cocktail.image)|imagine_filter('medium_mobile') }} 200w, {{ asset(cocktail.image)|imagine_filter('medium_tablet') }} 400w" | |
| sizes="(min-width: 20em) 35vw, 100vw"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const LazyLoad = require('vanilla-lazyload'); | |
| let lazyLoad = new LazyLoad(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| liip_imagine: | |
| resolvers: | |
| default: | |
| web_path: | |
| web_root: "%kernel.project_dir%/public" | |
| # en écrivant ici on garde le cache entre chaque release | |
| cache_prefix: "images/cache" | |
| loaders: | |
| default: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @Route("/cocktail/recette/{name}-{id}", name="cocktail_detail", requirements={"id"="\d+", "name"="[0-9a-z-]+"}) | |
| * @Cache(public=true, maxage=86400, mustRevalidate=false, maxStale=86400) | |
| **/ | |
| public function index($name, $id) | |
| { | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ render_esi(url('popular_cocktails')) }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| framework: | |
| esi: { enabled: true } | |
| fragments: { path: /_fragment } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vcl 4.0; | |
| import std; | |
| backend default { | |
| // le hostname du nginx dans ma stack | |
| .host = "front"; | |
| .port = "80"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0 * * * * node webPageTest.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const WebPageTest = require('webpagetest'); | |
| const http = require('http'); | |
| const SDC = require('statsd-client'), | |
| sdc = new SDC({ | |
| prefix: '<NOM_DU_SITE_OU_DE_LA_PAGE>.webpagetest', | |
| host: '<VOTRE_HOST_GRAPHITE>', | |
| port: 8125 | |
| }); | |
| const wpt = new WebPageTest('www.webpagetest.org', '<VOTRE_API_KEY>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install statsd-client webpagetest --save |