Coder Social home page Coder Social logo

Comments (5)

nishanths avatar nishanths commented on June 2, 2024

Thanks for catching. Yes, I made a mistake in this commit: 6e2e423

from cocoa-hugo-theme.

robinst avatar robinst commented on June 2, 2024

Thanks :). With cachebusting turned on, I now get this:

ERROR: 2016/12/04 15:56:32 template.go:132: template: theme/partials/head_includes.html:25:46: executing "theme/partials/head_includes.html" at <.Now.Unix>: can't evaluate field Now in type interface {} in theme/partials/head_includes.html

from cocoa-hugo-theme.

nishanths avatar nishanths commented on June 2, 2024

Thanks! It looks like .Now does not exist any more. Sigh, it was undocumented anyway.

Even when it did exist, it appears it returned the time associated with the page, not the current time. So cachebuster would not have been working anyway.

Possible solution is to make a pull request to hugo adding a "now" function that returns time.Now().
This is the related code in hugo: https://github.com/spf13/hugo/blob/master/tpl/template_funcs.go#L2018
I'll get to it in a couple of days!

I'll disable cachebuster by default in config.toml until we can sort this out.

from cocoa-hugo-theme.

nishanths avatar nishanths commented on June 2, 2024

dependent on hugo pr: gohugoio/hugo#2859

from cocoa-hugo-theme.

nishanths avatar nishanths commented on June 2, 2024

Done in 2e598e5.

works for me with hugo 0.18.
@robinst please feel free to reopen if you have issues. thanks for patience!

Related thread for future: https://discuss.gohugo.io/t/proposal-replace-page-now/4968

from cocoa-hugo-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.