Maths not rendered

I’m writing a blog on maths but the maths do not render in hugo localhost even though when I run the markdown locally, they are well displayed.
Can you help me please ?
Code at GitHub - MLExplora/Hugo_site
Thanks !


Please use the theme’s discussion board if you have additional questions.

Thanks for the answer, it worked well.
However how come the about section is completely ignored by hugo when building the website ?

It is not. Visit http://localhost:1313/about/.

If you are asking why it doesn’t appear on your home page, see:

To add it to your home page:

mainSections = ['posts','about']

The theme author has covered this in the documentation:

I suggest you carefully read that documentation before posting more questions.

Thanks for the answers.

I’ve tried asking in their discussion forum but they dont seem to reply to recent posts so I’ll try here if anyone got the answer. I am trying to scale and center an image however they are not rendered when coded in HTML.


<div style="text-align: center;">
  <img src="../../images/kookaburra.jpg" alt="Cool kookaburra" width="800"/>
  <p><em>Figure 1: Cool kookaburra</em></p>

This HTML does not render the image no matter the image path while

![Alt text](../../images/kookaburra.jpg)

renders the image but I’m not aware of how one centers and scales in this format.

Can you help me? Code at


Three dots in a path don’t make any sense. Your question “how one centers” is related to CSS. Scaling can be performed with Hugo’s Resize method.

Your original question was about Math rendering – not about images. OTOH, your repository doesn’t show the code you’re posting here (no image reference in about_me nor post1/post2). Please make it easier to help you.

And enclose code in three backticks like so
code goes here
That way, it’s easier to read and copy/paste.

Thanks for answering,
Here is

title = 'Post1'
date = 2023-12-18T17:41:37+01:00
draft = false
math = true

This is not rendered 
<div style="text-align: center;">
  <img src="../../images/kookaburra.jpg" alt="Cool kookaburra" width="800"/>
  <p><em>Figure 1: Cool kookaburra</em></p>

But this is rendered 

![Alt text](../../images/kookaburra.jpg) 

I’ve updated the git with the necessary files to reproduce the error but here’s a screen of the local site :

Compare the paths to the images in your browser’s deveoper tools. Hugo does transform the paths given in MD, and that has already been the issues of many posts here.

If you want to include HTML within your markdown, change your site configuration:

unsafe = true

It’s not unsafe if you control the content.

Note that you need to be careful with indentation and blank lines when mixing HTML with markdown; the rules/specifications are somewhat complex.

That solved it,

1 Like

A post was split to a new topic: Help with GitHub Pages deployment

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