Sign in

unique mailto link per post

  • This topic has 2 replies, 3 voices, and was last updated 5 days, 16 hours ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8753
    Avatar photoPresGas

    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 photopublii-slpa

    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 photocandidexmedia

    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?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.