Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making disqus installation more robust #569

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nestorlafon
Copy link

Hello

With this PR I'm trying to make Disqus work independently if of your domain URL, in case you don't know it or have to change it.

I had some problems getting Disqus to work on my new site. After some trial error, I found that the problem was that this.page.url was not an absolute_url as Disqus needs (https://help.disqus.com/en/articles/1717084-javascript-configuration-variables).

Adding url:<you prod base URL> to the Jekyll configuration (_config.yml) solved the problem without changing the code, but, as for me, some people might want not to set it.

Also, in the Disqus documentation, they recommend using a this.page.identifier that doesn't change if the domain change, to retain the comments in that case. I changed that to be the relative URL (page.url). I was tempted to use page.id but non-post pages don't have one and the page.id is page.url without the file extension

There is an open PR #536 that could be closed with this one and that shows figuring out the Disqus error is not trivial for normal users.

I'm neither a JS nor Jekyll expert. Any comment or ideas making this code better are welcome! 馃槂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant