Skip to content

riddle-com/embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Riddle Embed Script - Self-Hosted Version

This repository contains the self-hosted version of the Riddle embed script for integrating Riddle content into your website.

πŸš€ Quick Start

1. Include the Script

Add the script once to the <head> section of your HTML page:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your Page</title>
    
    <!-- Riddle Embed Script - only once in head -->
    <script src="/path/to/embedV2-riddle.min.js"></script>
</head>
<body>
    <!-- Your page content -->
</body>
</html>

2. Embed Riddle Content

Use the simplified HTML code in the body (without script tag):

<div class="riddle2-wrapper" 
     data-rid-id="{your-riddle-id}" 
     data-auto-scroll="true" 
     data-is-fixed-height-enabled="false" 
     data-bg="#fff" 
     data-fg="#00205b" 
     style="margin:0 auto; max-width:100%; width:640px;">
  <iframe title="Riddle Title" 
          src="https://www.riddle.com/embed/a/{your-riddle-id}?lazyImages=false&staticHeight=false" 
          allow="autoplay" 
          referrerpolicy="strict-origin">
  </iframe>
</div>

πŸ“ Files

  • embedV2-riddle.js - Full version of the embed script
  • embedV2-riddle.min.js - Minified version (recommended for production)

βœ… Benefits of Self-Hosting

  • πŸ”’ Full Control: Complete control over script delivery and caching
  • πŸ“Š Compliance: Meets strict data protection and security requirements
  • ⚑ Performance: Can be optimized for your specific infrastructure
  • πŸ›‘οΈ Reliability: No dependency on external CDN availability

πŸ”„ Updates

⚠️ Important: When self-hosting, you are responsible for keeping the script updated.

Recommended Update Practice

  • πŸ” Monitor the official repository regularly for updates
  • πŸ“… Schedule regular update checks into your maintenance cycle
  • πŸ§ͺ Test new versions before production deployment

πŸ“– More Information

Comprehensive documentation and examples can be found in the official Riddle documentation.

πŸ”— Links


Β© Riddle Technologies AG.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •