Skip to content

Releases

Vault Publisher 0.1.8

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 19 Nov 03:32

HTML prototypes whose scripts load their own images and data now publish, locked or not.

Files a page's script loads are reported

A page published as-is takes with it the files its HTML names. A path its script builds while it runs ("img/" + name + ".jpg") never appears in the HTML, so that file used to stay behind silently, and the first sign was a broken image on the live site.

The build report now lists every file sitting in an as-is page's folder that nothing published, grouped by folder, and the publish log and a notice say so too. The fix is to add that folder under Publish folders whole. Files a page asks for from the server root (/assets/index.js) are left off the list, since they are reported already with the fix that works: build with a relative base.

Locked sites serve every file through a service worker

On a password-locked site, every file is published encrypted, and the page used to repair only the references in its HTML at the moment it unlocked. A picture a script added later, a fetch() for data, or a lazily loaded chunk asked for a name that was not on the server and failed.

A locked site now also publishes a service worker, osp-sw.js, at its root. Once a page has unlocked, the worker decrypts any locked file the page asks for, whenever and however it asks:

  • Pictures added by script, fetch()ed JSON, and code-split applications all work behind a password.
  • The page is written exactly as published, with no blob URLs.
  • The worker never stores the key. It asks the page, which answers from the tab's own storage, so the key still lasts no longer than the tab.
  • Publishing a site without a password after it was locked replaces the worker with one that removes itself.

Browsers without service workers (some private windows, a site opened from disk) fall back to the old behaviour. Tested in Chromium on GitHub Pages; not yet in Safari.

Vault Publisher 0.1.7

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 12 Nov 17:54

Collapse all on the outline.

Collapse all beside "On this page"

The outline in the right-hand rail now has the same collapse-all icon as the
tree, beside its On this page heading:

  • Collapse all folds every section down to its own heading, hiding its
    subsections. Pressed again, Expand all unfolds them.
  • While folded, the mark for the section being read sits on its section's
    heading, so it is never on a hidden row.
  • Folding is kept from page to page for the visit.
  • A page with no subsections has nothing to fold, so its outline keeps a plain
    title with no icon.

Vault Publisher 0.1.6

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 12 Nov 15:55

Every row of a Bases view, and a few things for readers.

Bases views are read from their data

Bases draws only the rows of a view that fit in the window, so a view read
back out of the rendered page had as many rows as the screen had room for.
The same vault could publish complete on one computer and short on another.

On Obsidian 1.10 or later the plugin now reads table, cards and list views
from Bases' own data instead, through a view type it registers. Every row is
published, wherever the view sits in the note and however small the window.
Filters, formulas, sort, grouping, column order and display names carry over
unchanged.

  • Tables keep their summary row (Sum, Average, Earliest and the rest).
  • Cards keep their cover images, copied into the site like any other
    attachment, along with the view's card size, image shape and fit. Covers
    never published before.
  • Lists keep their markers, separator and indented properties. They used
    to publish as a notice that the view could not be shown.
  • Links in property values point at the published pages.

While the plugin is enabled, Static view (Vault Publisher) appears in
Bases' view picker. Picking it by hand is harmless.

Other view types, and every view on Obsidian before 1.10, are still read from
the page. Each one is now scrolled to the top of the window first, so it gets
as many rows as the window allows wherever it sits. A view that still comes
out short stops the publish, and the message names the page and why. A view
with no rows publishes as "No results." rather than an empty frame.

For readers

  • Collapse all and Auto-reveal current file beside the Browse label,
    as in Obsidian's file explorer. Open folders are kept from page to page.
  • Back to top, a round button in the corner of the content column once
    the reader has scrolled most of a screen.
  • Zoomable diagrams. Mermaid diagrams get zoom, reset and full-screen
    controls on hover, Ctrl or Cmd with the scroll wheel, drag and pinch.

For reviewers

The review toolbar can be dragged to the top or bottom of the window, at the
left, centre or right, and stays where it is put. The comment panel keeps
clear of it.

Vault Publisher 0.1.5

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 08 Nov 08:26

A column that is one width everywhere, and a markdown pane wide enough for the file it is showing.

One token, one width

The theme token that sets the reading column, --osp-measure, was written in
ch. That unit is resolved against the font of the element that uses it, and
the measure is applied in eight places: the article, the properties row under
a note's title, the stats line, the mentions, the source pane, the generated
lists. Several of those are set in the UI font at 0.8125rem or 0.6875rem
rather than at the body size, so one number produced three different column
widths.

