Add your blog with two lines
Two lines on one page of your site show your posts there, in your site’s own fonts and colours. The list is on that page; a post opens on the same page with its own address. Everything below is optional — the two lines work as they are.
Updated
On this page
The two lines
Your own two lines, with your blog’s name already in them, are on the Connect website page of your dashboard. They look like this:
<div id="cmskite-blog"></div>
<script src="https://cmskite.com/embed.js" data-blog="your-blog" async></script>| Attribute | What it does |
|---|---|
data-blog | Your blog’s name. The only one you need. |
data-path | Gives each post an address like /blog/my-post. See below. |
data-param | The name in ?post=my-post, if post clashes with something on your site. |
data-accent | A colour for links and labels, e.g. #2563eb. |
data-target | The id of the element to draw into, if not cmskite-blog. |
data-post | One post’s slug: shows only that post, anywhere. See below. |
Where to paste them
Make a page called Blog on your site, then paste the two lines into the box your platform has for code. Each platform has a page with the steps and its quirks:
| Platform | Where the two lines go | Steps |
|---|---|---|
| WordPress | A Custom HTML block on your blog page | cmskite.com/for/wordpress |
| Wix | Add → Embed Code → Embed HTML | cmskite.com/for/wix |
| Shopify | A page template of its own with a Custom Liquid section | cmskite.com/for/shopify |
| Webflow | A Code Embed element on your blog page (needs a paid site plan) | cmskite.com/for/webflow |
| Squarespace | A Code block on your blog page (Core plan and above) | cmskite.com/for/squarespace |
| Lovable | No pasting: copy the ready-made prompt from your dashboard into the Lovable chat | cmskite.com/for/lovable |
| Any HTML page | Anywhere in the page’s body, where the posts should appear | This page |
What it does for search engines
With a post open, the script gives your page the post’s title and description, a canonical link to the post’s one address on your site, and Article structured data (headline, description, image, author, published and updated dates) — the same your free blog page carries. Google runs the script when it renders the page, so it reads all of it.
Once your page has shown the posts, your free blog page on cmskite.com points search engines at your site, so the two never compete for the same post.
Addresses like /blog/my-post
By default a post’s address is your blog page plus ?post=my-post. That works everywhere and Google indexes it. If your host lets you add a rewrite, you can have /blog/my-post instead: add data-path="/blog" (your blog page’s own path) to the script tag, then tell your server to answer every /blog/… address with the blog page itself.
<div id="cmskite-blog"></div>
<script src="https://cmskite.com/embed.js" data-blog="your-blog" data-path="/blog" async></script>Old ?post= links keep working, and their canonical link names the new address. The rewrite for your host:
WordPress
Your blog page must be the page with the slug
blog. Add this with the Code Snippets plugin (or your theme’s functions.php), then open Settings → Permalinks and press Save once.phpadd_action('init', function () { add_rewrite_rule('^blog/([^/]+)/?$', 'index.php?pagename=blog', 'top'); });Plain HTML on Apache (.htaccess)
Next to your site’s files. Use the file your blog page really is.
apacheRewriteEngine On RewriteRule ^blog/[^/]+/?$ /blog/index.html [L]Plain HTML on Nginx
Inside your site’s
server { }block, then reload Nginx.nginxlocation ~ ^/blog/[^/]+/?$ { try_files /blog/index.html =404; }Netlify or Cloudflare Pages (_redirects)
A file named
_redirectsat the top of what you deploy. The 200 makes it a rewrite, not a redirect.plain/blog/* /blog/index.html 200Vercel (vercel.json)
At the top of your project.
json{ "rewrites": [{ "source": "/blog/:slug", "destination": "/blog/index.html" }] }
On a page served from a rewrite, write your own CSS and image paths from the root (/style.css, not style.css), or they are looked for under /blog/my-post/.
One post on any page
To show a single post somewhere else, such as a landing page, a partner’s site or a help centre, add data-post with the post’s slug. Only that post appears: no list of other posts and no back link. Every published post’s own page in the dashboard has these two lines ready to copy.
<div id="cmskite-post-my-post"></div>
<script src="https://cmskite.com/embed.js" data-blog="your-blog" data-post="my-post" async></script>The post is a guest on that page, so the page keeps its own title, description and canonical link, and the view still counts. Several posts can sit on one page: each pair of lines draws into its own cmskite-post-… element. A post that is unpublished later shows “This post is not available.”
A sitemap for your posts
A sitemap tells search engines every post’s address, which matters most while your blog is new. Your site does not know your posts, so we keep one for you, with each post at its address on your site:
https://cmskite.com/b/your-blog/site-sitemap.xmlIt uses your site’s addresses once a visitor has opened your blog page with the two lines on it; before that it lists your free blog’s. Then do one of these:
- Name it in your robots.txt (best: it stays up to date). Add the line
Sitemap: https://cmskite.com/b/your-blog/site-sitemap.xml. Search engines accept a sitemap on another site when your own robots.txt names it. WordPress: your SEO plugin’s robots.txt editor (Yoast: Tools → File editor). Shopify: Online Store → Themes → Edit code → add the template robots.txt. Webflow: Site settings → SEO → Robots.txt. - Or upload it. Open the address above, save the file, upload it to your site (e.g. as
/blog-sitemap.xml), and submit that address in Google Search Console under Sitemaps. Upload it again after you publish new posts.
If your host allows neither, search engines still find your posts by following the links on your blog page — it only takes longer. On Wix there is nothing to do: the posts rank under your free blog link, which is in our own sitemap already.