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:
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.
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:
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)
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
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.