What you saw was a page that did not line up. The rule under a note's title
ended 133px short of the callout below it, and the stats line 110px short,
both of them written against the same token as the article they sit in.

Every theme's measure is now in rem, which is resolved against the root, so
each consumer lands on the same edge whatever type it is set in. The values
are each theme's old ch width resolved in that theme's own body font, so no
column moved by more than about a pixel and a half. The properties row loses
its copy of the measure outright: it is inside the article, which was already
holding the column, so the second constraint was never doing anything but
disagreeing with the first.

If you set --osp-measure in your own CSS, write it in rem. A ch will
still work on the article and will quietly disagree with itself everywhere
else. The examples in the README and in the settings panel now show a rem.

A markdown pane measured in its own columns

Markdown shows a note's source, and the source is monospace, but the pane
inherited the prose measure, which is counted in a proportional font. At the
reading width it held 77.2 columns against source lines of 78, so a vault
whose notes are hard wrapped had them soft wrapped a word short of their end.

That strands single words on their own line, and worse, it makes the file's
own line breaks impossible to tell from the viewport's, which is the one
thing a source view has to get right.

The pane now takes 80 columns of its own font, or the theme's measure where
that is wider. Wide and full still mean no limit. No width fits everything
and none is meant to, since a table or a long link runs past any of them, so
the block still wraps rather than scrolls sideways.

Worth knowing if your prose will not reflow

If you widen the column and the text keeps its old line breaks, the breaks
are in your notes rather than in the page. Obsidian renders a single newline
as a line break unless Settings, Editor, Strict line breaks is on, so a
vault hard wrapped at 76 columns publishes pages carrying every one of those
breaks as a <br>. Turn that setting on and the wrapping goes back to being
what it was meant to be, which is a convenience for your diffs.

Vault Publisher 0.1.4

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 08 Nov 07:41

The notes you mark with pinned now lead the left panel, and you decide what order they come in.

Start here, beside the tree

"Start here" was reachable only by opening the search field, and it vanished
the moment you typed. The most editorial thing on a site sat behind the one
control a reader touches when they already know where they are going.

It now sits above the file tree, stays put while the tree scrolls, and is
gone from the drop-down, which keeps recency alone. Five show at once and the
rest sit behind a Show more that expands in place, so pin as many as you
like. The block is bounded, so thirty pins scroll inside their own section
rather than pushing the tree off the panel.

An order you choose

pinned now carries where a note goes as well as whether it is listed:

pinned: 1     # leads
pinned: 2     # second
pinned: 1.5   # between those two, without renumbering either

Numbered notes lead in their numbers, then everything left on true follows
in title order. The order used to be whatever the file sort returned, which
is alphabetical by vault path, so the folder a note sat in decided whether
it led and a note called "Begin here" in archive/ came last. One sort now
runs for the panel and the front page, which read titles and paths
respectively before.

Light or dark, as the site opens

Appearance, Opens in decides what a first-time visitor sees: their own
system setting, which is the default and what every site did before, or light
or dark whatever their machine says. It is written into each page at build
time, so it holds before the first paint and with JavaScript switched off,
and a reader who works the toggle still wins from then on.

A password screen that says something useful

The locked-site screen explained that the page was ciphertext and that the
key was derived locally. All true, and all jargon to most of the people who
will ever see it. It now says what a reader who is stuck can act on, which is
that the person who sent the link has the password.

It also tells you when it is working. Deriving the key is 600,000 iterations,
close to a second on a laptop and several on a phone, and the whole of the
feedback used to be a dimmed button. The action and the failure no longer
share a colour either, and the screen opens in the same mode as the site
behind it.

Two things that were quietly wrong

  • Pasting a token left the Publish button dead. The block at the top of
    the settings panel reported what was still missing and was then left alone,
    while everything it reads on is edited below it. Closing the tab and
    opening it again fixed it. It now keeps up on its own.
  • A finished publish could report itself as failed. Turning on GitHub
    Pages is the last call of a publish, after everything is committed, and it
    can answer 500 having done the work. The publisher now reads the state back
    before giving up, so a publish that worked says so.

Vault Publisher 0.1.3

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 07 Nov 20:36

Every heading on a published page is now an address you can hand over.

A heading you can link to

