There are a few variables in
pelicanconf.py involved in this problem, there are a few that break your app in other ways. I'm gonna concentrate on those directly involved and traps you might get caught up with.
- This Disqus comment feature can not be previewed locally, I will explain it later.
- Just in case, set
SITEURLto your domain name in the form of
publishconf.py. Generate your site using
publishconf.pyif you want to view it remotely.
DISQUS_SITENAME= <YOUR_DOMAIN>. It can be any string you like.
Registration at Disqus
- Follow disqus_static plugin installation, the html text under usage is not relevant in most of the themes. Of course I can't test them all. When register the application at Disqus, there are many blanks you need to fill in. Fill in <YOUR_DOMAIN> when possible, in case some blank is used to match DISQUS_SITENAME.
- Do not move
pelicaninstallation directory. Instead, specify the
PLUGIN_PATHSas pelican docs suggests.
- There is another registration process you need to go through. I don't remember where is the entrance, but the first step is for you to choose whether you want to comment as a user or install Disqus comment feature to your site. After the registration
<YOUR_DOMAIN>.disqus.com/admin/settingsshould be accessible. Click
site -> advancedon the left. Add
SITEURLto Trusted Domains.
127.0.0.1can't be added. That's why this feature can't be previewed locally.
- At some step of the above registration process, you will be asked for the blogging system you tend to apply Disqus to. Pelican is not on the list and you will be directed to some universal embedded code. Pelican doesn't need those code to work with Disqus. You can safely ignore it.
If Things Mesh
- If you set
DISQUS_SITENAMEand it matches the corresponding setting on Disqus.com, for some themes like
commenthyperlinks should be visible under each article on the index page. This part is independent of the next part.
- When the comment section is not loaded on an article page, for some themes it's hard to tell if your plugin is not loaded correctly or it's communication failure between your site and Disqus. Those themes fail silently. Some other themes will show error message "We were unable to load Disqus" and give a trouble shooting link. That means the plugin is loaded correctly. For themes that fail silently you can comment out
PLUGINSto see if things are different in any ways. Themes like Flex are integrated with Disqus plugin so that's trouble saving.