Maths not rendered

Hello,
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 !

See https://github.com/adityatelange/hugo-PaperMod/issues/236.

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 ?
Thanks

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

If you are asking why it doesn’t appear on your home page, see:
https://github.com/adityatelange/hugo-PaperMod/blob/master/layouts/_default/list.html#L43-L44

To add it to your home page:

[params]
mainSections = ['posts','about']

The theme author has covered this in the documentation:
https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#posts-from-only-one-foldersection-visible-on-home-page

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.

Example:

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

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 https://github.com/MLExplora/Hugo_site.

Thanks

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 post1.md

+++
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>
</div>

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:

[markup.goldmark.renderer]
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,
Thanks!

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.