Headings have always had ids, and note.html#why-notes-decay has always
worked. Nothing on the page said so, so sharing a section meant knowing the
fragment was there and spelling the slug by hand.

Now a chain icon sits against the heading's last word, showing when the
pointer is anywhere on the heading. Pressing it copies the address rather
than following it
-- a reader who wants to send someone this section is
already standing in it, so the jump is the one thing the press cannot
usefully do. The icon becomes a tick, a small "Copied" appears above it, and
the address bar is made to agree so the link can also be taken from there.

Right-click anywhere on the heading

The heading's own words are the link now, which is the only way the
browser's own Copy link address can be offered without aiming at
anything first. They are not dressed as a link and clicking them does
nothing: this is where the reader already is, and a double-click picking a
word out of a heading should not send anyone anywhere or leave a history
entry behind. A modified or middle click still gets the browser's usual
answer, and the keyboard -- which has no icon to aim at -- copies by
activating the link.

With scripting off, the heading jumps and the address bar holds the link.

What it does not disturb

  • Comments keep their anchors. The review overlay anchors a comment to a
    hash of its block's text, so a "Copy" label inside a heading would move
    every anchor on every commented heading in a vault. The control is two
    icons and a title, its reply is a pseudo-element, and the heading's text
    is identical before and after -- asserted by a test, so it stays that way.
  • Headings keep their height. The icon hangs in space the last word
    reserves rather than standing in the line, where a box that size would
    push every heading taller to make room for it. Nothing moves when it
    appears.
  • A heading that wraps keeps its icon. It travels with the last word in
    a box that cannot break, so it is never stranded alone on a line.
  • A heading that already holds a link keeps its words. ## [[Note]] is
    an ordinary thing to write and HTML has no nested links. Those headings
    get a separate anchor for the control instead, which costs them the
    right-click and nothing else.

The icon is sized against the heading rather than in pixels, since one glyph
has to read as a control beside a section title and beside sixteen-point
text, and it is hidden in print.

Vault Publisher 0.1.2

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 07 Nov 07:28

A blank preview now explains itself, and the setup it was blocking on is
mostly automated.

A preview that renders nothing now says why

A vault holding an unbuilt Angular or React project publishes exactly one
index.html: the framework's shell. <app-root></app-root>, a root-absolute
<base href="/">, and no <script> anywhere. It copies perfectly, travels
perfectly, and can never render -- there is no application in it yet.

The condition was already detected, and reported to a build report nobody
opens. Now the preview says so on the page itself, and as a notice when the
build finishes.

A new settings section for built apps

Scan looks for Angular, Vite, create-react-app and Next projects and
reports four things per project:

  • Built? -- whether the output folder exists and holds an index.html
  • Fresh? -- whether anything in src/ is newer than that index.html.
    A stale build is the worst of these: the app renders, and it renders last
    week. Nothing caught it before.
  • Base href -- whether references will resolve beside the page or from
    the root of the server
  • Wired up? -- whether a Publish folders whole entry covers it

Each one comes with its remedy: the build command to copy, a Fix it for
the base href, an Add it for the folder entry.

The build itself is never run. An app launched from Finder does not see
the node your terminal sees, and running a project's build script means
running code found in a vault. So the command is handed over to paste, in
the npx form that works without a global install -- which is the form that
would have saved the session this release came out of.

Base href, the fault that leaves no evidence

A build with <base href="/"> and one with <base href="./"> are otherwise
byte-identical. Published to a subfolder, the first resolves every script
from the root of the server and renders nothing.

Fix it writes the config so it survives the next build and patches the
file already on disk so the fix is visible without rebuilding. The config
edit is made in the text, so an angular.json comes back with one line
added and every other byte unchanged. It takes two presses, and the first
one names the file and the key.

A Vite config is executable TypeScript rather than data, so that one is
shown to paste, not edited.

A folder that publishes everything except its index

dist/app when the build wrote dist/app/browser: healthy file count,
healthy byte total, 404 at the address. Reported now.

"Anchor lost" came and went

Two separate bugs in the review overlay, which is why it flickered:

  • The restamp timer repositioned pins without re-rendering the panel, so
    the panel's verdict was whatever it had been at the last view change.
  • Block ids carry an occurrence number, so duplicating a line renumbered
    every block after it and orphaned their comments. A comment now recovers
    its block when exactly one unclaimed candidate shares its hash, and when
    it genuinely cannot, the message distinguishes the two causes instead of
    blaming a rewrite for both.

