Skip to content

inv-cmarker:0.1.0#5150

Open
ck3d wants to merge 1 commit into
typst:mainfrom
ck3d:typst2commonmark010
Open

inv-cmarker:0.1.0#5150
ck3d wants to merge 1 commit into
typst:mainfrom
ck3d:typst2commonmark010

Conversation

@ck3d

@ck3d ck3d commented Jun 23, 2026

Copy link
Copy Markdown

I am submitting

  • a new package
  • an update for a package

Description: to-commonmark converts Typst content to CommonMark strings, written entirely in Typst script with no external tooling required. It provides a single to-commonmark(content) -> str function that performs a recursive walk over Typst's content tree, supporting headings, paragraphs, lists (unordered and ordered), block quotes, code blocks (with language info strings), inline code, strong/emphasis, links, images, and line breaks. Unsupported elements (tables, math, figures, footnotes) emit HTML drop comments rather than failing silently.

This is useful for:

  • Exporting Typst-generated documentation to Markdown for publishing on GitHub, Wikis, or static site generators
  • Building documentation pipelines that originate in Typst but need to be consumed in Markdown-only environments
  • Content migration from Typst to Markdown-based systems

The package is written in pure Typst script with zero dependencies, making it portable and easy to integrate.

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
    • Explanation: The canonical name would be typst-to-commonmark. We use 2 as a shorthand convention common in package ecosystems (similar to json2yaml, png2svg, csv2json), making it a stylistic neologism rather than the most obvious English phrasing.
  • 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

@ck3d ck3d temporarily deployed to Package Check June 23, 2026 20:21 — with GitHub Actions Inactive
@typst-package-check typst-package-check Bot added the new A new package submission. label Jun 23, 2026
@saecki saecki self-assigned this Jun 25, 2026
@ck3d ck3d force-pushed the typst2commonmark010 branch from b6c6aed to bf48b34 Compare June 26, 2026 16:31
@ck3d ck3d temporarily deployed to Package Check June 26, 2026 16:31 — with GitHub Actions Inactive
@typst-package-check typst-package-check Bot changed the title typst2commonmark:0.1.0 to-commonmark:0.1.0 Jun 26, 2026
@ck3d ck3d force-pushed the typst2commonmark010 branch from bf48b34 to 709b289 Compare June 26, 2026 16:34
@ck3d ck3d temporarily deployed to Package Check June 26, 2026 16:34 — with GitHub Actions Inactive
@ck3d ck3d force-pushed the typst2commonmark010 branch from 709b289 to 2fad1ef Compare June 27, 2026 07:08
@ck3d ck3d temporarily deployed to Package Check June 27, 2026 07:08 — with GitHub Actions Inactive

@saecki saecki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this package!

@@ -0,0 +1,10 @@
[package]
name = "to-commonmark"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This name and the initially submitted name are not ideal. The original shouldn't really have to contain the word Typst and this one is a little too descriptive. We try to avoid canonical names so multiple packages serving the same purpose can coexist without one having an unfair advantage. Could you change the name to something else, for example by adding a non-descriptive prefix or suffix, or ideally by coming up with something a little more creative? See our naming rules

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for your feedback. My new proposal is inv-cmarker.

entrypoint = "lib.typ"
authors = ["Christian Kögler"]
license = "MIT"
description = "Convert content to CommonMark strings."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see you've changed the description, probably because of the warning. But because this is a somewhat of a meta usecase, I would say it's ok to specifically say Typst content, which makes things a bit clearer.
See: https://github.com/typst/packages/blob/main/docs/manifest.md#writing-a-good-description

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The typst-package-check fails, when I add Typst to description.

@ck3d ck3d force-pushed the typst2commonmark010 branch from 2fad1ef to 2daa0b8 Compare June 29, 2026 19:01
@ck3d ck3d temporarily deployed to Package Check June 29, 2026 19:01 — with GitHub Actions Inactive
@typst-package-check typst-package-check Bot changed the title to-commonmark:0.1.0 inv-cmarker:0.1.0 Jun 29, 2026
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