Show link to the repository in package list
Raphael-CV opened this issue · comments
I suggest two improvements for the package manager:
-
Add the repository link of each package in its readme file and/or in the searchable list of packages. Currently, you need to go to the
typst.toml
file and copy-paste the link into navigator, which is annoying when you want to see the full documentation and examples. Add also the link in the pull request would be great to navigate easily to the repo in order to discover it instead of going tofiles changed
and look fortypst.toml
file. -
Add a command to install package from an already downloaded zip. Automatic downloads can be blocked at work for security reasons (which is the case for me). I also reckon that add a link to download directly zip in the searchable list of packages might be a good idea. For the moment, if I want to download several packages, I have to go to each repo, check out the branch or tag to have the right version, donwload zip, copy-paste to the
preview
directory and then change the name with version to respect the tree structure.
For the moment, if I want to download several packages, I have to go to each repo, check out the branch or tag to have the right version, donwload zip, copy-paste to the preview directory and then change the name with version to respect the tree structure.
You could also just clone this repository into {cache-dir}/typst
. Then all packages will just be available. To update it, just git pull
. Then, the CLI will do no downloading at all.
Great idea, it seems better indeed, thanks !
Repository link in the package list would be useful. A homepage field was also suggested here: #67 (comment). We could show homepage or repository if homepage doesn't exist.
For the moment, if I want to download several packages, I have to go to each repo, check out the branch or tag to have the right version, donwload zip, copy-paste to the preview directory and then change the name with version to respect the tree structure.
You could also just clone this repository into
{cache-dir}/typst
. Then all packages will just be available. To update it, justgit pull
. Then, the CLI will do no downloading at all.
Since the structure has to be {data-dir}/typst/packages/preview/...
, it is necessary to specifiy the directory name:
- From
{data-dir}
:git clone git@github.com:typst/packages.git typst
- From
{data-dir}/typst
:git clone git@github.com:typst/packages.git .
Doing git clone git@github.com:typst/packages.git
from {data-dir}/typst
would result to {data-dir}/typst/packages/packages/preview/...
.
Ah yes, you're right. The duplication is somewhat unfortunate.
I added a link to the repository
and, in addition, a new homepage
field. If this one, is specified, the link goes there, otherwise to the repository and if neither field exist, it is omitted.