RSS

Posts in 2021

  • Custom hugo RSS template

    May 05, 2021 in Hugo

    Custom hugo RSS content. Add lastBuildDate to show the page last modification time. Make a custom description like adding image, use description field instead of summary or content.

    Hugo ships with its own RSS 2.0 template, it generated the RSS feed file as index.xml and embedded into index.html header. e.g. {{ range .AlternativeOutputFormats -}} {{ printf `<link rel="%s" type="%s" href="%s" >` .Rel …

    Read more

  • Hugo troubleshooting: execute of template failed: can't give argument to non-function

    May 04, 2021 in Hugo

    render of “page” failed: execute of template failed: can’t give argument to non-function …

    Symptom After upgrade hugo from 0.62.2 to 0.79.1 and run hugo build got following error: $ HUGO_ENV="production" hugo Start building sites … ERROR 2021/05/05 15:01:35 render of "page" failed: execute of template failed: template: …

    Read more

Posts in 2020

  • hugo-page-lastmod

    February 13, 2020 in Hugo

    Use .GitInfo or .Page.Lastmod as last update date in hugo page

    Use .GitInfo or .Page.Lastmod Hugo have build-in support to get the last Git revision information for every content file. To enable Hugo get git commit info, first need change enableGitInfo to true in config.toml: Page.Lastmod is fetched from …

    Read more