Smaller

The settings page folds into sections now, core ones open.

Vault Publisher 0.1.1

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 06 Nov 21:52

A fix for the feature 0.1.0 is about, in the one place somebody would meet
it first.

A folder published whole kept losing its path

A row under Publish folders whole has two fields -- the folder, and
where it lands -- and nothing redraws between them. Each field saved the
whole list as the panel had drawn it, so the second thing you typed wrote
the first one back as it had been:

typed   folder "react-relative", destination "app"
stored  { folder: "", at: "app" }

The path was gone, and with it the folder. Adding a second folder had the
same fault for the same reason: a row half typed into was saved back empty.

Every handler now reads what is stored at the moment it runs rather than
what was on screen when the panel was drawn.

This was found by typing into both fields of a real row in Obsidian. The
test suite missed it because every test set one field at a time, and the
bug needs two edits with no redraw between them -- which is what a person
does and what a test rarely does. Both new tests fail without the fix.

Vault Publisher 0.1.0

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 06 Nov 20:26

A vault can hold a built web application and publish it as a working site.
That is what the HTML-as-is path was always for, and until this release it
could not actually do it: a stock Vite or Angular build published its page
and left enough behind to break it. The version moves to 0.1.0 because this
is the first arrangement worth handing to somebody else.

A built application now works

Checked against a real vite build and a real ng build, served and driven
in a browser rather than reasoned about.

Its stylesheet's own files travel. A page's references were read out of
its markup, which is every file the page asks for and no further. A
stylesheet asks for files of its own -- a @font-face src, a
background-image, an @import -- and all of that is inside the CSS, where
nothing scanning HTML would ever see it. The failure was quiet: the layout,
the colours and the spacing were all correct, the webfont fell back to the
system font, and the background images were simply gone. Nothing was
reported either, because a reference nothing reads cannot be found
unresolved. A carried stylesheet is now read and put through the same rules
its page went through, resolved against the sheet rather than the page --
../fonts/a.woff2 names a different file depending on which one said it.

A folder can be published whole. A bundler splits code, and a split
chunk is named nowhere a build can read it: not in the HTML, not in the CSS,
but inside a string in the minified JavaScript, fetched when a route is
visited. Leaving it behind is not a missing route -- in React the dynamic
import rejects with no error boundary above it and the application unmounts,
so one click turns the whole page blank. Name the folder your build produces
under Publish folders whole and every file in it is published, whether
or not anything references it.

And it can be published somewhere other than its vault path. Each folder
has a second field saying where it lands: blank keeps the vault path, app
publishes it at /app/, and / publishes it at the front page of the site,
which is the arrangement that was impossible before -- the application at
the front with the notes behind it. A homepage note moves to
/index-note.html and both the settings panel and the build report say so.

Only discovery changes. Excluded folders still win, hidden files are still
skipped, installed dependencies are still skipped, the size ceiling still
applies per file, reserved paths and URL collisions are still refused, and
Markdown is still never published as source. Every file left out is reported
with its reason.

Installed dependencies are not content

A vault with a prototype in it has a node_modules, and nothing here used
to look at the name -- so every package README was rendered as a note and
every bundled .html published as a page. The cost is not linear: each page
carries the whole vault listing, so N files published means N rows inlined
into each of N pages. Measured on a vault of 2,000 packages that is 1.9 MB a
page and a 3.68 GB site; at 8,000 it is 7.7 MB a page and 58.79 GB, which is
the build that never finishes rather than the build that is slow.

node_modules, bower_components and jspm_packages are now skipped by
name, in both selectors. On a real vault holding a stock Vite project: 196
Markdown files, 193 of them package READMEs, and 3 notes published. A scope
aimed inside one of these folders is still an exemption, and a file one of
your own pages references is still carried.

Comments stay on the thing they were left on

A pin left on a pop-up or a side panel stayed on screen after that panel
closed, drawn over whatever was underneath. A comment now records the
nearest nameable ancestor it was dropped inside, and the point within it,
and is drawn only while that ancestor is in the document and showing. The
card follows the panel: a comment opened while its context was open closes
with it. Two further defects this turned up only in a real browser are fixed
with it -- a second panel with the same tag emptying the view key, and a pin
on a position: fixed dialog drifting away from it on scroll.

