I want to link to different posts from within a twig file. I expected I could do something like <a href="{{site.post.id(100)}}"> but could not find any reference for this.
Right now, the only way to do it is using {{function('get_permalink',100) }}.
Is that best practice? What do you suggest me to do?
Try....
<a href="{{ TimberPost(100).link }}">
... TimberPost( 100 ) will retrieve a TimberPost object of ID 100 and then you can access the standard properties/methods on it
Most helpful comment
Try....
<a href="{{ TimberPost(100).link }}">...
TimberPost( 100 )will retrieve aTimberPostobject of ID100and then you can access the standard properties/methods on it