RSS

Posts in 2021

  • Tips on Hugo SEO

    Last Update: in Hugo

    Tips on Hugo SEO (Search Engine Optimization). Add describe metadata, link build, handle external link, lighthouse SEO checklist etc.

    Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. However the default hugo template does not take too much consideration on SEO. Here are some tips to …

    Read more

  • Custom hugo RSS template

    Last Update: 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

    Last Update: 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

    Last Update: 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