Skip to content

manifesto:0.1.0#3936

Open
l0uisgrange wants to merge 6 commits intotypst:mainfrom
l0uisgrange:main
Open

manifesto:0.1.0#3936
l0uisgrange wants to merge 6 commits intotypst:mainfrom
l0uisgrange:main

Conversation

@l0uisgrange
Copy link
Contributor

I am submitting

  • a new package
  • an update for a package

Description: This package is the first HTML template for Typst, written 100% in Typst using native HTML export. It works the same as a PDF template, but produces a stunning, HTML website ready for online package documentations, tutorials, etc...

I have read and followed the submission guidelines and, in particular, I

  • selected a name that isn't the most obvious or canonical name for what the package does
  • added a typst.toml file with all required keys
  • added a README.md with documentation for my package
  • have chosen a license and added a LICENSE file or linked one in my README.md
  • tested my package locally on my system and it worked
  • excluded PDFs or README images, if any, but not the LICENSE
  • ensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.

@typst-package-check typst-package-check bot added the new A new package submission. label Jan 22, 2026
@l0uisgrange
Copy link
Contributor Author

l0uisgrange commented Jan 22, 2026

Hey there, since this template is the first for HTML (instead of PDF), what is the way to publish it? Did I do it correctly?
I'm very sorry for the inconvenience 😅, I already have 2 packages but this is my first template.

Also, the checks do not seem to pass because of html missing (available since Typst 0.13 at least, but behind a flag) ... is my project not suitable for GitHub Universe because needs users need a flag? 🥲

@elegaanz elegaanz self-assigned this Jan 26, 2026
```typst
#import "@preview/manifesto:0.1.0"

#show: it => template(it, title: "MyAwesomePackage", toml: "PATH_TO/typst.toml")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test but I think template is not in scope with the current import, it would be manifesto.template.


You are free to check either [this example](https://bone.grangelouis.ch) from `bone` or [this one](https://zap.grangelouis.ch) from `zap`.

<img width="1232" height="758" alt="Capture d’écran 2026-01-22 à 18 39 15" src="https://github.com/user-attachments/assets/076e3071-6feb-4453-8b44-e5de1a32ec53" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you write an actual alternative text please?

license = "MIT"

[template]
path = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your template should be in its own subdirectory. Only files in that directory will be copied to the user project. The "library" part of your package should contain utility and templating functions you don't expect the user to modify, while the template files should contain some default content.

[package]
name = "manifesto"
version = "0.1.0"
compiler = "0.14.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This corresponds to the lowest version number this package works with, so unless you depend on a fix that was introduced in 0.14.2, it should probably be 0.14.0 or even lower.

#let license = if toml != none { detoml(toml).package.at("license", default: none) } else { license }
#let repository = if toml != none { detoml(toml).package.at("repository", default: none) } else { repository }
#let description = if toml != none { detoml(toml).package.at("description", default: none) } else { description }
#html.elem("html", attrs: (lang: "en", class: "scroll-smooth"))[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using the untyped html.elem API you can support Typst 0.13, but if you want to only support 0.14 you could use the typed HTML API.

@@ -0,0 +1,30 @@
#let qa-icon = html.elem(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to provide some fallback when compiling to PDF, even if the template is supposed to be HTML-only. PDF export is still the default and it would be a bad experience to get a non-working template by default. Simply displaying a non-editable page that says "This template is HTML-only" (with a bit of styling if you feel like it) would be enough. You would also have to take care of not using html at the top-level like you are doing here, but to always wrap it behind a conditional or a function that is lazily evaluated.

If what I'm saying is not clear I can try to give a more explicit example, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new A new package submission.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants