Wowchemy-hugo-modules: Projects not listing publications

Created on 6 Nov 2018  路  7Comments  路  Source: wowchemy/wowchemy-hugo-modules

On the example site, Internal Project lists the clothing search publication: https://themes.gohugo.io//theme/academic/project/internal-project/
When deploying the example website locally, this does not occur:
screenshot

To investigate this issue, I downloaded the most recent version of Academic and replaced the content, static, and config.toml with the contents of the ExampleSite folder.

bug

Most helpful comment

I think I might have tracked down the issue. The file layouts/project/single.html contains the following line:
{{ $project = delimit (last 1 (split (substr .Dir 0 -1) "/")) "" }}

The problem is that on Windows machines the directory will not contain a forward slash (/) but a backslash (\). If I replace the line by
{{ $project = delimit (last 1 (split (substr .Dir 0 -1) "\\")) "" }}
the example site compiles correctly and lists the publications in internal-project.

I hope this makes sense. I am sure @gcushen will know a way to adapt the code so it works on both Windows and other machines.

All 7 comments

This appears to be a duplicate of #778. If you use Hugo directly rather than via third-party wrappers like RStudio/Blogdown, it should work fine. If you're using RStudio/Blogdown then consider raising a bug report with them.

That's strange, I'm using Hugo directly. I just replicated the issue, and this is exactly what I did:

  1. Download the zip folders from https://sourcethemes.com/academic/docs/install/ and extract.
  2. Place the content of academic-master into academic-kickstart/themes/academic/
  3. Move the contents of ExampleSite into academic-kickstart, replacing files that already exist.
  4. Git Bash on the academic-kickstart folder.
  5. $ hugo version: Hugo Static Site Generator v0.50 windows/amd64 BuildDate: 2018-10-29T09:53:09Z
  6. $ hugo server -D:
    main_page
  7. Navigate to Internal Project:
    internal_project
    The button layouts are slightly different than the website, but nothing major.
  8. Scroll down, no publication or talk:
    example_no_publication

I've checked the clothing publication and it does have projects = ["internal-project"] on line 37 of clothing-search/index.md

Any thoughts? I'm not using RStudio or Blogdown.

Quick update on things I've tried using different releases. I updated Hugo to version 0.51.

Using v3.0.0, I get the same experience as in my last comment.
Using v2.4.0, the publications display correctly (note that I edited line 37 of clothing-search.md to projects = ["deep-learning"] in order to test this)
capture

There are no error messages in Hugo.

I suspect that the new page bundles are to blame for this. Is there anything else I should try to help track down the problem?

This behavior is not reproduced in the demo site or if I attempt to run the example site locally. I suggest posting on the support forums.

I have the exact same problem as @avivaprins on Hugo 0.51 / Windows 10 / Academic 3.0+. Is it a Windows issue?

I think I might have tracked down the issue. The file layouts/project/single.html contains the following line:
{{ $project = delimit (last 1 (split (substr .Dir 0 -1) "/")) "" }}

The problem is that on Windows machines the directory will not contain a forward slash (/) but a backslash (\). If I replace the line by
{{ $project = delimit (last 1 (split (substr .Dir 0 -1) "\\")) "" }}
the example site compiles correctly and lists the publications in internal-project.

I hope this makes sense. I am sure @gcushen will know a way to adapt the code so it works on both Windows and other machines.

Hi,
I am having a related problem.
If I go to the url: http://localhost:1313/projects/ then I see the correct page displayed.
However, on the home page the child project pages are not listed.
Any ideas?
I'm using: Hugo Static Site Generator v0.69.1/extended darwin/amd64 and the latest version of the code.

https://github.com/vrutten/vrutten.github.io (for code)
https://github.com/vrutten/website

Many thanks for any help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saadjavaid picture saadjavaid  路  3Comments

chris-prener picture chris-prener  路  3Comments

gcushen picture gcushen  路  3Comments

melvidoni picture melvidoni  路  3Comments

ivlis picture ivlis  路  4Comments