← site

How to use myweb and drop

Writing, publishing and deploying this site and its talks, and sharing files at expiring URLs.

The model

The site source is the DataLad dataset ~/keep/web. Each page is an item: a directory (a Hugo page bundle) in a taxon such as posts, articles, notes, projects or experiments. The item holds its org source and any images or files it uses.

A target is one place the site is deployed: local (~/public_html), github (GitHub Pages) and work (hierocles). Taxa and targets are defined in ~/keep/web/myweb.toml; host specifics, such as where each target goes, are in ~/.config/myweb/config.toml.

An item is named by its slug, taxon/slug or a path.

Write

Create a draft, then open it:

myweb new posts "A Title" -t emacs -t org
myweb new notes "TIL" -m "One line is a whole note."
myweb new articles "Long Thing" -d 2026-12-31   # TODO with deadline, in org-agenda
myweb edit a-title

edit opens a browser on a local preview that includes drafts, and the org file in your editor: editor in config.toml, else $EDITOR, else $VISUAL. When you quit the editor the item is exported and the preview shows it. If the editor is emacsclient, the file opens in your running Emacs (through [emacs] client) and every save re-exports, so the preview follows as you write.

See what is in progress, and check an item before publishing:

myweb status            # drafts: deadline, TODO, words, figures
myweb status -a -x posts
myweb check a-title     # export, build, check links; report also in .check.txt

Linking:

