Download

@amp global variable

Notice: Update Regarding AMP Functionality

We regret to inform you that the AMP functionality has been removed from our application starting with version 0.42.0 and will no longer be developed or supported. This article pertained to earlier versions of the application where the AMP feature was available. If you are using version 0.42.0 or later, please be aware that the information in this article is no longer applicable. We apologize for any inconvenience and encourage you to explore our other features that may add value to your experience.

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

What are you waiting for?

Start building your site today.

  1. 1 Download Publii
  2. 2 Write your content
  3. 3 Publish your site
Create website