Skip to content

Vault Publisher 0.0.100

Choose a tag to compare

@NoteNerdOfficial NoteNerdOfficial released this 05 Nov 22:05
· 46 commits to main since this release

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.