Confused over templates, trying to reformat date outside provided options

I've just install Joplin for Desktop version 1.2.6 onto Ubuntu 20.04

Under the Edit dropdown you can select [Insert Date Time] great! But I don't like the format of the date.

I see you can edit the format in Edit > Options > Date format. But I don't want these formats either.

I understand you can add templates I've Googled around and visited many different forum posts, as well as reading but I still don't get it.

I saved a text file ( into the template folder /home/jane/snap/joplin-james-carroll/28/Templates/

The file contains:

Date: {{date}}

But when I go to File > Templates > Create Note from template it's empty. Refreshing templates doesn't help. I'm so confused. Is anyone able to explain how to use templates to me assuming (correctly) that I'm an idiot?

The format I'm looking for is Saturday 10th October 2020, 23:51


It's probably not your fault, if the refresh is failing that means you'll probably have to restart the application. Once you restart the application the templates should load correctly.

Although I do see that your template directory is wrong
it should be

is /home/jane/snap/joplin-james-carroll/28/Templates/ the folder that opens when you use File->Templates->Open template directory? If so that might mean that something is going wrong with the snap packaging.

As you might be able to guess from the folder name, the joplin snap package is unofficially packaged and released by someone else. I don't know if that person is on this forum, but you might need to make them aware of this issue as well.

And in terms of customizing the date time. @dpoulton wrote a really nice response on the forum detailing the customization. You can find it at the below link

Yes,That's the file I'm seeing. I guess that an uninstall re-install situation?

Yes, I had seen this. I just wasn't sure what to do with it

First try moving your templates to /home/jane/.config/joplin-desktop/templates/ and restart the joplin application. If that doesn't work then you should probably uninstall joplin, and reinstall it using the recommended method.

To get your formatting the template file you posted above should be

Date: {{#custom_datetime}}dddd Do MMMM YYYY, H:mm{{/custom_datetime}}

Ok, I've reinstalled Joplin and can now get that working.

Is there a way I can use this date format for Edit > Insert Date Time? Or an easier method of running the template? It's currently not efficient

Is there a way I can use this date format for Edit > Insert Date Time?

No, templates are a separate feature.

You can easily use Ctrl+Alt+i to insert a template at your current cursor position. It's not quite as smooth, but it should be sufficient.

I can't have a Templates Dropdown or Sidebar?

Or add a template specific shortcut?

The next version of Joplin will have support for plugins so I'm sure you would be able to add those behaviours at you discretion. However right now Joplin does not support those things. Pressing Ctrl+Alt+i will present you with a template dropdown which you can use to select any template you want.

To be honest, the Joplin templating situation could use some work, it's a bit underpowered. Hopefully once the plugin system is available we'll see it get some love.

That sounds promising. Is there an expected date?

It should be noted that the Linux desktop has a dedicated templates folder: $HOME/Templates ... Maybe that should be the correct home for them?

I'm a tad late to responding here but unfortunately this didn't get picked up on my "check how the snap is doing" rounds.

Snaps change the $HOME variable exposed to the apps they run. They're essentially hardcoded to /home/$USER/snap/$SNAP_PACKAGE_NAME/current/ (Where current is a symlink to the internal revision, so 28 in the posts above). There's ongoing work to make this less hardcoded in the future. Regardless, that means that $HOME right now in the snap would actually be $HOME/snap/joplin-james-carroll/current/

Since Joplin writes everything relative to $HOME, the template directory from the perspective of the normal shell would end up being $HOME/snap/joplin-james-carroll/current/.config/joplin-desktop/templates/

Aside from being in the different location, I'd expect it to work in the exact same manner as the official appimage would. The Templates folder at /home/jane/snap/joplin-james-carroll/28/Templates/ is just automatically generated by something else and isn't used at all for the Snap, being symonious with the normal $HOME/templates folder used by various DE's instead.

Tl;Dr $HOME is different from the snaps perspective but everything should work the same relative to it including templates.

1 Like