Hugothemes: New Theme : hugo-assembly

Created on 5 Jul 2018  路  21Comments  路  Source: gohugoio/hugoThemes

https://github.com/salomoko/hugo-assembly

let me know if I missed anything?

Most helpful comment

@salsysd
To test your theme with the Hugo Themes Site Build Script locally.

Do the following:

  1. Clone this repo
  2. Then add your theme from the root of the cloned repo with:
    git submodule add --recursive https://github.com/salsysd/hugo-assembly
  3. Then execute cd _script/
  4. And then:
./generateThemeSite.sh http://localhost:1313 && hugo server -w=false -s hugoThemeSite/themeSite
  1. Open localhost:1313 in your browser and navigate to the theme.

The Build Script will take a while to generate the site. Only your theme will show up in the list. If you want to check out any other theme locally you need to initiate a theme submodule with the recursive flag.

All 21 comments

Hello @salomoko,

thank you for sharing this theme with us :+1:.

The generated demo for your theme looks pretty good. I just noticed a few smaller details could be improved (but they wouldn't hold back the submission itself if you wish).

  • the hyperlink set for the items in the main menu point to # instead of the div id of the corresponding section
  • the text for the welcome section defined in the config file contains HTML tags to format words but aren't interpreted as such. You should be fixed if you pipe the text through a template function like markdownify.

thanks @digitalcraftsman for the quick run thru! appreciate it! :)

fixed the formatted html, pipe thru markdownify here https://github.com/salomoko/hugo-assembly/commit/d306316bfb5cee920f097d9e4ca2a37b83ccd1b0

Is the the theme live?

Hi @salomoko currently I am helping out with theme submissions.

I tested your theme and it builds successfully for the Themes site 馃憤

But there is one issue that you need to fix:

  • Your main menu links still point to # instead of the corresponding section.

For example the menu item Services link should point to href="#services" . Then you need to wrap that section in a container div or section element and give it the corresponding id="services".

Please consider making this change and let me know so that I can mark your theme as ready to be added to the themes site.

Thanks!

@onedrawingperday sounds good...

It should be good to go now! The only link that isn't hooked up is Contact Us. but Im sure devs will get the gist..

thanks again.
sal

The only link that isn't hooked up is Contact Us. but Im sure devs will get the gist..

@salomoko The idea of a Hugo theme is that it can be used by someone who is not dev.

But anyway I'm OK with the Contact Us link not going to a corresponding section since there isn't one in your theme.

However there are a couple of things that you need to fix in theme.toml

First of all in your theme's repo you are using the MIT licence but in line 15 you have entered

license = "CC"

you should change line 15 to

license = "MIT"
````

Then you need to delete line 18 

homepage = "http://example.co"
`` Thehomepage` parameter is reserved for the original Assembly theme.
You have already specified the original theme's parameters in lines 28-30
But because of line 18 the homepage link is incorrect when I execute the Hugo Themes site build script.

Do these small changes and I will mark your theme as ready to be added to the Hugo website.

Thanks!

@salomoko The idea of a Hugo theme is that it can be used by someone who is not dev.
But anyway I'm OK with the Contact Us link not going to a corresponding section since there isn't one in your theme

oh wow didn't realize non-devs were jumping in this big bad world of hugo! ;) jk
I'll update that at some point in the near future, just really can't atm. but cool thanks!

/ on it

oh geez!! I didn't realize this hadn't been released yet!! omg. @onedrawingperday or @digitalcraftsman I've resolved all issues requested! Thanks for that! Can you release this theme? 馃檹
Wanna show a potential employer...

oh! also my GH username changed its now located https://github.com/salsysd/hugo-assembly

Hello Salomon,

sorry for the delay. I've checked your theme with the build script for the Hugo theme site, that generates a demo for your theme, and noticed that the homepage isn't populated with content.

Your theme requires a custom config.toml that is located in the root directory of your theme. However, Hugo isn't aware of that and hence the partials on the homepage don't show anything because they aren't enabled.

You can fix that by

  • adding a new folder called exampleSite that, in a nutshell, allows you to customize a theme demo
  • copying the config.toml inside exampleSite
  • and by adding an empty folder called content. You can make this folder trackable for git by adding an empty file like .gitkeep. The folder is necessary because Hugo expects a content folder for every website regardless of it's finale use.

ya I noticed everyone doing that exampleSite method... Guess I know why now, as I explicitly tried to avoid that, as I didn't understand why it was needed. Since I tested my theme against the hugoExample project and it worked just fine! My bad, I know this isn't Nom, I'll mark it 0! Won't step over the line again... :)

thanks @digitalcraftsman for the explanation!

My bad, I know this isn't Nom, I'll mark it 0! Won't step over the line again

There's nothing to excuse

Guess I know why now, as I explicitly tried to avoid that, as I didn't understand why it was needed.

Do you still try to avoid it? Since your theme requires a customized demo (e.g. a custom config file) there's no way around the exampleSite folder unless you don't plan to have a demo generated on the theme site.

Please let me know how you would like to proceed.

@digitalcraftsman
sorry for the delay...
also I was jk, re: the nom and stepping over the line reference (lebwoski reference)...

but it should now be good to go to run the script again and go live!

@digitalcraftsman and I noticed #387 being an open issue... I suppose I'd fall into that pitfall as well.
by chance is the hugo theme site build script openly available? I'd be interested in looking into this!

@salsysd
To test your theme with the Hugo Themes Site Build Script locally.

Do the following:

  1. Clone this repo
  2. Then add your theme from the root of the cloned repo with:
    git submodule add --recursive https://github.com/salsysd/hugo-assembly
  3. Then execute cd _script/
  4. And then:
./generateThemeSite.sh http://localhost:1313 && hugo server -w=false -s hugoThemeSite/themeSite
  1. Open localhost:1313 in your browser and navigate to the theme.

The Build Script will take a while to generate the site. Only your theme will show up in the list. If you want to check out any other theme locally you need to initiate a theme submodule with the recursive flag.

@onedrawingperday awesome! thanks for the insight!

are you currently doing this on every theme manually? Or do you have some sort of automation trigger that executes generateThemeSite.sh ?

The above instructions are for testing a theme locally.

Note that if you add all theme submodules recursively it will use nearly 2GB of your disk.

Usually I add only one theme submodule recursively and after the review process I simply rebase my local clone to the upstream Hugo Themes repo.

Or do you have some sort of automation trigger that executes generateThemeSite.sh ?

Whenever the website is updated, the build is handled automatically through Netlify.

ya I noticed that entire logic of the script is for Netlify only...

is all well with this theme now?

@salsysd All is well with you theme now.

@digitalcraftsman The Hugo Assembly theme is finally ready to be added to the website.

awesome ness!! I just reently added some updates! and here's an example site live!

https://assemblymech.com

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gundamew picture gundamew  路  4Comments

spech66 picture spech66  路  5Comments

SanmayJoshi picture SanmayJoshi  路  5Comments

kishaningithub picture kishaningithub  路  5Comments

bep picture bep  路  6Comments