Storage schema 10 adds context and the point within it.

Also

  • The assets/ reservation refused a whole folder to protect the seven
    paths the build writes there, which meant a Vite or Angular dist scoped
    directly had its entire bundle refused. It now names those paths, and a
    test holds the list against what the build actually writes.
  • An unbuilt framework index.html is reported. It publishes perfectly and
    cannot run, so what is wrong with it is what it does not contain: a
    framework root element and no <script> anywhere.
  • The README says what a vault can publish besides notes, including the
    shape people actually have -- the vault is the project, with a docs
    folder of notes beside src, node_modules and dist.

Known limitations

An application that computes a request path at runtime is asking for a
server, and a static host has none. A locked site still cannot serve a
code-split application, for a different reason: a module running from a blob
URL has no URL to resolve its own imports against.

Vault Publisher 0.0.100

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 05 Nov 22:05

Two things this release is about: an HTML file you publish as-is now appears
in the site's file tree, and a review left on a single-file slide deck or
prototype now keeps its pins on the pages they were left on.

An as-is HTML page is in the file tree

0.0.99 made the build report name each page it published as-is, because from
the built site a page that published correctly and a page that was never
published looked exactly alike. That was the right fix for the report and the
wrong answer to the question being asked: you look in the file tree, your
page is not there, and nothing sends you to a report.

So the tree has them. A row sits under the folder its path puts it in,
labelled with the page's own <title> and marked with an angle-bracket icon
rather than the note icon -- the one warning that following it leaves the
site's shell behind. The title is the page's own because the filename is no
answer: every build of every web application writes an index.html, so a
tree of them would be a tree of rows called "index".

The site's search is built from those rows, so these pages are searchable
now too.

The rest of the navigation is still notes only: no browse entry, no tag page,
no graph node, no place in the recently-updated list. Those are all claims
about a note -- a date you wrote, tags, an outline, what links here -- and an
as-is page has none of them. The report still lists each page and where it
went, because the tree shows that a page is published without saying that.

A deck's pins stay on the page they were left on

If you publish a slide deck or an application prototype that is one HTML
file, every pin in it used to be drawn at once, on whichever page happened to
be up, and most of them piled into the top-left corner of the first one.

The overlay knew about screens, and it knew about them from the address bar,
which is the one thing every router answers to. A deck that shows one slide
and hides the rest never touches the address bar, so every comment in the
file looked like it belonged to the same screen -- and a hidden block
measures as a box of no size, which is how the pins came to stack at the
origin.

A deck's pages are now read from the document itself, from the structure
every deck already has: one of a run of sibling slides laid out and the rest
not. That is structure rather than convention, so it works whether the deck
was written by hand, by a generator or by a framework, and where the pattern
does not hold nothing changes. A comment records the page that was showing
when you dropped it -- so a note about the footer on slide three stays on
slide three, rather than following the footer everywhere.

A pin whose page is not the one on screen is not drawn at all. It is still in
the panel, under its own page, named by the slide's own id or as "3 of 7".

And the arrows and panel rows go there

The other half, and the one you notice second: the arrows in a comment card
and the rows in the review panel now turn the deck to the page the mark is
on. They used to open the card over whatever slide you were looking at,
because they asked whether the comment was on another file -- and a deck is
one file.

Turning the deck cannot be asked of the deck: it is your script, with its own
idea of which slide is up and no method to call. So the overlay reproduces
the change rather than inventing one, swapping the shown and hidden state
between the slide that is up and the one you asked for. That uses your deck's
own vocabulary, whichever of a class, a style, hidden or aria-hidden it
hides a slide with, and leaves the document in a state your deck could have
produced itself.

One cost, worth knowing because it is visible: your deck keeps its own count
of which slide is up and the overlay cannot reach it, so after a jump your
next Prev or Next goes to the deck's idea of next rather than onward from
where you are. One click of your own navigation puts it back in step and
nothing stays broken.

Also

  • A review file gains a view field, schema 9. Older reviews read as before:
    no view means "show this wherever its page is shown".
  • A page turn now redraws the pins and regroups the panel, including for a
    deck that routes through the address bar -- nothing was listening for that
    before.

Requirements

Desktop only, Obsidian 1.7.2 or later. Install by hand: download main.js,
manifest.json and styles.css below into
<your vault>/.obsidian/plugins/vault-publisher/, then enable
Vault Publisher in Settings → Community plugins.