Direct publishing to DataHub: practical workflow and roadmap

Date: 21 September 2026. Companion to the architecture and product assessment.

This is a proposed work sequence, not implemented functionality. Commands in “Available today” match the inspected CLI; later capabilities are explicitly proposals. Rufus has specified that editorial approval happens locally and the AI should then publish directly. No further hosted editorial gate is required.

Available today

Choose the destination

The public URL has the form https://datahub.io/<publication>/<post-slug>:

GoalDestinationBundle
Publish a DataHub blog articleExisting blog publicationRoot README plus charts/images
Publish a maintained core datasetExisting core, with team agreement/accessRoot README, datapackage, public resources
Publish in a topical/team collectionAn explicitly chosen publicationStory or dataset bundle
Publish under a custom domainA publication already configured for that domainSame content model; domain routing is separate

Publication slugs are destinations, not GitHub organization names. A source repo and publication can have different names. Being a Post author does not establish permission to publish into its publication.

Prefer the existing team-owned destinations where appropriate. The current apex sitemap admits publications owned by datahub; a new publication owned by a personal account is not automatically equivalent for distribution. A large namespace reorganization is unnecessary for the initial workflow.

Prepare exactly one publishable directory

For a story:

publish/oil-prices-story/
  README.md
  oil-prices-brent-wti.svg
  oil-prices-daily-weekly.svg

README.md contains the approved prose and frontmatter with a title and description. It refers to the charts by their relative filenames. There is no datapackage merely to satisfy the publishing command: the absence of associated datapackage metadata is what gives this page its story layout.

For a dataset:

publish/example-dataset/
  README.md
  datapackage.json
  data/
    observations.csv

The root README matters: the public landing page resolves a Markdown Blob. Uploading only CSV plus datapackage does not itself establish a working root article. Include schema, source, license and other data documentation appropriate to the dataset.

DataPressr currently stores multiple stories and their outlines/build scripts in one shared site/stories/ directory. Do not publish that entire directory as one article. Package the selected approved story as README.md and copy its referenced public assets. Keep research notes, other drafts, dependency folders and build inputs out of the bundle. The existing CLI honors .datahubignore, not a general assumption that everything ignored by Git will be excluded.

For the oil story specifically, the source currently contains an outline link, a duplicate H1 relative to DataHub's header, friction notes and an outstanding voice pass. Resolve those in the local approved version, before publishing. Packaging should not silently rewrite prose or declare a draft approved. If the outline remains an intentional reader-facing link, link to its source or include it deliberately; do not ship a broken relative link.

Authenticate and publish

Use a team-supported build of the dh CLI. The source has a documented browser login and the commands below. I built it and checked --help; I did not log in or publish.

dh login

dh publish ./publish/oil-prices-story \
  --publication blog \
  --name oil-prices-story \
  --title "WTI Went Negative. Brent Didn't." \
  --description "What the daily Brent and WTI spot-price data shows about April 2020."

dh publish ./publish/example-dataset \
  --publication YOUR_PUBLICATION \
  --name example-dataset

These are usage examples, not a request to publish the current oil draft. YOUR_PUBLICATION must be replaced with the intended, authorized destination.

Use explicit title/description for stories today because the CLI does not read README frontmatter to fill those Post fields. It does read datapackage.json for a dataset's name/title/description. JSON is the least ambiguous package format for the present CLI; its inline YAML metadata handling differs from the Worker's parsing and needs reconciliation.

When using a user token, a newly created Post attributes that user automatically. --author USERNAME can add existing DataHub usernames and can be repeated. Confirm the actual public username instead of assuming a GitHub login or display name matches it. Frontmatter authors does not replace the PostAuthor byline mechanism. A shared token has no publishing user for automatic attribution.

Browser login still requires an existing DataHub account; new sign-ups are disabled. Saved credentials remove the need to export environment variables every time. Automation can use DATAHUB_API_URL, DATAHUB_API_TOKEN and DATAHUB_PUBLICATION; the token must be provisioned for the intended scope. The current permission gap should be fixed before additional automation credentials are distributed.

Installation itself deserves a short verified runbook: the repository is private, the inspected releases API showed v0.1.0 from June, and Homebrew automation is commented out in the release configuration. Do not assume every documented installation path supplies today's CLI. A current source build is go build -o dh . from cli/; a versioned team binary is preferable for routine use.

What to check after the command

Today, inspect the returned page, the article's appearance in its publication, metadata and authors, and every chart/download link. A 200 alone is insufficient: the MDX renderer can display a parsing error inside an otherwise successful page response. Allow for asynchronous Worker processing and cache expiry; no measured time-to-live guarantee is available.

