Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

New Theme: Den #389

Closed
8 tasks done
shaform opened this issue Jul 16, 2018 · 11 comments
Closed
8 tasks done

New Theme: Den #389

shaform opened this issue Jul 16, 2018 · 11 comments

Comments

@shaform
Copy link

shaform commented Jul 16, 2018

Theme submission

Before submitting a theme please make sure you've read the README.md. It describes in detail what information are needed and which requirements have to be fulfilled for the submission. The check list below can help you.

Link to my theme repository: https://github.com/shaform/hugo-theme-den

I made sure that...

  • the repository contains a good README.md describing my theme
  • an open source license has been added to LICENSE.md
  • all metadata have been added to theme.toml
  • screenshots have been added in the images/ folder with the required dimensions
  • https://example.com is set as base url in exampleSite/config.{toml, yaml, json} to avoid the abuse of unused domains
  • the site's content is as neutral as possible (contains no ads etc.) and reflects the features of my theme
  • I tested my theme against the gohugoio/HugoBasicExample
    • I've checked the developer tools' console in my browser for error messages

Feel free to ask questions. We're glad to help.


Hi,
I am submitting a new theme: https://github.com/shaform/hugo-theme-den
Please let me know if there are any problems. Thanks!

@onedrawingperday
Copy link
Contributor

Hi @shaform

Thanks for your theme submission!

I just tested your theme and the example site is generated with the build script for the Hugo Themes site.
👍

But there is one small issue.

Due to the way that the Theme Site is structured your header image is not found because you use relURL and that always works relative to the root of a Hugo site.

But your example site will be published in a subdirectory, so you need to replace instances of relURL with absURL.

If you can please do the above and I will mark your theme as ready to be added on the site.

Thanks!

@shaform
Copy link
Author

shaform commented Jul 24, 2018

@onedrawingperday Thanks! I have changed relURL to absURL.
BTW, I have also used relLangURL in other places (e.g., the menu). I not not sure if it also requires changes, but I've changed it to absLangURL as well.

@onedrawingperday
Copy link
Contributor

BTW, I have also used relLangURL in other places (e.g., the menu). I not not sure if it also requires changes, but I've changed it to absLangURL as well.

That wasn't needed, but it's also fine.

However now your CSS file will not load.
To fix this please remove the forward slash / from lines 29 and 31 of your head.html partial.

Like so: <link rel="stylesheet" href="{{ "css/den.css" | absURL }}">
and so: <link rel="stylesheet" href="{{ "css/" | absURL }}{{ . }}">

The forward slash makes the link relative to the root and that's why the CSS is 404, when your example site is generated.

Let me know once you do this small change.

Thanks!

@shaform
Copy link
Author

shaform commented Jul 24, 2018

@onedrawingperday Done!

@onedrawingperday
Copy link
Contributor

onedrawingperday commented Jul 24, 2018

@shaform

Sorry to bother you again. But actually your change to absLangURL breaks the navigation links of the example site when I execute the build script.

Please revert this change in your header and footer partials and use relLangURL as before.

The CSS and the header image load fine now.

Thanks!

@shaform
Copy link
Author

shaform commented Jul 24, 2018

@onedrawingperday Thanks! I actually was already using absLangURL. (Previously I used relLangURL, but changed it to absLangURL when I changed relURL to absURL.)
This time I tested the theme against the baseURL https://example.com/test, hopefully it also works under the build environment.

What I changed:

  1. Remove leading slash from menu configuration config.toml.
  2. Remove About menu entry from the front matter of about.md, instead put it into config.toml. (I was unable to find a way to make it work when it's set in the front matter.)

@shaform
Copy link
Author

shaform commented Jul 25, 2018

Since the fact that the language prefix would be added twice for links added via frontmatter is a little bit counter-intuitive, I've opened an issue for this as well: gohugoio/hugo#4995.

@onedrawingperday
Copy link
Contributor

@shaform Everything is looking good with the example site when I execute the build script for the Hugo Themes site.

@digitalcraftsman this theme is ready to be added to the website

@bep
Copy link
Member

bep commented Jul 25, 2018

@onedrawingperday I can add you to the "Hugo web group" so you could add/commit themes yourself if you ... want?

@onedrawingperday
Copy link
Contributor

onedrawingperday commented Jul 25, 2018

@bep Thanks but not at this stage. I don't feel confident enough to commit new themes on my own. Maybe later, once I familiarize myself a bit more with how git submodules work and how to update them all at once.

Besides @digitalcraftsman needed help for this week and the next. It's not like he will have exams forever.

@digitalcraftsman
Copy link
Member

@shaform your theme should appear soon on Hugo's theme site. Next, I'll promote your theme on Hugo's official Twitter account.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants