<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Markpin Blog</title>
  <link>https://markpin.dev/blog/</link>
  <description>Notes on reading on the web and on building Markpin.</description>
  <language>en</language>
  <atom:link href="https://markpin.dev/blog/feed.xml" rel="self" type="application/rss+xml"/>
  <item>
    <title>Quote cards in Markpin 1.4.0 — turn a marked sentence and your note into an image you can post</title>
    <link>https://markpin.dev/blog/quote-cards/</link>
    <guid isPermaLink="true">https://markpin.dev/blog/quote-cards/</guid>
    <pubDate>Mon, 02 Nov 2026 00:00:00 GMT</pubDate>
    <description>Markpin 1.4.0 turns a sentence you marked and the note you wrote under it into a clean PNG to keep or post on X or Instagram. Why I built cards instead of a sharing feature, what goes on one, and how they're drawn.</description>
    <content:encoded><![CDATA[<p>Markpin is a free Chrome extension for reading on the web the way you read a paper book: highlight or underline a sentence, add a mark like ? or ★, write down why, and come back to it later. Each page you save becomes a Markdown file in a folder or Google Drive you connect. Version 1.4.0 adds something I've been meaning to build for a while: quote cards. Pick a sentence you marked, and Markpin turns it, along with your note, into a clean PNG you can keep or post on X or Instagram.</p>
<figure><img src="https://markpin.dev/img/blog/quote-card-walden-light.png" alt="A light, square quote card. A line from Thoreau's Walden sits in an amber highlighter band, with a star stamp tilted in the top-right corner. Below a thin divider is the note &quot;Starting with my calendar.&quot;, then the title Walden and the domain gutenberg.org, with a small gray Markpin wordmark at the bottom right." loading="lazy"></figure>
<h2>Why cards instead of sharing</h2>
<p>Since early October I've deliberately kept sharing and discussion features off the roadmap. They need servers, accounts and moderation, and Markpin is built to run without any of that. Tools that tried to put discussion right on the page, like web annotation layers or shared highlights on blogging platforms, rarely got people talking. People read alone and talk about it somewhere else. What stayed on my list was a lighter idea: export a highlight and its note as an image, and let the conversation happen wherever you post it.</p>
<p>In mid-October someone I know asked for two things: a way to export a passage with the underline and note still visible, and a way to share with a group or in public. Version 1.2.2 took care of part of the first with &quot;Copy all clips,&quot; which puts your clips on the clipboard as Markdown. Quote cards cover the rest of it. As for group or public sharing, I still have no plans for that.</p>
<p>The moment I had in mind is a simple one. You've marked a passage and jotted down what you thought about it, and you want the two together on one tidy card you can save or post.</p>
<h2>What goes on a card</h2>
<p>The card draws the sentence with the same pen you used on the page: highlighter, underline, wavy underline, double underline, strikethrough, box, circle or lasso. The lasso is hand-drawn and seeded with the clip's ID, so it wobbles on the card exactly the way it does on the page. Turn off &quot;Pen as drawn&quot; if you want plain text.</p>
<p>Your note goes under a thin divider and can run up to four lines. If there's no note, the quote is centered vertically instead. A mark (? ! × ★), if you added one, shows up as a tilted stamp in the top-right corner. The page title and domain run along the bottom, and you can add the date you marked it and the full URL. There's also a small gray &quot;Markpin&quot; wordmark, and you can turn that off as well. I didn't want the cards to look like ads for Markpin.</p>
<p>Cards come in light or dark, at 1:1 (the default), 4:5 or 16:9. They render at 2x, so a square card is 1080×1080 pixels. The highlighter is a touch stronger on the card than on the page, so it still reads as a highlighter when someone sees the card small on a phone.</p>
<figure><img src="https://markpin.dev/img/blog/quote-card-walden-dark.png" alt="The same Walden quote on a dark 16:9 card, with the highlighter band, the star stamp, the note &quot;Starting with my calendar.&quot; and the source line at the bottom." loading="lazy"></figure>
<p>For a long quote, the text steps down through three font sizes. If it still doesn't fit, the end gets cut off with &quot;…&quot; at a word boundary, or at any character in Korean, Japanese and Chinese. The preview is the actual render, so you'll see any cut before you save.</p>
<h2>A few build notes</h2>
<p>I draw the cards directly with Canvas 2D instead of using an HTML-to-image library, and handle line breaks, the ellipsis and the pen marks myself. The pen marks needed custom drawing code anyway, and skipping the library meant fewer dependencies and no trouble with CSP or fonts. The preview is that same canvas, scaled down.</p>
<p>Both fonts, Pretendard and JetBrains Mono, ship with the extension; nothing loads from the web. Pretendard is split into many unicode-range subsets, so the code first asks the browser to load the font for the exact text it's about to draw. Otherwise only some subsets might be loaded, and Korean text could fall back to a different font.</p>
<p>The box, circle and lasso reuse the geometry code from the content script that draws them on the page, which is why they match.</p>
<p>Taking the store screenshots turned up two problems. A comma or period could end up at the start of a line, so closing punctuation now stays with the word before it. And the tilted stamp could touch a box or circle drawn around the quote, so there's now a 12px gap between them.</p>
<p>Testing on my own computer on November 1 and 2 turned up two more. Boxes from the box pen overlapped from one line to the next; each box is now sized to its own line of text. And multi-select now starts with nothing checked, with a &quot;Select all&quot; / &quot;Deselect all&quot; toggle.</p>
<h2>Limits</h2>
<ul><li>Only text clips can become cards. Region (screenshot) clips aren't supported yet.</li><li>Very long quotes get cut off with &quot;…&quot;. That's on purpose: the card doesn't grow taller to fit, because social apps crop tall images.</li><li>1.4.0 needs no new permissions. If you download several cards at once, though, Chrome may ask you once to allow multiple downloads.</li><li>Cards are a one-way export. Markpin doesn't sync them back or keep track of them, and deleting a page leaves its cards alone. The MCP server ignores the <code>cards/</code> folder.</li></ul>
<h2>How to use it</h2>
<ol><li>Open the side panel, or <a href="https://markpin.dev/app/">markpin.dev/app</a> on your phone, and find a text clip.</li><li>Click or tap the small card icon on the clip. You'll see a live preview of the card along with your options.</li><li>Pick where the card goes: Download PNG, Copy (only for a single card), or Save to my folder, which writes <code>cards/&lt;page-slug&gt;-&lt;first 8 characters of the clip id&gt;.png</code> into your connected folder or Google Drive.</li><li>To make several at once, click or tap &quot;Card&quot; at the top of the clip list and check the clips you want. You'll get one card per clip, all with the same settings.</li></ol>
<p>Markpin remembers your theme, ratio and other choices for next time. The phone web app runs the same side-panel code, so cards work there exactly as they do in Chrome.</p>
<p>Version 1.4.0 also brings two smaller changes: the tag you picked in the side panel stays selected while you search, and the MCP connection guide now has an example of merging several tags into one.</p>
<p>Markpin is on the <a href="https://chromewebstore.google.com/detail/gapplocbnakkofbdbllljohlfceghgmb">Chrome Web Store</a> and needs Chrome 122 or later. If you make a card that looks off, say a pen drawn wrong or a quote cut in an odd place, please send it my way at support@markpin.dev.</p>]]></content:encoded>
  </item>
  <item>
    <title>Share once from your phone, let your desktop Chrome fetch the text — how Markpin got to Android and iPhone</title>
    <link>https://markpin.dev/blog/markpin-on-your-phone/</link>
    <guid isPermaLink="true">https://markpin.dev/blog/markpin-on-your-phone/</guid>
    <pubDate>Tue, 27 Oct 2026 00:00:00 GMT</pubDate>
    <description>Chrome on Android has no extensions, so markpin.dev/app is a PWA. Save from the share sheet, select a sentence first to mark it, and let the desktop extension fill in the text. What I decided to keep it server-free on the same Google Drive.</description>
    <content:encoded><![CDATA[<p>Markpin is a Chrome extension for reading on the web the way you read a paper book: highlight a line, write down why. At the desk it has become usable enough. What was missing was the other half of the day, reading on the phone and picking the page up at the desk later. The goal of this round was simple to state: take what already works in the browser and make as much of it as possible usable on a phone. Read on the phone, pick the page up at the desk; highlight at the desk, reread on the phone. Version 1.3.0 gets most of the way there. This post is about how it works on the phone and why it ended up shaped like this.</p>
<h2>The short version</h2>
<p>Open <a href="https://markpin.dev/app/">markpin.dev/app</a> on your phone and connect the Google account you use at your desk. Your saved pages, highlights and notes are there. On Android, share a page to Markpin from any app and it's saved; select a sentence first and share, and that sentence becomes a mark. The page text isn't fetched by the phone. Your desktop Chrome fills it in. On iPhone, revisiting works today; saving and marking are still to come.</p>
<figure><img src="https://markpin.dev/img/blog/phone-share-result.jpg" alt="Markpin on Android right after sharing a selected sentence: one clip, the note box, and the line &quot;The text fills in while your desktop Chrome is open and connected&quot;" loading="lazy"></figure>
<h2>Why a web app and not the extension</h2>
<p>I assumed I could ship the extension to phones as is. Chrome on Android simply has no extensions. Edge and Firefox on Android do, but they lack the side panel and <code>getAuthToken</code>, so the current build doesn't run there unchanged. Safari wants an Xcode wrapper and an App Store listing ($99 a year). Every phone was a different road.</p>
<p>So I started with the one road that works everywhere: a PWA at markpin.dev/app. Chrome on Android and Samsung Internet let an installed PWA register as a share target, so Markpin shows up in the share sheet of any app. What comes through a share is roughly the URL and whatever text you selected. Select a sentence and share, and it becomes one highlight; share without a selection and only the page is saved. Highlighting inside the page itself isn't something a PWA can do. That's what the Edge and Firefox extensions are for, and they're the next plan.</p>
<h2>Why the desktop fills in the text</h2>
<p>A page that arrives through a share has a URL and nothing else, no title, no body. The PWA could try to fetch the URL itself, but reading another site's HTML from inside a browser is blocked by CORS most of the time, and putting a server in between goes against the one rule Markpin has kept from the start: no server, no account. So the desktop extension does it. On its next sync it notices a page with an empty body, fetches the URL, extracts readable text (this is where the new <code>offscreen</code> permission comes from; a service worker has no DOM, so the parsing happens in an invisible document), and writes title and text back to Drive. The phone picks that up on its next sync and the title changes from <code>en.wikipedia.org</code> to <code>Pencil</code>.</p>
<p>The honest downside: your desktop Chrome has to be open and connected to Drive for the text to arrive. While testing, I once waited a long time without noticing that the desktop extension was sitting in &quot;Reconnect needed&quot;, and the phone gave no hint at all. That's why the line on the phone now says &quot;The text fills in while your desktop Chrome is open and connected&quot;. Telling the phone what the desktop is doing is on the list for later.</p>
<h2>One Google Drive for both</h2>
<p>The desktop extension writes to Google Drive with the <code>drive.file</code> scope only, which means &quot;this app sees only the files it created&quot;. The catch is that &quot;app&quot; means OAuth client. If the extension and the PWA used different client IDs, they wouldn't see each other's files even on the same account. I learned this during research, so the first thing in the mobile work was moving the desktop extension's auth to a Web client, and the PWA signs in with the same client through a redirect. No server, and both sides look at the same folder.</p>
<p>Two devices editing the same page is now a real case, so merging changed too. It used to be page-level last-writer-wins with a <code>.conflict</code> copy when things collided. Now it's a three-way merge per clip, note and tag. Two highlights from the desk plus two sentences shared from the phone on the same page add up to four. That exact case came up during testing, and watching it merge without a copy was a relief.</p>
<h2>Testing a phone without a phone</h2>
<p>I don't own an Android phone. So the whole loop ran on an Android emulator (Play Store image, Chrome 124): share, save, connect Google, desktop fills the text, phone receives it. That's also where I checked sharing in airplane mode (saved locally, uploaded later), sharing text with no link (&quot;Couldn't find a link in what was shared&quot;), and that signing in brings you back to the home-screen app rather than a browser tab. There will be things only a real device shows. If something looks off, support@markpin.dev reaches me.</p>
<h2>How to use it</h2>
<ol><li>Open <a href="https://markpin.dev/app/">markpin.dev/app</a> in Chrome on Android. In the menu, choose &quot;Add to Home screen&quot; and then &quot;Install&quot;. It opens like an app, and the install is what makes it appear as a share target.</li><li>Tap &quot;Connect with Google&quot; and sign in with the account you use at your desk. A moment later the list fills in with &quot;n pages are here&quot;.</li><li>While reading in any app, Share → Markpin. Select a sentence first and share, and that sentence becomes a mark.</li><li>If your desktop Chrome is open, title and text fill in within a few minutes, and the phone shows them on its next sync.</li></ol>
<p>On iPhone, open the same address in Safari and use Share → &quot;Add to Home Screen&quot;. Revisiting works. Saving and marking need a Safari extension, and I'm <a href="https://mud-studio.kit.com/ios">collecting sign-ups</a> to decide how soon that comes.</p>
<p>Next is the Edge and Firefox extension for Android, so you can highlight inside the page on a phone too. Before that, I'd like to hear from people who try the PWA. What I most want to know is whether &quot;save on the phone, read at the desk&quot; is a loop people actually use.</p>]]></content:encoded>
  </item>
  <item>
    <title>How to get web highlights into Obsidian, with a note on why you marked each one</title>
    <link>https://markpin.dev/blog/web-highlights-in-obsidian/</link>
    <guid isPermaLink="true">https://markpin.dev/blog/web-highlights-in-obsidian/</guid>
    <pubDate>Tue, 13 Oct 2026 00:00:00 GMT</pubDate>
    <description>Highlight a web page in Chrome, add a mark and a short note, and get one Markdown file per page in your vault, with ==highlights==, callouts and properties Obsidian can read.</description>
    <content:encoded><![CDATA[<p>Obsidian's own Web Clipper is the best way I know to get a whole page into a vault. What I kept missing was the part that happens while I read: marking a line, saying why I marked it, and finding my place again the next day. I built Markpin for that part. It writes plain Markdown, so what it saves can live in the same vault. This post covers the setup and what ends up on disk.</p>
<h2>What you get</h2>
<p>One file per web page. Each highlight is written as a <code>==highlight==</code> with your note under it. The page's title, URL, tags and your one-line takeaway are properties.</p>
<figure><img src="https://markpin.dev/img/blog/obsidian-file.jpg" alt="A saved page opened in Obsidian, with properties on top and highlights and notes under Clips" loading="lazy"></figure>
<h2>Set it up</h2>
<ol><li>Install <a href="https://chromewebstore.google.com/detail/gapplocbnakkofbdbllljohlfceghgmb">Markpin from the Chrome Web Store</a>. It's free and there is no account.</li><li>Open the extension's options. Under <strong>Storage</strong>, pick <strong>Local folder</strong> and choose a folder inside your vault, for example <code>Vault/Markpin</code>. Chrome asks you to confirm access to the folder. After Chrome restarts, Markpin's options may say it needs the permission again. Click &quot;Allow again&quot;, choose &quot;Allow on every visit&quot;, and Chrome won't ask after that.</li><li>Under <strong>Markdown</strong>, pick the <strong>Obsidian</strong> template. It writes clips as <code>==highlights==</code> and <code>[!quote]</code> callouts. The default template writes blockquotes.</li></ol>
<p>The template applies to every file Markpin writes from then on. A page you saved earlier keeps its old shape until Markpin writes it again (a new highlight, note or tag), or until you run &quot;Rewrite existing files&quot; in the same options. Rewriting overwrites anything you changed by hand in Markpin's own properties or the body. Properties you added yourself are kept.</p>
<h2>Read and mark</h2>
<p>Select a sentence on any page. A small toolbar appears with two rows: <code>Clip ? ! × ★</code> on top, and a dot for each of the other highlight colors plus Bookmark below. One click on a color or a mark saves the highlight. If the page wasn't saved yet, that saves the page too.</p>
<p>The four marks are reactions:</p>
<ul><li><code>?</code> a question</li><li><code>!</code> something new to me</li><li><code>×</code> I disagree</li><li><code>★</code> the key point</li></ul>
<p>Right after the highlight is saved, a note box opens with a question already in it. The question depends on the mark: &quot;Why did you mark this?&quot; with no mark, &quot;What are you wondering?&quot; for <code>?</code>, &quot;What's new to you?&quot; for <code>!</code>, &quot;Why do you disagree?&quot; for <code>×</code> and &quot;Why does this matter most?&quot; for <code>★</code>. You can leave the box empty.</p>
<figure><img src="https://markpin.dev/img/blog/note-box-question.jpg" alt="The note box, opened after a highlight, asks a question that depends on the mark" loading="lazy"></figure>
<p>If you stop partway, leave a bookmark. A thin rail along the left edge of the page shows a dot for each highlight, a ribbon for the bookmark and a line for where you left off, and clicking a dot scrolls there. When you finish, click the bookmark and choose &quot;Mark as read&quot;. It asks for the page in one line, from memory. If you only skimmed it, &quot;Mark as skimmed&quot; in the same menu records that instead.</p>
<h2>What the file looks like</h2>
<p>Files land in <code>pages/&lt;year&gt;/</code> inside the folder you chose. Here is what one looks like, shortened and edited for the example.</p>
<pre><code>---
title: Pin
url: https://en.wikipedia.org/wiki/Pin
savedAt: 2026-10-01T14:46:40.646Z
tags:
  - pins
  - history
summary: Pins are fastening devices made from various materials.
note: Older than needles. Bone and thorn first, brass by the Bronze Age.
readAt: 2026-10-13T02:10:00.000Z
---

## Clips

==A pin is a device, typically pointed, used for fastening objects or fabrics together.==

compare with the safety pin page

==Many later pins were made of brass==

? why brass and not iron

&gt; [!quote]
&gt; Different types of pins

## Content

(the text of the article)
&lt;!-- markpin
{&quot;v&quot;:2,&quot;id&quot;:&quot;…&quot;,&quot;clips&quot;:[…]}
--&gt;</code></pre>
<ul><li><strong>Properties.</strong> <code>title</code>, <code>url</code>, <code>savedAt</code> and <code>tags</code> are always there. <code>summary</code> is there when one was written (Chrome's built-in AI writes it on devices that have the model). <code>note</code> is your one line. <code>readAt</code> or <code>skimmedAt</code> appears once you mark the page.</li><li><strong>Highlights.</strong> Each one is a <code>==highlight==</code>, which Obsidian renders as highlighted text.</li><li><strong>Your note.</strong> It sits on the line under the highlight. If you used a mark, the line starts with it, as in <code>? why brass and not iron</code>.</li><li><strong>Region clips.</strong> A paragraph or image you boxed on the page becomes a <code>[!quote]</code> callout.</li><li><strong>The last block.</strong> The comment at the end is the data Markpin needs to draw your highlights on the web page again. Reading view hides it. Live Preview shows it as gray text at the bottom of the note (one long line of JSON).</li></ul>
<h2>Working with the files in Obsidian</h2>
<p>They are ordinary notes, so search finds your notes and your one line along with the article text, and you can link to a page from anywhere with a normal link.</p>
<p>Two rules keep things from getting lost:</p>
<ol><li><strong>Add your own properties freely.</strong> Markpin keeps any property it doesn't recognize.</li><li><strong>Don't edit Markpin's own keys or the body by hand.</strong> The next time Markpin writes the file, those edits are overwritten. Write your longer thinking in your own note and link to the page.</li></ol>
<p>If you turn on &quot;Move deleted pages to the .trash/ folder&quot; in the options, a deleted page's file moves to <code>.trash/</code> inside the folder you chose (<code>Vault/Markpin/.trash/</code>, not the vault's own trash). It is off by default and works with folder storage only.</p>
<h2>Things to know before you rely on it</h2>
<ul><li>Markpin runs in Chrome on desktop (version 122 or later).</li><li>For a vault, use <strong>Local folder</strong>. The Google Drive option keeps its own Markpin folder in My Drive and does not write into a vault.</li><li>Highlight colors are not written to the body in the Obsidian template. They stay in the machine block and on the web page.</li><li>&quot;Where you left off&quot; is remembered on that computer only and is never written to the file.</li></ul>
<h2>Optional: let Claude read the same folder</h2>
<p>Markpin has a small MCP server that reads this folder, so an assistant such as Claude Code or Cursor can answer from what you saved. It runs on your computer, needs no API key and is read-only unless you add <code>--allow-write</code>. It needs Node.js 20.1 or newer.</p>
<pre><code>claude mcp add markpin -- npx -y @markpin/mcp@latest --dir ~/Vault/Markpin</code></pre>
<p>Then you can ask something like &quot;what did I highlight about brass pins?&quot; and it searches your pages.</p>]]></content:encoded>
  </item>
  <item>
    <title>I built a web highlighter that asks why you marked it, and saves the answer as Markdown</title>
    <link>https://markpin.dev/blog/why-did-you-mark-this/</link>
    <guid isPermaLink="true">https://markpin.dev/blog/why-did-you-mark-this/</guid>
    <pubDate>Tue, 13 Oct 2026 00:00:00 GMT</pubDate>
    <description>Seven decisions behind Markpin, a local-first Chrome extension: IndexedDB, one Markdown file per page, sync without a server, restoring highlights, and an MCP server.</description>
    <content:encoded><![CDATA[<p>Markpin is a web highlighter that asks why you marked the line. Select a sentence, pick a color or a mark, and a note box opens with a question already in it: &quot;Why did you mark this?&quot;</p>
<p>I'm a developer, and for years I've read technical articles the same way: not right now, but save it somewhere first. &quot;Somewhere&quot; was Notion for a while, then Chrome bookmarks, and the links piled up in both. What never piled up was anything I had actually read. If I stopped halfway through an article, I couldn't find my spot again. The sentences I'd wanted to keep were gone. Thoughts I had while reading were too much hassle to write down separately, so I let them go. Eventually I built a Chrome extension that lets me do on the web what I do with a paper book: highlight a line, write a note in the margin, put a bookmark in, and open it again later. It's free and there's no account.</p>
<p>The question arrived in 1.2.0. Highlighting on its own rates low as a way to learn, while asking yourself &quot;why?&quot; and explaining things in your own words rate higher (Dunlosky et al., 2013). In Roediger and Karpicke's 2006 study, people who recalled a text from memory remembered more of it a week later than people who reread it, 61% to 40%. Those two results decided what the note box says and what happens when I mark a page as read.</p>
<p>The rest of this post is seven decisions I made while building the extension, in order.</p>
<figure><img src="https://markpin.dev/img/blog/note-box-question.jpg" alt="The note box, opened after a highlight, asks a question that depends on the mark" loading="lazy"></figure>
<h2>1. IndexedDB is the source of truth; chrome.storage holds settings only</h2>
<p>Saved pages and their clips (highlights, notes, region clips) live in the extension's IndexedDB. <code>chrome.storage</code> holds settings only: where to save, whether the floating button is shown, whether on-device AI is on. One reason is size: page bodies and clip images outgrow the default <code>chrome.storage.local</code> quota quickly (hence the <code>unlimitedStorage</code> permission). The other is transactions: a page and its clips are one record, so adding a clip is a read-modify-write that has to be atomic. The side panel's Zustand store holds UI state only and always re-reads data from IndexedDB. After the background worker writes, it broadcasts <code>STORE_CHANGED</code>; after the side panel writes, it re-reads on its own, because <code>sendMessage</code> doesn't echo back to the sender.</p>
<h2>2. Each page is one Markdown file, with machine data in a comment at the end</h2>
<p>I wanted the file to look clean in Obsidian and to round-trip through the extension without loss. The first version (v1) put every key in frontmatter, and Obsidian showed all of them in the Properties panel, with the nested <code>clips</code> key rendered as one line of JSON. So v2 splits it like this.</p>
<pre><code>---
title: Example article title
url: https://example.com/article
savedAt: 2026-09-16T10:00:00.000Z
tags:
  - react
  - state
summary: One-line summary
---

## Clips

&gt; Quoted sentence

My note

## Content

(body)
&lt;!-- markpin
{&quot;v&quot;:2,&quot;id&quot;:&quot;…&quot;,&quot;rev&quot;:3,&quot;updatedAt&quot;:&quot;…&quot;,&quot;domain&quot;:&quot;example.com&quot;,&quot;clips&quot;:[{&quot;id&quot;:&quot;…&quot;,&quot;type&quot;:&quot;text&quot;,&quot;createdAt&quot;:&quot;…&quot;,&quot;updatedAt&quot;:&quot;…&quot;,&quot;text&quot;:&quot;Quoted sentence&quot;,&quot;note&quot;:&quot;My note&quot;,&quot;selectors&quot;:[{&quot;type&quot;:&quot;TextQuoteSelector&quot;,&quot;exact&quot;:&quot;…&quot;,&quot;prefix&quot;:&quot;…&quot;,&quot;suffix&quot;:&quot;…&quot;},…],&quot;color&quot;:&quot;amber&quot;}]}
--&gt;</code></pre>
<p>Frontmatter keeps the human-readable keys: <code>title</code>, <code>url</code>, <code>savedAt</code> and <code>tags</code> are always there; <code>summary</code> (only when Chrome's built-in model produced one), <code>note</code>, <code>readAt</code>, <code>skimmedAt</code> and <code>deletedAt</code> appear when present. Machine data (<code>id rev updatedAt domain clips bookmark</code>) goes into one line of JSON inside <code>&lt;!-- markpin … --&gt;</code> at the end of the file; the excerpt above shortens it. The block sits at the end because Obsidian's Live Preview doesn't hide HTML comments; it shows them in gray (Reading view hides them). A <code>--&gt;</code> inside a string is written as <code>--\u003e</code> in that JSON line so it can't close the comment early, and <code>JSON.parse</code> restores it.</p>
<p>Unknown frontmatter keys and unknown block keys are both preserved, and a change that only adds keys doesn't bump <code>v</code>. A file is capped at 512 KB; if the body would overflow, it's truncated and <code>contentTruncated</code> is recorded. The parser still reads v1 (frontmatter <code>markpin: 1</code>). The &quot;rewrite existing files&quot; option in settings re-serializes everything to v2 with <code>rev</code> bumped but <code>updatedAt</code> untouched, so other devices don't produce conflict copies.</p>
<h2>3. Sync needs no server, only a folder or Google Drive</h2>
<p>There are three places to keep things: the browser only (the default), a folder on your machine (File System Access API, <code>showDirectoryPicker</code>), or Google Drive (with the <code>drive.file</code> scope, so the extension only sees files it created). The folder and Drive are two adapters behind one interface (<code>list</code>, <code>read</code>, <code>write</code>, <code>remove</code>), and one engine drives both.</p>
<p>The engine syncs 3 seconds after the last write and every 5 minutes via <code>chrome.alarms</code>. On failure it retries with exponential backoff: 1 minute, doubling, capped at 30 minutes. Conflicts are handled simply. A page with no sync history goes to the side with the later <code>updatedAt</code>; a page that has synced before and changed on both sides takes the copy already in the folder, and this device's version is kept as a <code>.conflict-</code> copy rather than deleted. It's crude, but for a personal tool with no server I decided it's enough. With folder storage there's also an option to move deleted pages to <code>.trash/</code>, following Obsidian's trash convention.</p>
<p>An MV3 service worker can die at any moment, so the periodic sync and the retry are both alarms, and what still needs pushing is tracked in IndexedDB. A sync requested while one is running sets an <code>again</code> flag and runs once more afterwards. While adapters are being switched, the old one is locked out. Service worker lifetime is the part of MV3 that bothers me most.</p>
<h2>4. Highlights are redrawn from stored selectors</h2>
<p>When you reopen a page, the highlight has to land on the same sentence. A text clip stores three W3C Web Annotation selectors: <code>TextQuoteSelector</code> (the exact text plus up to 32 characters of prefix and suffix), <code>TextPositionSelector</code> and <code>CssSelector</code>. A region clip stores a <code>CssSelector</code> and an <code>XPathSelector</code> per element. On restore, the quote is tried first against the whole page. If it misses, the CSS or XPath selector finds the element and the quote is retried inside it with whitespace normalized. As a last resort the normalized quote is tried against the whole page. The position selector is stored for interop with other tools; the matcher doesn't use it. A clip that matches nothing is marked as an orphan: it stays in the list but isn't drawn on the page.</p>
<p>Highlights are painted with the CSS Custom Highlight API, so the page's DOM isn't modified. The rest of the in-page UI (floating button, selection toolbar, note popover, rail) renders inside a Shadow DOM under <code>#markpin-host</code>, with no <code>!important</code> anywhere. The page body is captured only when you save, clip or bookmark.</p>
<h2>5. Summaries and tags come from Chrome's built-in model</h2>
<p>The one-line summary and tag suggestions use Chrome's built-in Prompt API (<code>LanguageModel</code>). The model runs on the device, so the page body never leaves it and there's no API key. When the UI language is en, ja, es, de or fr, the output language is declared through <code>expectedOutputs</code>; ko and pt-BR aren't accepted there yet, so for those the language is only set in the prompt. On a device without the model the feature stays off, and you can turn it off in settings too.</p>
<h2>6. Claude reads the folder over MCP, and writes need confirmation</h2>
<p><code>@markpin/mcp</code> is a stdio MCP server that runs over that folder (Node 20.1+). By default it exposes four read-only tools (<code>search get_page list_recent list_tags</code>); with <code>--allow-write</code> it registers twelve write tools (<code>add_clip set_clip_note set_bookmark update_tags …</code>). If the client supports elicitation, every write asks for confirmation first, because I didn't want an AI quietly editing my files. Every tool carries a <code>readOnlyHint</code>, and the write tools a <code>destructiveHint</code> as well. The server watches the folder, so a page you just saved in the browser is there for the next question. The server is MIT.</p>
<pre><code>claude mcp add markpin -- npx -y @markpin/mcp@latest --dir ~/Markpin --allow-write</code></pre>
<h2>7. 1.2.0 adds marks and a line from memory, and keeps reading position out of the file</h2>
<p>The selection toolbar now has two rows. The top row is <code>[Clip] ? ! × ★</code>. The bottom row has a dot for each of the other three highlight colors (Clip uses the current one), with Bookmark at the right end. One click on a color or a mark creates the clip. The marks stand for a question, something new, a disagreement and a key point. A clip has a color and at most one mark: color is for sorting, the mark is the reaction.</p>
<p>The note box that opens after a clip is saved now has a placeholder that depends on the mark: &quot;Why did you mark this?&quot; with no mark, &quot;What are you wondering?&quot; for <code>?</code>, &quot;What's new to you?&quot; for <code>!</code>, &quot;Why do you disagree?&quot; for <code>×</code>, and &quot;Why does this matter most?&quot; for <code>★</code>. You can leave the box empty.</p>
<p>&quot;Mark as read&quot; opens a second box, &quot;This page in one line&quot;, with the placeholder &quot;One line, from memory&quot; and a 500-character limit. The line shows under the title in the side panel and is searchable. There is also a third reading state next to bookmarked and read: skimmed. A page is in at most one of the three, and skimmed doesn't ask for a line.</p>
<p>All of this only adds keys, so the format is still v2. Here is the top of the same file after 1.2.0.</p>
<pre><code>---
title: Example article title
url: https://example.com/article
savedAt: 2026-09-16T10:00:00.000Z
tags:
  - react
  - state
summary: One-line summary
note: Most of what I kept in global state was server cache
readAt: 2026-10-12T08:30:00.000Z
---

## Clips

&gt; Quoted sentence

× only if every component reads it</code></pre>
<p>The mark is a prefix on the note line under the highlight, and the machine block carries it per clip as <code>&quot;kind&quot;:&quot;disagree&quot;</code> (the values are <code>question</code>, <code>insight</code>, <code>disagree</code> and <code>star</code>). The one line is the frontmatter property <code>note</code>. A skimmed page gets <code>skimmedAt</code> with an ISO time where this one has <code>readAt</code>. Empty values are omitted.</p>
<p>On the page, a 12 px rail along the left edge shows a dot per clip in its color, a ribbon for the bookmark and a gray line for where you left off. Clicking a dot scrolls there. The rail started on the right edge and moved left because it collided with macOS overlay scrollbars. Where you left off is recorded 1.5 seconds after scrolling stops. It lives in IndexedDB on that device and is never written to the Markdown file. Coming back triggers no toast or auto-scroll; the position only shows on the rail.</p>
<p>In the side panel, bookmarks older than 35 days get one card: &quot;Bookmarks over 35 days old: N · Still want to read them?&quot; Each page offers Keep, Mark as skimmed or Remove bookmark, and nothing is deleted.</p>
<p>In <code>@markpin/mcp</code> 0.9.0, <code>add_clip</code> accepts <code>kind</code>, and there are two new write tools: <code>set_note</code> (the one line; an empty string clears it, and it returns before and after) and <code>mark_skimmed</code>. Of the read tools, only <code>get_page</code> returns <code>kind</code>, <code>note</code> and <code>skimmedAt</code>; <code>search</code> and <code>list_recent</code> return summaries without them.</p>
<h2>Permissions and outbound requests</h2>
<p>Permissions are <code>storage unlimitedStorage sidePanel activeTab alarms identity</code>, plus the <code>&lt;all_urls&gt;</code> host permission; the content script runs on http and https pages. <code>identity</code> and <code>googleapis.com</code> are used only when you connect Drive. The extension makes no other outbound requests and has no analytics. (Update: since 1.3.0, the extension also fetches pages you share from your phone, without cookies. See the <a href="https://markpin.dev/privacy/">privacy policy</a>.)</p>
<h2>Two questions for you</h2>
<p>On two of these decisions I'd rather hear from people who've used it than decide alone. There are no comments on this page, so write to support@markpin.dev.</p>
<ol><li>File format v2: human keys in frontmatter, machine data in a comment block at the end. If you use this in Obsidian or another Markdown tool, is there a point where the split gets in the way?</li><li>The next thing I'm looking at is coming back to what you've read. Highlight review, your notes in one place, or local reading stats: I'd like to hear which should come first.</li></ol>
<ul><li>Extension: <a href="https://chromewebstore.google.com/detail/gapplocbnakkofbdbllljohlfceghgmb">https://chromewebstore.google.com/detail/gapplocbnakkofbdbllljohlfceghgmb</a></li><li>MCP server: <a href="https://github.com/mud-studio/markpin-mcp">https://github.com/mud-studio/markpin-mcp</a></li></ul>]]></content:encoded>
  </item>
</channel>
</rss>
