hugo-toha / toha

A Hugo theme for personal portfolio
https://hugo-toha.github.io
MIT License
1.03k stars 591 forks source link

bug #741

Closed roumail closed 1 year ago

roumail commented 1 year ago

Expected Behavior

Followed the documents for adding comments and tried disqus, utteranc and giscus to no avail.

Current Behavior

No comments section added

Possible Solution

I was first trying with giscus and when it didn't work with the others as well, I thought this is likely a bug.

Steps to Reproduce

  1. update config.yaml, uncommenting the relevant sections
  2. follow installation steps from guide
  3. load locally

Screenshots

image

Browsers Affected

hossainemruz commented 1 year ago

Can you please share your repo. The configuration format has changed from the documentation.

roumail commented 1 year ago

https://github.com/roumail/roumail.github.io

hossainemruz commented 1 year ago

You are using old configuration format. Please, check this new format: https://github.com/hugo-toha/hugo-toha.github.io/blob/dd88f0fb7af186f83ece20c507deac61ac324c5c/config.yaml#L116

roumail commented 1 year ago

Yes, indeed it works now, What about the section. Is this part of the new or old config?

module:
  imports:
  - path: github.com/hugo-toha/toha/v4
  mounts:
  - source: ./node_modules/flag-icon-css/flags
    target: static/flags
  - source: ./node_modules/@fontsource/mulish/files
    target: static/files
  - source: ./node_modules/katex/dist/fonts
    target: static/fonts
hossainemruz commented 1 year ago

This part is for new config

roumail commented 1 year ago

I’m sorry, I meant to say, do I need to add this to my config too? I get an error when I add
••• module:

hossainemruz commented 1 year ago

Yes. You have to add it. What error are you getting?

roumail commented 1 year ago

Hi @hossainemruz, Thanks for your reply. I'm currently building the website locally and when I uncomment this block of code, I get the following error:

Failed to reload config: module "github.com/hugo-toha/toha/v4" not found; either add it as a Hugo Module or store it in "/Users/rohailtaimour/home/2_AREAS/WEBSITE/roumail.github.io/themes".: module does not exist 

image

roumail commented 1 year ago

Hi, any suggestions on what I ought to do?

hossainemruz commented 1 year ago

Hi @roumail you have removed the module files go.mod and go.sum from your repo. They are used for handling hugo modules. Please, initialize it with

hugo mod init github.com/roumail/roumail.github.io
hugo mod tidy

Then, run

hugo mod npm pack
npm install

Also, remove theme: "toha" line from your config.yaml file. After that you should be able to run the website again.

roumail commented 1 year ago

Hi @hossainemruz , thanks for your tips! Clearly I'm a novice hacking my way through to get a website up and running.. all thanks to your tips! I have a running website now and understand a bit better how to handle the latest config. I still have a few questions, that I might post here in this chat but feel free to tell me to open another issue if you want to close this thread.

Thanks again!!

hossainemruz commented 1 year ago

Sure. Please, close this issue and open a discussion with your query.