Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 572080

Summary: Hugo solstice theme does not work
Product: Community Reporter: Wim Jongman <wim.jongman>
Component: WebsiteAssignee: phoenix.ui <phoenix.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chris.guindon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Log
none
Site visual none

Description Wim Jongman CLA 2021-03-18 13:09:22 EDT
Chris, I have cloned your hugo-solstice repo and followed the readme.md instructions. However, I get this:

> $ npm install
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/chokidar/node_modules/fsevents):
> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
> 
> audited 1260 packages in 4.26s
> 
> 99 packages are looking for funding
>  run `npm fund` for details
> 
> found 0 vulnerabilities

and then:

> $ hugo server --source=exampleSite --themesDir="../../"
> Error: module "hugo-solstice-theme" not found; either add it as a Hugo Module or store it in "/home/jongw/git/eclipsewebsite/exampleSite".: module does not exist
Comment 1 Christopher Guindon CLA 2021-03-18 13:19:38 EDT
I was able to get a website to run with the following commands:

1. cd /tmp
2. git clone git@github.com:EclipseFdn/hugo-solstice-theme.git
3. cd hugo-solstice-theme
4. npm install
5. hugo server --source=exampleSite --themesDir="../../"

                   | EN  | FR | ES | PT | JP | ZH | RU  
-------------------+-----+----+----+----+----+----+-----
  Pages            | 112 | 20 | 17 | 17 | 17 | 17 | 17  
  Paginator pages  |   0 |  0 |  0 |  0 |  0 |  0 |  0  
  Non-page files   |   1 |  0 |  0 |  0 |  0 |  0 |  0  
  Static files     |   2 |  2 |  2 |  2 |  2 |  2 |  2  
  Processed images |   0 |  0 |  0 |  0 |  0 |  0 |  0  
  Aliases          |  30 |  7 |  7 |  7 |  7 |  7 |  7  
  Sitemaps         |   2 |  1 |  1 |  1 |  1 |  1 |  1  
  Cleaned          |   0 |  0 |  0 |  0 |  0 |  0 |  0  

