Templates

You can customise how toots and user profiles are displayed with a Go text/template.

You'll have to place a file named toot.tmpl and/or user.tmpl in XDG_CONFIG_HOME/tut/ which usually equals to ~/.config/tut/.

You can copy toot.tmpl and user.tmpl from the repo manually or with curl or wget.

cd ~/.config/tut

# using curl
curl -o toot.tmpl https://raw.githubusercontent.com/RasmusLindroth/tut/master/toot.tmpl

curl -o user.tmpl https://raw.githubusercontent.com/RasmusLindroth/tut/master/user.tmpl

# using wget
wget https://raw.githubusercontent.com/RasmusLindroth/tut/master/toot.tmpl

wget https://raw.githubusercontent.com/RasmusLindroth/tut/master/user.tmpl

The data available for you in toot.tmpl is two structs. The first one is the Toot-struct, you can see all fields in ./feed.go.

The second one is the StyleConfig-struct. You can find the fields in ./config.go.

You acces them with .Toot and .Style in your template file.

The data available in user.tmpl is almost the same. You still have the StyleConfig but instead of Toot you have a struct named User. You can see all fields in ./feed.go.

-- Templates --