Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

unique mailto link per post

  • #8753
    Avatar photo[anonymous]

    Hello! I am really interested in Publii and about ready to go with it for my first blog. However, I am looking for a way to generate a per post email address as a way to comment.

    So, for example a post on today’s date could have a mailto for `blogname+20221118@email.domain.com`. Looking to use the +string to help filter and file emails as comments.

    Where would that go in the CMS? I would think it would go in a footer perhaps, but not sure if there is a templated area for it.

    #8759
    Avatar photo[anonymous]

    If you are a coder, this would be simple to do.

    Skills requires, HTML, Handlebars and JavaScript. Each are simple to master though would be frustrating at first if you are not familiar.

    Otherwise, this is not something that Publii does not do natively. If you are willing to enter these manually, you can click the create link icon in the editor and then click custom link. Then you would enter mailto://blogname+20221118@email.domain.com (example) and click save. You can place this link in your content only. For this to appear anywhere else, you would have to write code.

    Cheers!!

    #8869
    Avatar photo[anonymous]

    If you wanted to be a part of the post template, you’ll want to edit the post.hbs., or the partial file (if you’re using a partial).

    The variable you’re looking for is likely the {{createdAt}} tag. So the link you type in your handlebars file would be blogname+{{createdAt}}@email.domain.com.

    I’m curious: is there a particular reason why you’re using a per post email rather than a comment system plugin?