Built in 436 ms
Watching for changes in /tmp/hugo-solstice-theme/{archetypes,exampleSite,i18n,layouts,static}
Watching for config changes in /tmp/hugo-solstice-theme/exampleSite/config/_default
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Comment 2 Wim Jongman CLA 2021-03-18 13:32:34 EDT
(In reply to Christopher Guindon from comment #1)

Yes! That worked.

I did this:

* mkdir /tmp/eclipsewebsite
* cd /tmp/eclipsewebsite
* git clone git@github.com:EclipseFdn/hugo-solstice-theme.git .

The name of the directory seems important
Comment 3 Christopher Guindon CLA 2021-03-18 13:47:15 EDT
(In reply to Wim Jongman from comment #2)
> (In reply to Christopher Guindon from comment #1)
> 
> Yes! That worked.
> 
> I did this:
> 
> * mkdir /tmp/eclipsewebsite
> * cd /tmp/eclipsewebsite
> * git clone git@github.com:EclipseFdn/hugo-solstice-theme.git .
> 
> The name of the directory seems important

It really depends on how you want to organize your project. This is an odd example because the repo is the Hugo theme that you want to use in your example site.

You might want to take a look at our proof of concept for migrating www.eclipse.org to Hugo:

https://github.com/EclipseFdn/eclipse.org

To run the site, you simply need to do:

1. cd /tmp
2. git clone git@github.com:EclipseFdn/eclipse.org.git
3. cd eclipse.org
4. npm install
5. hugo server

The hugo-solstice-theme is a dependency  (https://github.com/EclipseFdn/eclipse.org/blob/main/package.json#L28) for the project and we configure Hugo to check for themes in the node_modules folder (https://github.com/EclipseFdn/eclipse.org/blob/main/config.toml#L7).
Comment 4 Wim Jongman CLA 2021-03-18 14:43:45 EDT
(In reply to Christopher Guindon from comment #3)

I'm lost, sorry.

So the hugo solstice is an example website with the solstice theme and the eclipse.org is a template website that uses the solstice theme.

So I should build on eclipse.org and use hugo-solstice as an example how to create pages?

> To run the site, you simply need to do:
> 
> 1. cd /tmp
> 2. git clone git@github.com:EclipseFdn/eclipse.org.git
> 3. cd eclipse.org
> 4. npm install
> 5. hugo server


When running the eclipse.org site like this I get:

> eclipsefdn-eclipse-org@0.0.0 install /home/jongw/git/eclipse.org
> NODE_ENV=production npm run production
> 
> 
> eclipsefdn-eclipse-org@0.0.0 production /home/jongw/git/eclipse.org
> NODE_ENV=production webpack --progress --config=node_modules/laravel-mix/setup/webpack.config.js
> 
> [webpack-cli] /home/jongw/git/eclipse.org/node_modules/laravel-mix/src/Mix.js:18
>    static _primary = null;
Comment 5 Wim Jongman CLA 2021-03-18 14:46:59 EDT
Created attachment 285876 [details]
Log
Comment 6 Wim Jongman CLA 2021-03-18 15:01:34 EDT
Created attachment 285877 [details]
Site visual

If I run the hugo-solstice and go to the page I get a page without styling. Is that supposed to happen?
Comment 7 Christopher Guindon CLA 2021-03-18 15:13:53 EDT
(In reply to Wim Jongman from comment #6)
> Created attachment 285877 [details]
> Site visual
> 
> If I run the hugo-solstice and go to the page I get a page without styling.
> Is that supposed to happen?

We don't include the css and javascript files.

You need to run:

npm run production

That step is not included since we usually include an install hook that will run "npm run production" when npm install is called.

The eclipse.org project does not require you to manually run npm run production because of this script:

https://github.com/EclipseFdn/eclipse.org/blob/main/package.json#L20

I will submit a PR to our theme to address that.
Comment 8 Christopher Guindon CLA 2021-03-18 15:25:01 EDT
I created a PR:
https://github.com/EclipseFdn/hugo-solstice-theme/pull/212/files

I will look at releasing a new version tomorrow.
Comment 9 Christopher Guindon CLA 2021-03-19 11:44:58 EDT
Closing!

Wim, if you have more questions, feel free to open issues against the hugo-soltice-theme project:

https://github.com/EclipseFdn/hugo-solstice-theme/issues
Comment 10 Wim Jongman CLA 2021-03-19 12:26:25 EDT
(In reply to Christopher Guindon from comment #9)
> Closing!
> 
> Wim, if you have more questions, feel free to open issues against the
> hugo-soltice-theme project:
> 
> https://github.com/EclipseFdn/hugo-solstice-theme/issues

Thanks!
Comment 11 Wim Jongman CLA 2021-03-22 07:02:53 EDT
(In reply to Wim Jongman from comment #10)
> (In reply to Christopher Guindon from comment #9)
> > Closing!
> > 
> > Wim, if you have more questions, feel free to open issues against the
> > hugo-soltice-theme project:
> > 
> > https://github.com/EclipseFdn/hugo-solstice-theme/issues

The PR is still not merged.
Comment 12 Christopher Guindon CLA 2021-03-22 09:59:08 EDT
(In reply to Wim Jongman from comment #11)
> (In reply to Wim Jongman from comment #10)
> > (In reply to Christopher Guindon from comment #9)
> > > Closing!
> > > 
> > > Wim, if you have more questions, feel free to open issues against the
> > > hugo-soltice-theme project:
> > > 
> > > https://github.com/EclipseFdn/hugo-solstice-theme/issues
> 
> The PR is still not merged.

Correct but that PR is not blocking anyone.
Comment 13 Wim Jongman CLA 2021-03-22 10:40:20 EDT
(In reply to Christopher Guindon from comment #12)
> (In reply to Wim Jongman from comment #11)
> > (In reply to Wim Jongman from comment #10)
> > > (In reply to Christopher Guindon from comment #9)
> > > > Closing!
> > > > 
> > > > Wim, if you have more questions, feel free to open issues against the
> > > > hugo-soltice-theme project:
> > > > 
> > > > https://github.com/EclipseFdn/hugo-solstice-theme/issues
> > 
> > The PR is still not merged.
> 
> Correct but that PR is not blocking anyone.

I'm sorry, but I am lost. 

Let me tell you my intent:

I want to redo the eclipse platform website.

I understand that Hugo is the way to go. How do I get started?
Comment 14 Christopher Guindon CLA 2021-03-22 10:59:43 EDT
(In reply to Wim Jongman from comment #13)
> (In reply to Christopher Guindon from comment #12)
> > (In reply to Wim Jongman from comment #11)
> > > (In reply to Wim Jongman from comment #10)
> > > > (In reply to Christopher Guindon from comment #9)
> > > > > Closing!
> > > > > 
> > > > > Wim, if you have more questions, feel free to open issues against the
> > > > > hugo-soltice-theme project:
> > > > > 
> > > > > https://github.com/EclipseFdn/hugo-solstice-theme/issues
> > > 
> > > The PR is still not merged.
> > 
> > Correct but that PR is not blocking anyone.
> 
> I'm sorry, but I am lost. 
> 
> Let me tell you my intent:
> 
> I want to redo the eclipse platform website.
> 
> I understand that Hugo is the way to go. How do I get started?

Hugo is a solution for building a website. We do not require projects to build their website with Hugo or to use our templates as we are aware that some might prefer another framework.

EF Website requirements are defined in our Eclipse Foundation Hosted Services Privacy and Acceptable Usage Policy: https://www.eclipse.org/org/documents/eclipse-foundation-hosted-services-privacy-and-acceptable-usage-policy.pdf

The EF webdev team created a template (https://github.com/EclipseFdn/hugo-solstice-theme) for our Working Groups sites and we encourage projects to use it if they plan on using Hugo with their project.

The official documentation for building a project website with Jenkins is here:
https://wiki.eclipse.org/Jenkins#How_to_build_my_project.27s_website_with_Jenkins.3F

If you are looking for Hugo documentation, you can check their documentation:
https://gohugo.io/documentation/

If you are looking for an easy way to get started, I would probably recommend that you fork/copy https://github.com/EclipseFdn/eclipse.org to get started and then follow our documentation to deploy your site:
https://wiki.eclipse.org/Jenkins#How_to_build_my_project.27s_website_with_Jenkins.3F 

If a project does not have the resources for building and maintaining a website, I would recommend a redirect to the project PMI page.
Comment 15 Wim Jongman CLA 2021-03-22 11:10:50 EDT
(In reply to Christopher Guindon from comment #14)

> 
> If you are looking for an easy way to get started, I would probably
> recommend that you fork/copy https://github.com/EclipseFdn/eclipse.org to
> get started and then follow our documentation to deploy your site:
> https://wiki.eclipse.org/Jenkins#How_to_build_my_project.
> 27s_website_with_Jenkins.3F 

Thanks, that is what I did and I can now get some content. 

I'm still unclear what the hugo-solstice repo does... Does it provide examples for the various interface elements in the solstice theme? Do I need to clone it for the eclipse.org fork to run correctly?

> 
> If a project does not have the resources for building and maintaining a
> website, I would recommend a redirect to the project PMI page.

We don't have resources but we also don't want to point back to the PMI page. 

What we want is an easy-to-use content management system that anyone can maintain without having to have a degree in web design. :^)

We hope Hugo is the right mix between maintainability and flexibility (e.g. for content generation). Would you say this is the case?