← Back to methods
Method 1 · JavaScript widget
JavaScript snippet integration
Copy and paste a simple 2-line HTML block to mount a fully responsive, interactive blog on any page or CMS.
How it works
The widget loads a small, performance-optimized JavaScript file (embed.js) that queries the public REST API and builds an interactive blog grid directly inside your page's DOM.
Configuration attributes
data-site— your site's unique public API key (found in site settings).data-target— CSS selector of the container the blog renders into (e.g.#embedcms-content).data-theme— layout color scheme:light,dark, orauto.data-accent— hex color override for badges, links, and search focus (e.g.#22a45d).
Installation code
embed.html
<!-- 1. Mount point container -->
<div id="embedcms-content"></div>
<!-- 2. JS widget script -->
<script
src="https://cms.serves.in/embed.js"
data-site="YOUR_PUBLIC_KEY"
data-target="#embedcms-content"
data-theme="light"
data-accent="#22a45d"
defer
></script>Live interactive widget demo
The container below is rendered live by our embed.js script.