The command does not promise:

  • Atomic visibility of all files or a rollback point.
  • Updated Post title/description on an existing slug: the create endpoint returns the existing record without applying those changes.
  • Advancement of Post modification time after direct file updates.
  • Removal of remote files deleted locally.
  • A completed render or completed metadata processing when it exits.
  • Automatic email distribution or a guaranteed appearance in Google.

Do not work around metadata problems by deleting and recreating the Post: that can lose identity, dates and associated history. Use the existing settings path for controlled corrections while the update contract is fixed.

Do not directly upload over an existing GitHub-backed Post without an explicit source-mode decision. The file endpoint writes to the main storage prefix, while the renderer follows the Post's configured branch; a later Git sync can also overwrite direct content. This is a guardrail the API should enforce, not a detail every author should memorize.

Optional GitHub workflow

For an already prepared repository folder, the CLI supports:

dh publish --github datahubio/blog \
  --branch main \
  --subdir YOUR_STORY_FOLDER \
  --publication blog \
  --name YOUR_STORY_SLUG

This needs a user CLI token and a connected GitHub account with access. Check that webhook installation succeeded before relying on future Git pushes. The API can accept the initial publication even if webhook installation fails. A content Git push alone is not evidence that DataHub changed.

Keep dh publish DIRECTORY --publication SLUG --name POST as the basic operation. An AI tool can invoke the CLI; a separate MCP server is not required to achieve this job. Direct HTTP integrations should use the same server behavior rather than reimplement catalog logic.

The following is the desired behavior, not existing flags or API endpoints:

  1. Read an explicit target and a manifest of the approved content. Validate the publication grant, names, paths, resource references and content format before changing live content.
  2. Upload files into a new revision, with hashes and an operation identity. Retry the same operation safely; do not create duplicate Posts.
  3. Validate the complete revision using the relevant metadata and rendering pipeline. Keep queue work associated with that revision so older events cannot replace newer metadata.
  4. Switch the active revision when ready, update resolved metadata, invalidate caches and make the Post visible consistently. Retain the previous revision for rollback.
  5. Return a stable URL, revision ID, final status and useful errors in machine-readable output. A caller can wait for readiness; interrupted callers can inspect the same operation later.

This finalization is technical validation of an already-approved artifact. It is not an editorial draft/review system.

For repeat publishing, preserve the Post ID, public URL and original publication date. Change the modified date when public content changes. Resolve title, description, authors, social image and editorial dates consistently for page header, listing and search metadata. Proposed precedence is explicit command input, then bundle metadata, then computed fallback; the implementation must specify how omitted fields preserve existing values and how explicit removals work.

Keep one active source mode per Post: direct bundle or GitHub sync. Mode conversion should be explicit and preserve URL/history. Git can remain the local audit trail for direct publishing without being the server's synchronization source.

Keep premium delivery separate from public bundle upload. An ordinary dh publish uploads public content; it is not a safe way to deploy a paid full dataset into the private premium bucket. A future premium publishing flow needs an explicit private-artifact operation and a checked association with the public sample and offer.

Sequenced work

Follow-up epic: datahub-next-cyz. These are scoped proposals; scheduling and staffing estimates have not been agreed.

First: establish the usable team path

datahub-next-cyz.1 — Publication permissions (P1). Centralize authorization for publication creation/access and every dataset/file mutation. Grant Rufus or a named automation identity the actual destinations it needs. Keep attribution separate from editing rights. Tests must prove that an unrelated valid token receives 403 before any storage/database mutation. Coordinate with content isolation #949 and credential handling #953.

Relevant files: app/api/v1/_auth.ts, all v1 publication/dataset routes, prisma/schema.prisma, CLI-token issuance/revocation. The current protected dashboard rules should be checked for consistency, not copied blindly.

datahub-next-cyz.2 — Repeatable metadata and source-mode rules (P1). Make a second publish update the existing Post consistently. Support Markdown-only stories, document the root README, validate authors and source modes, and align JSON/YAML handling. Preserve slug and publication date. This makes the simplest directory workflow dependable enough for a controlled trial.

Relevant files: cli/cmd/publish.go, direct dataset/file routes, lib/extract-post-metadata.ts, Post/Blob schema as needed, public Post metadata/header and publication listing. Coordinate story/dataset naming with existing datahub-next-b1o rather than blocking on a large taxonomy redesign.

