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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disqus comments locate at a wrong position #2343

Closed
zjgcjy opened this issue Dec 12, 2019 · 5 comments
Closed

Disqus comments locate at a wrong position #2343

zjgcjy opened this issue Dec 12, 2019 · 5 comments

Comments

@zjgcjy
Copy link

zjgcjy commented Dec 12, 2019

First of all, that's a great theme of jekyll. I pretty like to share it with others. With the great help of the docs, I almost fix up all the problems. Nevertheless, when it comes to adding comments like Disqus, the position of comments is at the bottom of the page, which makes me confused.

Here is the image.

image

Well, as you can see from this link too.

I did not modify any source code of the theme, so when it happened, I just tried to solve the problem by reviewing what's go wrong with the configuration. But it didn't work as I am not familiar with html and scss. Please help me.

@iBug
Copy link
Collaborator

iBug commented Dec 12, 2019

Yours is a great website. But I'm afraid I can't be helpful before you provide the source repository of your website so that I could have a look at what might be wrong. If you're concerned about content that you don't want to publish, you can also try creating a minimal, reproducible example to aid the issue.

@zjgcjy
Copy link
Author

zjgcjy commented Dec 13, 2019

Yours is a great website. But I'm afraid I can't be helpful before you provide the source repository of your website so that I could have a look at what might be wrong. If you're concerned about content that you don't want to publish, you can also try creating a minimal, reproducible example to aid the issue.

Of course, here are two links, my site and blog source. However, all the posts here are private and I think it has nothing with the problem except all declared with permalink: /posts/:year-:month/:title.html and layout: single. I really appreciate your help.

@iBug
Copy link
Collaborator

iBug commented Dec 13, 2019

The problem looks like it's caused by that you didn't set the environment variable JEKYLL_ENV=production as required here, which led to the omission of the designated Disqus location. When Disqus didn't find the block element for it, it inserts itself at the end of the page, which finally created the strange look as you've reported.

It seems like you're building your website in your own environment instead of relying on GitHub Pages, so I would suggest that you set the desired environment variable when running Jekyll:

JEKYLL_ENV=production bundle exec jekyll build

@zjgcjy
Copy link
Author

zjgcjy commented Dec 13, 2019

The problem looks like it's caused by that you didn't set the environment variable JEKYLL_ENV=production as required here, which led to the omission of the designated Disqus location. When Disqus didn't find the block element for it, it inserts itself at the end of the page, which finally created the strange look as you've reported.

It seems like you're building your website in your own environment instead of relying on GitHub Pages, so I would suggest that you set the desired environment variable when running Jekyll:

JEKYLL_ENV=production bundle exec jekyll build

Nice! It works, thanks a lot.

Well, I run the Jekyll before like jekyll build JEKYLL_ENV=production maybe it didn't work. As I am not familiar with jekyll, i didn't know what's going wrong.

@zjgcjy zjgcjy closed this as completed Dec 13, 2019
@iBug
Copy link
Collaborator

iBug commented Dec 13, 2019

Well, I run the Jekyll before like jekyll build JEKYLL_ENV=production maybe it didn't work. As I am not familiar with jekyll, i didn't know what's going wrong.

Not really specific to Jekyll, but shell syntax regulates that environment variables specific to a single command should be specified at the beginning of a line, not in the middle or at the end.

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

No branches or pull requests

3 participants