Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ordering of fields in typst.toml (discussion would be useful) #6

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

SillyFreak
Copy link
Collaborator

The current typst.toml is missing some optional fields and IMO also orders them in a strange way (for example, there are four keys between keywords and categories, which are both about discoverability of packages via tag-like classifications). This PR changes the order to reflect what's described in typst/packages. It also links that page in the file for reference.

Although the order in the packages repo is a minimally opinionated default, I could also imagine some tweaks. Personally, I have the following comments:

  • note that the first three are absolutely required and the first six are required for Universe, so that biases the ordering in the packages repo a bit: if you use the less-required fields, maybe you'd consider them more fitting at an earlier place.
  • I'd put description earlier, somewhere between name and license
  • I'd put compiler directly after entrypoint
  • homepage is relatively rare, so I could imagine commenting it out by default
  • I like exclude being last, it feels the least informative to a reader
  • the [template] could be removed, but the example contains useful defaults so I think it's worth keeping
  • [tool.mytool] could be removed or replaced by [tool.typst-test] - then it's a useful default and an example at the same time

@SillyFreak SillyFreak marked this pull request as ready for review June 1, 2024 22:42
@SillyFreak SillyFreak force-pushed the typst-toml-reordering branch from 515de0c to 197b645 Compare June 2, 2024 10:37
@SillyFreak SillyFreak force-pushed the typst-toml-reordering branch from 197b645 to 75b3e55 Compare June 2, 2024 10:39
@jamesrswift jamesrswift merged commit 0f03401 into typst-community:main Jun 2, 2024
1 check passed
@SillyFreak SillyFreak deleted the typst-toml-reordering branch June 2, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants