Please make sure that you have read the theme submission guidelines before submitting a theme. The guidelines provide all relevant information and requirements that have to be fulfilled before the submission. Please tick the relevant boxes for your theme in the checklist below:
Link to my theme repository: https://github.com/zzossig/hugo-theme-zdoc
README.md describing my themeLICENSE.mdtheme.tomlimages/ folder with the required dimensionshttps://example.com is set as base url in exampleSite/config.{toml, yaml, json} to avoid the abuse of unused domainstoCSS and PostCSS that I have committed the /resources directory with all generated assets, for my theme to work in the basic version of HugoN.B. By submitting a theme to the Hugo Themes Showcase you understand that you need to maintain your theme. You will need to keep an eye on whether your theme's demo generates on the Hugo website, whenever there is a new release. We are a very small team and we just cannot keep up opening issues in the various theme repositories to notify authors. Whenever a theme demo breaks and remains broken then at some point it will be removed from the list without prior warning. If you no longer wish to maintain a theme please let us know.
Feel free to ask questions. We're glad to help.
Hello @zzossig
I have noticed the following issues with your theme submission:
In line 16 of exampleSite/content/_index.md you have entered a URL to /about however you have not provided this content file and therefore the Get Started button throws a 404.
The search functionality does not work when I test your theme demo. I cannot provide further feedback since debugging Javascript is beyond the scope of feedback that we are able to offer.
Line 8 of exampleSite/static/manifest.json mentions your other theme instead of this one.
The GitHub links in the top menu and the footer also point to your other theme instead of this one.
Once you look into the above please let me know.
Hi, @onedrawingperday
Thank you for the feedback.
But I test the search on the local environment, but it works well on my end.
It also works well when I deployed my site to a host server.
Can you tell me how you tested it? So I can reproduce it on my end
@zzossig
As mentioned in the README the Hugo Themes Showcase has its own Build Script.
Instructions to test your theme with the Build Script locally are provided here
But in your case, for the theme demo to generate properly, you would also need to add your theme's name i.e. 'hugo-theme-zdoc' in the array of line 179 of _script/generateThemeSite.sh
When testing your theme, the browser console returns the following ERROR:
[404]Error: Not Found en:375:19
onload http://localhost:1313/theme/hugo-theme-zdoc/en/:375
The console ERROR is the one you have specified in line 378 of layouts/partials/head/scripts.html
The problem appears to be in lines lines 316 and 321 of layouts/partials/head/scripts.html. You point fuse.js to the host root and as mentioned in the Common Permalink Issues of the README:
Make sure not to use a forward slash
/in the beginning of a URL, because it will point to the host root and Hugo will not generate the correct URL for the demo's assets.
@onedrawingperday
Thanks for the degging.
I checked that the zzo theme and the zdoc theme has the same search logic.
I'm quite sure that the search is just not working in the local environment.
Once the zdoc theme deployed to the exampleSite, the search will work.
I fixed other issues too.
@zzossig
I hadn't noticed the addition of search to your other theme.
When I test the search functionality in the live demo by entering for example the keyword markdown I am indeed getting a list of search results.
When I hover the cursor over the search results I can see that they point to proper URLs
However when I click on a search result the dropdown list disappears and there is no way to click through the search result.
I am seeing the above behavior with the latest Firefox 72.0.02 on both macOS, and Xubuntu 18.04
Can you please fix this?
By the way I do not quite understand why you perform all those baseURL checks when loading the lunr.js index in your JavaScript, but just in case you don't know there is a Hugo variable to detect whether a website is served with the local Hugo server and that is .Site.IsServer
@onedrawingperday
I fixed the search bug.
By the way I do not quite understand why you perform all those baseURL checks
Thanks for pointing it! Actually, it was my stupid code. I deleted that part. Instead, I use .permalink for the search URL.
I tested the zdoc theme with the Hugo Themes Site Build Script. All seems to be fine, but some style code is not imported. It's weird. It's only happened when I tested with the build script. Since I have added the generated resource file, the theme might work well in the example site.
@zzossig
I confirm the fix. I added your theme to the repo in f701d71
@digitalcraftsman
This is a multilingual documentation theme.
@zzossig could you please update the name of your theme in theme.toml, i.e. changing zzo to Zdoc?
While looking for your www.themes.gohugo.io I noticed another theme named zzo which confused me at first.
@digitalcraftsman
Opps I just updated sorry
@digitalcraftsman
I updated the theme in fee1d12
Thank you @zzossig for the fix and @onedrawingperday for updating the theme. I was just about to do it myself.
@zzossig your theme will promoted on Hugo's official Twitter account soon.