OwnYourSwarm checkin posts (visibility: unlisted) were still appearing
in /digest pages. Add isListed filter to the weeklyDigests collection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Step 3b was matching all div.e-content on the page, including sidebar
component cards (prose-sm). Added prose-lg guard so asides are only
inserted into the article body's e-content.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Browsers re-parent <aside> out of <span class="sidenote-host"> when
parsing (block element inside phrasing content is invalid HTML). This
caused s.parentElement to be .e-content instead of .sidenote-host,
so getBoundingClientRect returned .e-content's top for every sidenote.
Fix: add data-fn-ref="fnrefN" to each <aside class="sidenote"> in the
PostHTML transform. JS looks up document.getElementById(data-fn-ref)
to find the .footnote-ref-num span still inside .sidenote-host, then
measures that element's top for correct vertical alignment.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of relying on CSS cascade to apply position:relative and overflow
to .e-content/.main-content (which may not fire in time or may be overridden),
the positioning script now sets these inline styles itself. Uses
getBoundingClientRect() subtraction (hRect.top - eRect.top) to measure
position of each .sidenote-host relative to .e-content — viewport-relative
and scroll-invariant. Clears inline styles on resize to < 1440px.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getBoundingClientRect() is viewport-relative; subtracting parent.top was
unreliable depending on scroll position at call time. Switch to
h.offsetTop, which gives distance from .sidenote-host to .e-content's
padding edge directly (because .e-content is position:relative = offsetParent).
Also replace DOMContentLoaded listener (already fired at script injection time)
with requestAnimationFrame for immediate post-paint positioning.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace float+padding-left approach (which narrowed article text) with
position:absolute on each sidenote, placing it to the right of 100% of
.e-content so it paints in the existing left page margin. Text width is
unchanged. Requires viewport ≥ 1440px where the margin is 224px (210px
needed). JS sets each sidenote's top relative to its reference span via
getBoundingClientRect, with 8px overlap prevention.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a PostHTML transform that converts markdown-it-footnote output into
margin sidenotes. Replaces <sup class="footnote-ref"> with a sidenote-host
span containing a numbered inline marker and a floating <aside>. Also adds
has-sidenotes class to the parent <article> when sidenotes are present.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>