Giter Site home page Giter Site logo

Date format about hugo-nederburg-theme HOT 3 CLOSED

appernetic avatar appernetic commented on May 29, 2024
Date format

from hugo-nederburg-theme.

Comments (3)

rdiaz02 avatar rdiaz02 commented on May 29, 2024 1

(Take this with many grains of salt, since I am a total newby with hugo and go): I had the same problem, but got it solved (taking ideas from https://discourse.gohugo.io/t/parsing-dates-in-templates/603/10) by:

  • in config.toml I added , under [params], DateForm = "2 January 2006"
  • in single.html, after .Date.Format I removed to string and now have: {{ .Date.Format .Site.Params.DateForm}}

And it now works (with the added virtue of allowing me to change the display format by simply changing the config).

from hugo-nederburg-theme.

emoro avatar emoro commented on May 29, 2024

It worked!! Many thanks. Strange that you have to get it through a parameter instead of the actual value.

from hugo-nederburg-theme.

 avatar commented on May 29, 2024

Great solution! Putting it in the backburner for a PR..

from hugo-nederburg-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.