hexo-theme-cactus icon indicating copy to clipboard operation
hexo-theme-cactus copied to clipboard

Fixed NaN error in archive.ejs

Open HomayoonT opened this issue 2 years ago • 2 comments

Fixed NaN error message in archive.ejs. Particularly shown in archive page.

Image before fixing the bug

Before

Image after fixing the bug

After

In addition, fixed span#actions element direction for RTL languages. The direction does not need to be changed, the current styling after making the theme's direction RTL by using RTL languages messes up the action element as shown in following pictures.

Before fixing span#actions

Before

After fixing span#actions

After

The bug is successfully fixed and it has been tested for RTL languages(Persian language) as shown in the pictures above.

HomayoonT avatar Aug 01 '22 13:08 HomayoonT

Could you explain why and when the bug occurs? Is this something specific for non-western dates?

probberechts avatar Aug 01 '22 14:08 probberechts

Could you explain why and when the bug occurs? Is this something specific for non-western dates?

I am not fluent with hexo API, it took some time till I figured out the issue. I think you can reproduce the problem, I thought it might be good idea to report the issue anyways. When the bug occurs? Basically, I setup the cactus template after cloning it. Changed language in theme's _config.yml to fa and added a few sample persian posts. P.S. It does not seem to be specific to non-western dates. As you see in the pictures above, the dates are western dates only their representation (numbering system) on my OS is set to print them in persian numerals.

HomayoonT avatar Aug 01 '22 14:08 HomayoonT