How Add Persian calendar to Hugo?


is there a way to use the Persian calendar in Hugo? Or tell me if you have a solution to this problem.


No there isn’t.

Is there a way that when I enter the dates of each post manually, I can use the date in different places?

author: Hugo Authors
title: Hugo
date: 1400/09/23
description: Hugo
  - syntax
math: true

Hugo uses the upstream Go time package that provides calendrical calculations based on the Gregorian calendar.

So even if you manually entered the Persian dates in your content files, Hugo would not be able to display page lists by the Persian chronological order.

Of course if someone has come up with a workaround hopefully they will post about it.

Is it possible to automatically convert html files to Persian calendar using npm packages like this GitHub - jalaali/jalaali-js: JavaScript functions for converting Jalaali and Gregorian calendar systems to each other when outputting from Hugo? Or tell me if you have a good solution.

Hugo is a static site generator written in Go, therefore you cannot control its output via JS.

Perhaps you might have luck outputting the dates you need on the front end via JS.

I’m afraid that there is no good solution at the moment.

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