GitHub Download

@amp global variable

Publii offers global variables dedicated to the AMP version of generated websites. It is used for getting AMP-related settings.

Below global variables are available only in the AMP mode for the AMP-related *.hbs files.

  • @amp.originalWebsiteUrl - URL to the original website
  • @amp.primaryColor - primary color for the AMP theme,
  • @amp.image - AMP fallback image (used when there is no website logo),
  • @amp.customCss - Custom CSS code dedicated for the AMP version of website,
  • @amp.shareButtons - enable/disable share buttons,
  • @amp.shareFacebook - enable/disable Facebook share button,
  • @amp.shareFacebookId - specifies the App ID for the Facebook share button - it is necessary for making the Facebook sharing working properly,
  • @amp.shareTwitter - enable/disable Twitter share button,
  • @amp.shareGooglePlus - enable/disable Google+ share button,
  • @amp.sharePinterest - enable/disable Pinterest share button,
  • @amp.shareLinkedIn - enable/disable LinkedIn share button,
  • @amp.footerText - custom footer text (if is empty, then displays "Powered by Publii"),
  • @amp.GAID - Google Analytics Tracking ID for AMP sites


Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at By clicking below, you agree that we may process your information in accordance with our Privacy Policy.