No posts while using Eternity theme

Hi,

I understand the Eternity project is not actively being maintained anymore but has anybody tried to use it recently. I followed the Installation instructions and copied all the files from the example project plus the config file. When I run hugo server, I get the below error msg.

WARN  _internal/google_analytics_async.html is no longer supported by Google and will be removed in a future version of Hugo
ERROR render of "section" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/columns" (dict "portfolioScratch" $portfolioScratch "portfolioMobileScratch" $portfolioMobileScratch "ctx" .)>: error calling partial: "../eternity/layouts/partials/slides/columns.html:37:13": execute of template failed: template: partials/slides/columns.html:37:13: executing "partials/slides/columns.html" at <index .ctx.Site.Taxonomies.tags .ctx.Params.Title>: error calling index: index of type page.Taxonomy with args [<nil>] failed: value is nil; should be of type string
Built in 46 ms
Error: error building site: render: failed to render pages: render of "term" failed: execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "slides/columns" (dict "portfolioScratch" $portfolioScratch "portfolioMobileScratch" $portfolioMobileScratch "ctx" .)>: error calling partial: "../eternity/layouts/partials/slides/columns.html:37:13": execute of template failed: template: partials/slides/columns.html:37:13: executing "partials/slides/columns.html" at <index .ctx.Site.Taxonomies.tags .ctx.Params.Title>: error calling index: index of type page.Taxonomy with args [<nil>] failed: value is nil; should be of type string

I am guessing I am getting this error msg because I do not have any posts for taxonomy. I can bypass this error msg by disabling taxonomy and run the server.

However, when I run the server. None of the contents are posted.

To reproduce this error. Follow the Installation instructions from the theme page.

I copied all the contents from the example folder so I do have contents in the content folder.
One thing I did notice is that all the contents from the content folder gets processed and are dumped into the public folder and I can type the url manually to get to those pages.
https://imgur.com/a/j7NDjKS

I am not sure why the contents are not being posted. I have also tried creating a new content but I still get “There is no posts yet” error msg. Any help to get those content posted is greatly appreciated. I have been playing with this for a while and feel like I am just missing something stupid that’s right in front of my eyes.

I can access the page by entering the URL manually.

hugo env:

hugo v0.123.7-312735366b20d64bd61bff8627f593749f86c964+extended linux/amd64 BuildDate=2024-03-01T16:16:06Z VendorInfo=gohugoio
GOOS=“linux”
GOARCH=“amd64”
GOVERSION=“go1.22.0”
github.com/sass/libsass=“3.6.5”
github.com/webmproject/libwebp=“v1.3.2”

mkdir -p layouts/partials/slides
cp themes/eternity/layouts/partials/footer.html layouts/partials
cp themes/eternity/layouts/partials/slides/columns.html layouts/partials/slides/

Then make the following changes:

diff --git a/layouts/partials/slides/columns.html b/layouts/partials/slides/columns.html
index 71fc288..bf1c54e 100644
--- a/layouts/partials/slides/columns.html
+++ b/layouts/partials/slides/columns.html
@@ -34,7 +34,7 @@
 
 {{ $posts := slice }}
 {{ if .ctx.Site.Taxonomies.tags }}
-	{{ $posts = index .ctx.Site.Taxonomies.tags .ctx.Params.Title }}
+	{{ $posts = index .ctx.Site.Taxonomies.tags (lower .ctx.Params.Title) }}
 	{{ $posts = sort $posts ".Params.weight" "desc" }}
 {{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index b043659..61ade0f 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -6,5 +6,4 @@
 </body>
 
 {{ template "_internal/google_analytics.html" . }}
-{{ template "_internal/google_analytics_async.html" . }}

I recommend you select an actively maintained theme.

1 Like

Thank you very much. That worked.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.