Skip to content

Commit

Permalink
Add todo for versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
ediamin committed Jan 7, 2022
1 parent 080a6aa commit 3ca83ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Optimizer/Transformer/AmpStoryCssOptimizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,15 @@ private function isStyleAmpCustom(Element $element)
*/
private function appendAmpStoryCssLink(Document $document)
{
// @TODO Need to take the following into account when deciding on a version:
// - latest stable version available,
// - the channel that the runtime is locked to, i.e. whether LTS is active.
$href = Amp::CACHE_HOST . '/v0/amp-story-1.0.css';

$ampStoryCssLink = $document->createElementWithAttributes(Tag::LINK, [
Attribute::REL => Attribute::REL_STYLESHEET,
Attribute::AMP_EXTENSION => Extension::STORY,
Attribute::HREF => Amp::CACHE_HOST . '/v0/amp-story-1.0.css',
Attribute::HREF => $href,
]);

$document->head->appendChild($ampStoryCssLink);
Expand Down

0 comments on commit 3ca83ca

Please sign in to comment.