WordLift Cloud
Bring WordLiftโs semantic markup to any site by loading a single launcher script.
Before you startโ
- A WordLift Cloud account and access key (contact us if you need one).
- Access to add scripts in the
<head>of your pages. - (Optional, but recommended for multilingual sites) Set the page language with
<html lang="...">so the correct graph is selected.
Add the WordLift Cloud scriptโ
Place the launcher in the <head> of every page you want to annotate:
<!-- WL Cloud -->
<script async type="text/javascript" src="https://cloud.wordlift.io/app/bootstrap.js"></script>
<!-- End WL Cloud -->
Keep it near the top of <head> so it loads early; async ensures it does not block rendering.
FAQ rendering (overview)โ
FAQ rendering activates only if all of the following are true:
-
The bootstrap detects a
FAQPageobject in the loaded JSON-LD. -
FAQ rendering is enabled via the
data-faqattribute or global config. -
A DOM element matching
data-faq-target-idexists. -
A template is provided in the page via:
<script type="text/template" id="wl-faq-template" hidden>
<!-- Mustache template here -->
</script> -
Mustache and DOMPurify are lazy-loaded only at this stage.
-
Answer HTML is sanitized using a strict allow-list of tags permitted by Google Search for FAQ rich results:
h1โh6, br, ol, ul, li, a, p, div, b, strong, i, em
All other tags and attributes are removed. JSON-LD itself remains untouched and contains no custom configuration fields.
Usage in HTML (FAQ)โ
Enable FAQ rendering when loading the bootstrap:
<script
async
src="https://cloud.wordlift.io/app/bootstrap.js"
data-faq="true"
data-faq-target-id="faq-container"
data-faq-template-id="wl-faq-template"
></script>
Insert the FAQ template:
<script type="text/template" id="wl-faq-template" hidden>
<ul class="faq-list">
{{#faqs}}
<li class="faq-item">
<strong class="faq-question">{{question}}</strong>
<div class="faq-answer">{{{answer}}}</div>
</li>
{{/faqs}}
</ul>
</script>
Provide the target container:
<div id="faq-container"></div>
When the loaded JSON-LD includes a FAQPage and FAQ rendering is enabled, sanitized FAQ markup is inserted automatically.
Configuration optionsโ
Configuration is read from <script data-*> attributes and can be overridden with window._wlCloudSettings.
| Attribute | Description |
|---|---|
data-faq | "true" to enable FAQ rendering |
data-faq-target-id | DOM element ID to inject FAQ markup into |
data-faq-template-id | Script/template element ID for rendering (defaults to wl-faq-template) |
data-sidebar-url | URL for the sidebar feature |
data-disable-jsonld | "true" disables JSON-LD loading |
data-web-page-url | Overrides detected page URL |
data-target-origin | Target origin for postMessage |
data-api-url | URL template for fetching JSON-LD |
data-data-formatter | Optional formatter hint passed to the API |
Annotate a pageโ
- Open a page where the script is installed.
- Log in with your WordLift Cloud credentials.
- Launch the WordLift Sidebar widget with
Ctrl + Alt + W. - Point and click the area you want to annotate.
- Pick the relevant entities; WordLift saves and publishes the JSON-LD automatically.
Multilingual behaviorโ
The launcher reads the lang attribute on the <html> element and appends __wl_lang to requests automatically (for example lang="en" sets __wl_lang=en). See Multilingual Graphs for details.
Validate the markupโ
- Use Googleโs Rich Results Test or your preferred structured data validator.
- Check your network panel for requests to
cloud.wordlift.io/app/bootstrap.jsto confirm the launcher loads. - View page source to verify JSON-LD is injected after annotating.
Troubleshootingโ
- Widget not opening: ensure you are logged in and the launcher is present in
<head>. - Language mismatch: set the correct
langon<html>; the launcher derives__wl_langfrom it. - Script blocked: check Content Security Policy and ad blockers that might block
cloud.wordlift.io. bootstrap.jsmust be in<head>directly; other loaders can delay markup so Google misses it.- Google Tag Manager is the only supported alternative loader (see GTM setup).
Need help?โ
Contact us and our concierge team will help you get the best out of WordLift Cloud.