What is the best workflow for publishing templates from Typst web to Universe?

Hi all,

Long-time LaTeX user here. Switched to Typst after a particularly long paper took forever to render in Overleaf. I recently made a doctoral dissertation template for personal use on Typst web, and it worked well enough that I decided to publish it on Universe (currently under review).

I didn’t find a way to publish template directly using the typst web app and the workflow (fork preview → add package → submit PR) was more painful than expected:

1. Workflow friction: Every change requires: edit on Typst web → export/download → push to GitHub fork. I know VScode has a plugin (tinymist?) that supports typst but i want to stay in typst web as much as possible for all typst editing. Is there a way to publish directly from Typst web to Universe? I can package it ‘locally’ on Typst web but couldn’t find instructions for the next steps.

2. Import path changes: Converting from #import "../config.typ": * to @preview/package-name:version seems like something that could be automated or at least flagged in Typst web before pushing to the preview repo. Would save reviewers time and help first-timers like me catch this earlier.

Overall: A “template publishing guide” in the docs would be super helpful. Spent way too long figuring out the right way to structure things and clean up my template. A checklist of common issues would go a long way.

Am I missing something obvious, or is this just the current process?

Hi, @Piyush_Amitabh.
This is just the current process and there is no way to publish a package directly from the web app to Typst Universe. Typst team has the same problem as anyone, there are an unlimited amount of things that could be improved, but only limited resources. The current system was probably the most efficient to implement.

The Typst team is aware of it, quote from How to update packages on universe? - #4 by laurmaedje :

There are some community tools to help with the submission from your local machine, typship has a publish command and utpm has also an (currenlty unreleased) implementation for it.

Regarding the documentation, there is some available in the package repo.

Thanks for the context. I get the resource constraints, but two small changes would make a huge difference without requiring a redesign:

Change 1: Folder-specific repo loading
Let me load just preview/xyz/0.0.1 from my forked preview repo instead of forcing me to import the entire thing. The GitHub sync already exists for Pro users, just needs to work on a subfolder. Right now importing the whole preview repo makes no sense since it’s got every package in there.

Change 2: Auto-convert import paths
When packaging/exporting, automatically swap local imports (../config.typ) to package format (@preview/xyz:0.0.1). This is straightforward pattern matching that would save crucial time in manual review and cleanup. At the very least the the failed CI check can give this suggestion in its error message.

Why this matters:
Templates drive adoption. LaTeX has tons of high-quality templates. People are more likely to choose a typesetting software based on whether a good template exists for their use case. The current workflow (download, hunt for import issues, multi-step push) actively discourages the exact people who should be contributing. The idea of typst universe is great, making it easier to contribute templates means growing the ecosystem faster; which means more users pick up Typst instead of sticking with LaTeX.

Being a member of the Julia community, I find that the submission process quite efficient. It is Github-centric and it relies on a registration bot. It coulb be a way to explore for Typst.

1 Like