Typlog themes are powered by Jinja template language. And there is a command line tool
serve-theme to help you developing Typlog themes.
Jinja is a template language, if you are not familiar with Jinja, you can learn the syntax from the Template Designer Documentation.
You can also learn from one of your built-in theme source code:
To develop your own theme, you need to grab an API token at first. You can create one in your account system. Click Tokens → New token to create one.
NOTE: please select the
theme scope before saving.
serve-theme is a command line tool which creates a localhost server to help developers designing the theme.
Get the executable binary file from GitHub Releases, download the one matching your
OS system and rename it to
serve-theme. You can move the
serve-theme file to one of your bin PATH.
cd into the theme folder that you are going to develop and start the dev server with
$ export TOKEN=pt_xxxx # this token is created in preparation$ export SITE=123 # find your site ID in Typlog$ serve-theme # assume serve-theme is in PATH2021/09/21 20:54:44 Listening . on port 7000
Now, you can visit
http://localhost:7000/ to browser the theme you are designing.