You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation for local packages is misleading WRT custom paths #5936
Currently, packages are said to live in {data-dir}/typst/packages/{namespace}/{name}/{version}. So if --package-path or TYPST_PACKAGE_PATH is given to the CLI, one might expect to have to create /typst/packages/ within to match this pattern. That is not the case; in the default package path (which typst-kit calls the "standard system package data directory"), /typst/packages is joined to {data-dir} presumably only to differentiate itself from other software.
To be a resource for all users, that distinction could be made clearer. I.e. with the path spec being changed to accommodate an arbitrary FsPackages root: {package-path}/{namespace}/{name}/{version}, and a more detailed explanation of the default given afterward:
- Here, `{data-dir}` is+ The default `{package-path}` is `typst/packages` within the system's application data directory
The example below suggesting "local" as a namespace may then also use {package-path}, and the sentence below that explaining precedence I'm honestly not sure how to fix in a neat way, maybe with "local package directory"? 😅
I'm also opening an issue instead of a PR because I'm unsure weather for what I called {package-path}, we should follow the convention of "dir" used in other parts of the README or "path" used in the CLI. Though typst compile --help does say --package-path is of type <DIR>, this is probably harder to find and associate. #4588 previously suggested deciding on one term to use throughout, but as far as I can tell, this hasn't happened yet.
I'm also not super set on the rest of the wording, which is getting quite convoluted. Though I've tried contributing my suggested fix with the clearest & least fluffy wording I could come up with, I'd be happy to discuss other ideas or make way for a larger rewrite of the section of course! :)
Activity