1. Technical
  2. Adding Live Center

AMP-enabled iframe

Using an AMP-enabled iframe can help you deliver high-quality, dynamic live blog content to your readers in a fast, secure, and consistent manner.

Full AMP support

Using an AMP-enabled iframe to display live blog content provides several benefits, including:

  1. Improved performance: AMP-enabled iframes are optimized for fast loading and rendering, providing a better user experience for readers.

  2. Consistent styling: The use of an AMP-enabled iframe ensures that the live blog content is consistently styled across different devices and platforms.

  3. Security: AMP-enabled iframes are designed to prevent malicious code from executing, providing an additional layer of security for your website.

  4. Better SEO: Google prioritizes AMP-enabled content in its search results, so using an AMP-enabled iframe can improve your website's visibility and search engine ranking.

Below is a code sample of an AMP-enabled iframe 🌈

See the Pen AMP enabled iframe by Live Center Dev (@livecenter_dev) on CodePen.


Validating your page

By adding "/#development-1" to the URL of your page, you can check if your page is validated by AMP.
Open your developer-console and look for errors.

Resources:

1. Convenience functions 🔧

Curious about the classes and terms mentioned? Consult this resource to find what you're looking for. Here you will find options objects that are required in running your scripts.

2. CSS Bundle 🌸

This is a bundle needed to render and support elements in the Live Center feed. The link below is the latest version: https://livecentercdn.norkon.net/scripts/ncposts/ncposts-6.1.1.min.css

3. JS Bundle 👨‍💻

This is a bundle that has the set of functions needed to retrieve and renders the post from our servers. Without this script, you cannot use most functions from the script samples. Below is the latest version of the bundle: https://livecentercdn.norkon.net/scripts/ncposts/ncposts-6.1.1.min.js

Not the implementation you're looking for 🤔 ? View other implementations here!