#Contribute Template to universe

22 messages · Page 1 of 1 (latest)

bronze glade
#

I have created a Thesis Template and want to put it on the typst universe, for others to use. So far I know I will need to create a github repo and put my actual template file into the src/lib.typ according to the package-template. After that it gets somewhat unclear for me. What is supposed to go into the scripts and docs directorys and what do the justfile and the typst.toml files do?

Any help would be greatly appreciated

tardy jewel
#

justfile and scripts contain files for just which is a more modern make-like build tool and just makes it easier for you to bundle/test/locally install your package https://just.systems/

#

and in docs you put documentation about your package though that isnt really needed for a template

wanton shore
#

Maybe this post is helpful for how to use the template: https://jamesxx.github.io/blog/2024/07/09/packages.html

bronze glade
#

Thanks for the answers... hopefully I now manage to do it.

floral bramble
#

hey @bronze glade I'm also trying to submit a template to universe. How far have you gotten? personally im having a really hard time rn

bronze glade
#

Not far… Just cloned the repo and haven’t worked on it since then. What about you @floral bramble

floral bramble
#

I was trying to do it manually, and I got stuck trying to make a symlink from the forked package repo to the local package directory

#

it kept telling me that acess was denied

#

even though i was in admin

bronze glade
#

Weird. Do you know if something in the justfiles or the github actions has to be changed?

floral bramble
#

I have a solution @bronze glade! I didn't end up using the template package.

I put my package in %AppData%\typst\packages\local and then ran the command typst init @local/{package}:0.1.0 in the command prompt

#

this means that you need to change between @preview and @local for testing, but it actually lets you test if the package is loading correctly

#

im happy to hop on a call if you need help

bronze glade
#

What files need to be in the package and have been put in %AppData%\typst\packages\local if you are not useing the template?

floral bramble
#

You need the .toml is the most important. I have under src everything that the template needs, and under template is just the file that a user will start with when they use your template.

I would recommend looking at the files on the package repo to see what others did. Thats how I figured it out

#

I need to also add a changelog

bronze glade
#

Thank you very much. Thats very much I was going about it aswell. But still trying to figure out some minor things...

floral bramble
#

of course, I was so close to getting lost in the sauce

#

oh also, don't forget to put that all under a version number folder like 0.1.0

bronze glade
#

@floral bramble I also managed to do it, but I used the justfile. It basically does all that for you.