theNewDynamic / gohugo-theme-ananke

Ananke: A theme for Hugo Sites
https://ananke-theme.netlify.app
MIT License
1.15k stars 1.16k forks source link

Comments #72

Closed RicardoDanielGonzalez closed 6 years ago

RicardoDanielGonzalez commented 6 years ago

Hi @budparr! First of all, many thanks for developing Ananke! I'm not a developer, just a pretty beginner with Hugo, and I was wondering if you are considering comments deployment in your theme. I've tried to figure out how reading Hugo's documentation, but I can't solve it. Thanks again! Best regards!

budparr commented 6 years ago

Hey, @RicardoDanielGonzalez That shouldn't be a problem. Thanks for the suggestion and I've added it to my list.

redapemusic35 commented 6 years ago

I love this theme. I have just started using this theme and I am really happy with the results of my webpage. I was wondering though if you have added the ability to add comments? I am a novice so please forgive me if you have already.

ghost commented 6 years ago

@redapemusic35 Afaik No, currently there is no option to add comments but you can embed disqus or any other system if you want. Staticman is another option, if you are unable to do it then ping me I'll guide you through this.

budparr commented 6 years ago

I'm thinking of using Staticman, though I'm not sure if there are too many moving parts to that to package as a theme. My problem with DISQUS is that there are privacy issues. Perhaps if I include some instructions on setting up DISQUS yourselves. It would not be hard, I don't think.

redapemusic35 commented 6 years ago

I am a novice but I might be able to make the change if someone can point me in the right direction.

ghost commented 6 years ago

@redapemusic35 Here you go, I have not worked with themes since months so I don't know if this will work. Go to layouts/_default/single.html and stay there.

Now open disqus account and follow their instructions, when they ask you to chose a cms (wordpress,etc..) . there chose universal code and copy it somewhere, now close that tab and back to theme folder.

<div class="nested-copy-line-height lh-copy f4 nested-links nested-img mid-gray">
        {{ .Content }}
</div>

Below

paste your code and look at the blog, everything looks good..? You might have a dirty but working comments system. Now go to layouts/partials/ and over there make a file called comment.html

Now remove the code from single.html and paste it on comment.html, we have to link comment.html to single.html

Goto single.html and paste this below {{{. Content}}

.

{{ partial "comment.html" . }} //Paste this

You will not have a tidy work, if the embed doesn't look good then you might want to style it.

budparr commented 6 years ago

Okay everyone, you can now add comments by adding your disqusShortname to your config file.

melroy89 commented 6 months ago

Just a heads up, this behavior is now changed with: https://github.com/theNewDynamic/gohugo-theme-ananke/commit/91df000ca82769a7578df81fa142d1a18e446bc0