Zenithar / hugo-theme-bleak

Bleak Ghost theme ported to Hugo
Other
151 stars 65 forks source link

Update comments.html #13

Closed asifm closed 7 years ago

asifm commented 7 years ago

As it's currently implemented in the theme, disqus doesn't work with the recent versions of Hugo. We need to use the built-in disqus template that Hugo now has.

Zenithar commented 7 years ago

Sorry I could not accept this PR because it's not only a template problem, due to Ajax loading Disqus is quite difficult to configure, especially when CSP headers are enabled. I'm currently working on it.

asifm commented 7 years ago

No problem. But I don't understand why you need to configure Disqus. It's all taken care of by Hugo. See here: https://gohugo.io/extras/comments/ I've tested and it worked with only these two steps.

I'm new to all this — so maybe I'm misunderstanding something.

Zenithar commented 7 years ago

I fact Disqus "auto" settings is based on the fact that the page is fully loaded, but with this theme, the page is fully loaded once, and content is injected when you click on links. Everything is done with History.js and jQuery for preloading and transitions.

Zenithar commented 7 years ago

I'm also trying to enable Content Security Policy Headers on my server, but it restricts dynamic script evaluation needed by the theme. So I have to find another solution. If you don't have CSP strict headers you could use this theme as-is. But if you enable CSP headers, you will start to have trouve with Disqus because they are not CSP compliant. If you go to my blog, you could see in the console some errors (I'm trying to fix them).

asifm commented 7 years ago

I'm confused why you need to do anything for Disqus. I just wanted to let you know that Disqus works fine for me if I disable your code in comments.html and do what's suggested here. But don't worry about me. Maybe I'm not understanding what you're trying to do.

(Bon, excellent travail sur ce thème. Très propre, élégant et lisible. J'aime aussi les transitions. Merci pour tout.)

Zenithar commented 7 years ago

Merci, le thème n'est pas de moi, je l'ai juste porté de Ghost à Hugo.

asifm commented 7 years ago

Merci pour votre travail tout de même. Ce n’était pas simple.

Is the code now stable? Do you have plans to implement or change anything in the near future?

Zenithar commented 7 years ago

No ATM. I just implement things when I need it ^^

Last one : image blur loader like Medium.