Repository navigation
Releases
notionic v0.17.0
notionic v0.16.1
notionic v0.16.0
Minor Changes
- #57
a48ffadThanks @nublson! - Live embeds resize to the height their page reports vianotionic:resize: a framed page that posts{ type: "notionic:resize", height }to its parent gets a frame that many pixels tall (rounded, up to 9999). A message counts only from one of the renderer's live frames and from an originembedsallows (with a function policy, the frame's own origin).?height=, or 16:9, is the starting size. A page with live embeds ships a small client listener for this; pages without ship nothing new.
notionic v0.15.0
notionic v0.14.0
Minor Changes
- #55
ec00c7fThanks @nublson! - Live embeds:<NotionRenderer embeds={["codepen.io", "figma.com"]}>renders embeds of the listed hosts (subdomains included) in a sandboxed iframe with the caption below, instead of a preview card.embedsalso takestruefor every embed or a function of the URL. Only http(s) URLs are embedded, demos take precedence, and it's off by default. Exports theEmbedPolicytype.
notionic v0.13.0
Minor Changes
-
#53
377f0a1Thanks @nublson! - Demo embeds take a height:…/demos/<name>?height=320makes the demo's frame 320px tall, border included, with the demo centered and no vertical padding, so short frames stay as short as asked. Notion's API doesn't send the size an embed is given in Notion, so the URL carries it. Custom frames get it as theheightprop (undefined without one); the default frame still fits the demo when there's none. -
#52
0939992Thanks @nublson! - Headings now render at their Notion level instead of one level down: heading 1 is<h1>, heading 2<h2>, heading 3<h3>and heading 4<h4>, andblocksToMarkdownwrites#through####. The footnotes title follows its marker heading the same way. If your page title is also an<h1>, use heading 2 and below in Notion for sections.
notionic v0.12.0
Minor Changes
- #50
9115f5bThanks @nublson! - Link favicons can now use the icon each site declares for itself:linkFavicons: { siteIcons: true }(andfetchLinkFavicon(host, { siteIcons: true })) reads the site's home page first and takes its SVG icon, or the smallest PNG of 32px or more, or its/favicon.ico, before Google's and DuckDuckGo's services, whose stored copies can be stale or re-encoded (Purl's came back as a white-cornered JPEG). It's off by default, since it fetches URLs the linked sites choose; each hop is checked for private hosts, and a site's own icon is capped at 100 KB. Image blocks and link favicons get a soft hairline that follows the image's own shape (--notionic-image-edge: 25% black, or 25% white in dark mode) instead of a square outline, so a light, dark, round or transparent image keeps an edge without a box around it. Video and embed frames keep the square outline. Fetching also refuses host names that resolve to private addresses (where the runtime has DNS), for bookmark previews and favicons alike.
notionic v0.11.1
Patch Changes
- #49
5678f81Thanks @nublson! - Link favicons:- No icon vs. not looked up. A site without a favicon is now recorded as
nulland shows a globe. A site that wasn't looked up shows nothing, so<NotionRenderer linkFavicons>alone no longer puts a globe on every link. - Outages aren't cached. A host the favicon services couldn't answer for (a timeout, a 5xx, a rate limit) is left out, so it isn't cached as "no icon" and the next fetch asks again.
- Subdomains fall back to their parent domain.
you.substack.comgets Substack's icon. - Private hosts are never sent to the favicon services.
- No icon vs. not looked up. A site without a favicon is now recorded as
notionic v0.11.0
Minor Changes
- #48
e68b044Thanks @nublson! - Favicons on links to other sites:fetchBlocks(notion, id, { linkFavicons: true })looks each linked host up once (Google's favicon service, then DuckDuckGo's) and attaches the icons to the blocks as data URLs, and<NotionRenderer linkFavicons>shows them before the link text, with a muted globe for a site without one. Both are off by default. Paths, anchors, mailto links and Notion pages get none.LinkPropsgetsfavicon, which the newLinkFaviconcomponent renders;notionic/fetchexportsfetchLinkFavicon(host).