Use https://github.com/lektor/lektor-disqus-comments/blob/master/lektor_disqus_comments.py as example https://lunrjs.com/