GuidesEmbed a blog on your website

Embed a blog on your website

Drop a published Papera article into your own site with a self-contained iframe snippet that sizes itself to the content.

How to place a Papera blog article inside a page on your own website. The embed is a small <iframe> snippet you paste once — it pulls the live article from Papera, styles itself, and grows to fit the content. Nothing to install, no script to host.

1. Publish the article

An embed points at the article's public URL, so the article has to be live first. Open the blog node, publish it, and confirm it loads at:

https://papera.dev/blog/<your-slug>

See Publish a blog article for the publishing controls and how to choose the slug.

2. Copy the embed code

In the blog editor, open the Export menu and choose Copy/Embed Code. A dialog opens with a ready-to-paste snippet — press Copy. You get something like this:

<iframe src="https://papera.dev/embed/blog/my-article"
        title="My article" loading="lazy"
        style="width:100%;border:0;height:600px"></iframe>
<script>
  addEventListener("message", (e) => {
    if (e.data?.type !== "papera:embed:height") return;
    const f = document.querySelector('iframe[src*="/embed/blog/my-article"]');
    if (f) f.style.height = e.data.height + "px";
  });
</script>

3. Paste it into your page

Drop the snippet into your site's HTML wherever you want the article to appear — in a CMS "custom HTML" block, a template, or a raw HTML file. The embed is chrome-less: just the article and its styling, so it blends into your page rather than showing Papera's app around it.

The small <script> listens for a height message from the iframe and resizes it to fit the article, so there is no inner scrollbar. If your site can't run the script (or you leave it out), the iframe simply keeps its fixed height:600px — everything else still works. Links inside an embedded article open in a new tab, so a reader never navigates away from your page.

Restrict which sites can embed it

By default any site can frame an embeddable article. To lock it down, list the allowed sites (origins) in the article's embed settings — only those origins can frame it, and every other site's iframe stays empty. The public /blog/<slug> page keeps working for everyone regardless.

Keeping the embed up to date

The embed always reflects the last version you published. Edit the article and publish again and every page that embeds it updates automatically — you don't need to re-copy the snippet. If you unpublish, the embed returns a plain 404, the same as the public page.