datahub-next-cyz.4 — DataPressr adapter and teammate runbook (P1). Package one explicitly approved story and its assets, and use the supported CLI/auth workflow. Correct dh push guidance, the env-only assumption, and the assumption that stories require datapackage resources. Demonstrate a story to blog and a dataset to another permitted publication from an unrelated working directory.

DataPressr implementation touchpoints, for a subsequent authorized change: skills/push/SKILL.md, AGENTS.md, site/docs/cli.md, and a small bundling script if practical. Keep local editorial work intact. The script should select files from an explicit approved manifest rather than infer that every nearby file is publishable. This assessment changes none of those files.

A controlled initial pilot can expose remaining friction before the full revision mechanism ships. It must honestly report upload completion versus verified page readiness and must use approved content and properly granted credentials. That pilot is not evidence that unattended publishing is ready.

Then: make unattended repetition reliable

datahub-next-cyz.3 — Complete revisions and readiness (P1). Add manifest reconciliation, validation, finalization, idempotent retries, machine-readable status and rollback. Complete this before routine unattended publishing or large batch operations. Allow a failed upload or parser failure without breaking the prior live revision; explicitly handle delayed queue messages and files removed from the new manifest.

Relevant boundaries: v1 publishing routes, lib/content-store.ts, Post/Blob/revision persistence, Worker events and parsing, cache invalidation, cli/cmd/api.go, cli/cmd/publish.go, and the public renderer. This is the substantial engineering portion; it should not be confused with the smaller adapter/runbook task.

Verification should exercise a first publish, a correction, a removed asset, a broken MDX file, an interrupted upload, a repeat request and an older queued event arriving late. Include a story with SVGs and a dataset with README/metadata/CSV. A browser check must detect a rendered MDX error as a failure even when the HTTP status is 200.

In parallel: make the operating model legible

datahub-next-cyz.6 — Current architecture and operator docs (P2). Reconcile ARCHITECTURE.md, DEVELOP.md, DEPLOY.md, AGENTS.md, CLI guidance and relevant test instructions with deployed reality. Cover direct uploads, tokens, Purchases, Stripe routes, Worker processing, actual release branches and team onboarding. Verify Vercel/Worker configuration before declaring operational details confirmed.

The analysis already identifies stale claims; this task is the authoritative documentation update, not another open-ended architecture research exercise. Check the supported binary distribution and make “install, authenticate, publish, inspect result, correct a failure” repeatable for a new teammate.

Finally: validate the product benefit

datahub-next-cyz.5 — A measured 5–10-story pilot (P2). Select locally approved stories with useful dataset links, publish them, surface them deliberately, and report the reader outcomes. Give every story an appropriate next action. Related links should work both from story to data and, where useful, from dataset to story.

Reuse existing SEO/discovery work rather than file the same tasks again:

  • #916: social images; overlaps Bead datahub-next-r0k.
  • #917: canonical URLs.
  • #918: BlogPosting structured data.
  • #919: machine-readable publication/modification dates.
  • #920: author metadata.
  • #921: distinguishing stories and datasets in publication listings.
  • datahub-next-c8l: publication metadata.

Choose one canonical home for each story. If DataHub is the intended search/distribution destination, coordinate any full duplicate on DataPressr's Flowershow site; do not merely assume both copies strengthen DataHub's visibility. A source repository can remain the development history. Canonical signals are preferences for search engines, not indexing guarantees.

Use a small scorecard:

MeasureWhy it matters
Minutes from approved bundle to verified live URLTests Rufus's actual publishing job
Failed/retried publishes and manual interventionsTests automation reliability
Story-to-dataset click rateTests whether stories help readers reach data
Successful extraction, separated from bot/asset requestsTests useful consumption
Checkout-to-delivery completion and qualified requestsTests commercial value
Freshness and reproducibility of the referenced dataTests the trust promise

Start by recording a baseline. A proposed publishing target is a verified story in under five minutes after the bundle is approved and credentials are already configured; this excludes research, writing and first-time setup and is not a current performance claim. Set revenue/conversion targets after observing real volumes. The historical strategy numbers are not substitutes for current analytics.

Decisions this assessment makes, and facts still to verify

Recommended: reuse the existing CLI/API and renderer; direct directory publication is the default for Rufus; Git sync stays optional; local approval is sufficient; explicit target publications, consistent metadata and verified readiness define success. Keep a larger CMS, marketplace and hosted compute service out of this first project.

Before a production pilot, verify Rufus's existing account/byline, publication grants, a supported CLI build, and Worker readiness in a controlled test. For wider product decisions, obtain current analytics, paid-catalog coverage and delivery outcomes. No additional preference question is needed to finish this assessment; these are the concrete checks for its implementation.