I am trying to write an image shortcode that checks if it’s an AMP page or not. What I was thinking was to get the
.Permalink of the current page, split it and check for an amp in that slice, but
.Parmalink doesn’t work in the shortcode, is there any other way to do this?
OutputFormats doesn’t work too
To get to the page’s fields from a shortode, you need to do
Is that the only way to check it?
http://localhost:1313/ instead of
localhost:1313/amp/ in the AMP page
You currently need to provide “AMP specific” shortcodes to trigger rerender of the content files, e.g. “myshort.amp.html”.
hi, if is not possible to use the same shortcode for images in AMP render, means that I need a duplicate markdown content, is that true?
Shortcode with amp in it should resolve the problem. Example
figure.amp.html, this overrides the one used for non-amp.
I’ve been searching for this all around while it was sitting here. Thanks