zzossig / hugo-theme-zzo

Make a blog with hugo zzo theme!
https://themes.gohugo.io//theme/hugo-theme-zzo/en/
MIT License
737 stars 257 forks source link

Search not working on custom domain #456

Open bytadit opened 2 years ago

bytadit commented 2 years ago

Hello, thank you for making this great theme But, I've problem with my website (https://bytadit.com) which is not showing content highlight when typing some words on search. Screenshot from 2021-11-13 11-04-03 I inspected its element and got some error messages : Screenshot from 2021-11-13 11-03-40 According to correlated issue i found here (https://github.com/zzossig/hugo-theme-zzo/issues/214), i have a solution to change my baseURL in config.toml from https://bytadit.com into https://bytadit.netlify.app (because i hosted on netlify), and it works!!. Screenshot from 2021-11-13 13-17-31 But i faced another problem, my address bar is always change to https://bytadit.netlify.app, even i type bytadit.com. I want it stayed to my custom domain (bytadit.com), not netlify domain. I know it's because of the changed baseURL, but if i change the baseURL to my own domain (like before), the search doesn't work again. What should i do to solve that?

BeTheCodeWithYou commented 1 year ago

@bytadit Just checking, if you have found a solution to this?
I have same issue for my site, search works on local but not on custom domain. I have looked at this search issue 214 and all of it's comments but not helpful.

@zzossi If you could help on this, would be great. Thanks.

BeTheCodeWithYou commented 1 year ago

I have resolved the search function for my site https://www.neerajsidhaye.com I had same issue of CORS. I have custom domain on AWS Route 53 and was using AWS Amplify for build and publishing.

Now, my site live using GitHub Pages and using GitHub Actions for build, deploy and publishing as soon I commit. I am still using custom domain on AWS Route 53.

I think, moving to github pages and adding a CNAME entry into the DNS ( route 53 ) , has resolved the CORS error and eventually the search.

sysadmin-info commented 1 year ago

I have resolved the search function for my site https://www.neerajsidhaye.com I had same issue of CORS. I have custom domain on AWS Route 53 and was using AWS Amplify for build and publishing.

Now, my site live using GitHub Pages and using GitHub Actions for build, deploy and publishing as soon I commit. I am still using custom domain on AWS Route 53.

I think, moving to github pages and adding a CNAME entry into the DNS ( route 53 ) , has resolved the CORS error and eventually the search.

Hi,

Can you provide an example of the CNAME? I am familiar with it, however I would like to know the pattern. You do not have to provide a real domain name it can be example.com and how the CNAME record should look like. I suppose it will be different for Cloudflare, AWS, Google Cloud etc.

Thien1n commented 5 months ago

Hi @sysadmin-info I just visited your site [https://sysadmin-info.netlify.app/en/] It seems to be there is still an issue regarding to "search" function. I have fixed it by entering the value of [CNAME/Custom domain] into the BaseURL on config.toml file instead the "abczyx.github.io" That means the correct will be BaseURL = "https://sysadmin-info.netlify.app/", let's try it on your side You can visit here to take the explanation: #241

sysadmin-info commented 5 months ago

Hi,

I already fixed it a very long time ago but I do not remember now what I did. The site is working very long at sysadmin.info.pl.

Kind regards

pon., 15 kwi 2024, 18:35 użytkownik Trinh Thanh Thien < @.***> napisał:

Hi @sysadmin-info https://github.com/sysadmin-info I just visited your site [https://sysadmin-info.netlify.app/en/] It seems to be there is still an issue regarding to "search" function. I have fixed it by entering the value of [CNAME/Custom domain] into the BaseURL on config.toml file instead the "abczyx.github.io" That mean the correct will be BaseURL = " https://sysadmin-info.netlify.app/", let's try it on your side You can visit here to take the explanation: #241 https://github.com/zzossig/hugo-theme-zzo/issues/241

— Reply to this email directly, view it on GitHub https://github.com/zzossig/hugo-theme-zzo/issues/456#issuecomment-2057300875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFULAOVWFN5FU5DSAQF4PF3Y5P6VTAVCNFSM5H6KIXJKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBVG4ZTAMBYG42Q . You are receiving this because you were mentioned.Message ID: @.***>