ToWrite
a section or page of this site[[/posts][posts]], [[/articles/howido][howido]]
a path no org file makes[[site:artifacts/][artifacts]]
an area only some sites haveits full URL, eg [[https://www.phy.bnl.gov/~bviren/tmp/][tmp]]
a file in the item[[file:fig.svg]]

A bare [[posts/]] fails the export: org looks for a local file or heading.

Who sees an item

Set in the item's org header:

KeywordValuesEffect
#+audience:personal · work · both personal goes only to github, work only to work, both to each (local gets all)
#+visibility:public · unlisted · protected unlisted and protected are never listed; protected needs a password and never goes to github
#+access:a realm, eg edg which password a protected item needs (the target's realms)

Tags (#+hugo_tags:) also place an item on a project or experiment page whose slug matches, eg tag dune lists it on DUNE.

Publish

myweb publish a-title

This clears the draft flag, exports, commits, updates the item's version stamp (and tags the revision, in a taxon with tag = true), then deploys to the publish_targets of your config. --no-deploy stops after recording; -T work picks the targets.

Deploy

myweb build work        # build and check only, into ~/.cache/myweb/stage/work
myweb deploy local      # build, then send
myweb deploy github work
myweb deploy -a         # every publish_target

Each target is sent by whatever it sets: dest (a local directory), rsync (a host:path/), git (a repository whose branch gets the build as one commit). Paths in keep, such as tmp/, are never touched. A build fails, sending nothing, if an excluded or protected page leaked into it.

To deploy without asking: myweb setup systemd -T work (or cron, git); --print shows what it would install.

Talks

A talk is a directory ~/keep/talks/<group>/<YYYY>/<MM>/<DD>/<topic>/ holding its sources, its PDF and a talk.json. Each becomes a page under talks/ on the next build. A command names a talk by that path, by its topic alone if no other talk shares it, or by a file path.

Start a new talk

myweb talks new dune "Geometry Plans"            # today; or -d 2026-12-01, -t topic

This makes dune/<today>/geometry-plans/ with an org-beamer geometry-plans.org (using your setup.org) and a draft talk.json, and opens the org file in your editor. Write the slides and export the PDF as usual (C-c C-e l P). Then:

myweb talks refresh geometry-plans                  # title and pages from the org and PDF
myweb talks refresh geometry-plans --publish --save # off draft, datalad save
myweb deploy work

Give it a summary, keywords and venue before publishing; the listing and search show them:

myweb talks describe geometry-plans -e --save     # all fields, in your editor

This shows every field, set or not, as text:

title: Geometry Plans
subtitle:
venue:
url:
keywords: Phlex, GDML

summary:
Two or three sentences, as many lines and paragraphs as you like.

Change what you want, save and quit; an emptied field is cleared. Or set fields directly: -s "…" (-s - reads stdin), -k per keyword, --title, --subtitle, --venue, --url. Use describe rather than editing talk.json by hand: for a migrated talk it also updates the talk's review, which migrating again (or pull) writes talk.json from.

Revisit a talk

myweb talks edit geometry-plans       # open its source
# edit, re-export the PDF
myweb talks refresh geometry-plans --save
myweb deploy work

Once a talk is in ~/keep/talks, edit it there, not in ~/sync/talks.

Migrate a talk from ~/sync/talks

myweb talks scan                      # find new and changed talks
myweb talks resolve dune/topics/plans/plans --accept   # an id from MIGRATION.org; migrates it
datalad save -d ~/keep/talks -m "talks: migrate plans"
myweb deploy work

scan writes ~/keep/talks/MIGRATION.org, listing every candidate by its id (its path in ~/sync/talks, without extension). resolve --accept migrates that one as it is; add -d YYYY-MM-DD or -t topic if the scan guessed them wrong. Its title comes from the PDF; give the summary (and a better title, if need be) with myweb talks describe. For many talks at once, have reviews written from the digests (myweb talks todo -p lists them, myweb talks fields describes a review), then myweb talks migrate --save. --reject and --material keep a candidate out.

A migrated talk changed in ~/sync/talks

myweb talks scan                                  # shows it "changed", or "gone" if moved
myweb talks pull shut-up-and-calculate --save     # changed where it was
myweb talks pull phlex-gdml-geometry \
      --from ~/sync/talks/dune/topics/phlex/geom --save   # moved, then changed
myweb deploy work

pull copies the talk's current files over the migrated ones and rewrites its talk.json. It keeps the talk's title, summary and keywords, and your audience, visibility, access and draft. The date and topic stay; a new group moves the talk, and so its URL. The geometry talk above was pulled this way, from wire-cell/ to dune/2026/11/20/.

Who sees a talk

As for any item, by audience, visibility and access in talk.json, else the group's defaults under [talks.group.<name>] in myweb.toml (the edg group is protected), else [talks]. Talks are never sent to github.

Artifacts

Artifacts, like this page, are ready-made files served as they are. Make a directory under ~/keep/web/artifacts/ with the files and an artifact.toml:

title = "Field response study"
date = 2026-11-25
summary = "One line for the listing."
tags = ["dune"]
# entry = "report.html"       if the page is not index.html
# audience, visibility, access as for any item

Then datalad save and deploy. To protect a whole tree with one password, nest artifacts in a group directory and set the group in myweb.toml:

[artifacts.group.review]
visibility = "protected"
access = "review"            # add review = "user review" to the target's realms

drop: share files at expiring URLs

drop copies files to tmp/ of the local or work web area and prints a URL. It never goes to github.

drop put report.pdf                    # default target, ttl 7d, hashed URL
drop put -t work --ttl 2w data/ fig.png
drop put -t work --hash none -n slides deck.pdf   # readable URL .../tmp/slides/
drop put -t work -u alice notes.pdf    # password; new user gets one generated
drop put -a -m "for the review" x.tgz  # any user of the htpasswd
drop put -y fig.png                    # also copy the URL to the clipboard

Manage what is there:

drop ls -A -l                 # all targets, with files and notes
drop extend 3f9c2a 30d        # new TTL from now, or "never"
drop rm 3f9c2a                # the id is the URL's last part
drop gc -n                    # what has expired; without -n, remove it
drop setup systemd            # run gc hourly

Users for password drops:

drop passwd ls -t work
drop passwd add -t work alice
drop passwd prune -t work     # offer to remove users no drop names

Defaults (target, ttl, hash, index) are in ~/.config/drop/config.toml.