# Hugo rendering not properly rendering markdown in {{ .Summary }} on Github pages but is rendering it properly on localhost

**URL:** <https://discourse.gohugo.io/t/hugo-rendering-not-properly-rendering-markdown-in-summary-on-github-pages-but-is-rendering-it-properly-on-localhost/54656>\
**Category:** support\
**Created:** [May 7, 2025, 3:31am UTC](https://discourse.gohugo.io/t/hugo-rendering-not-properly-rendering-markdown-in-summary-on-github-pages-but-is-rendering-it-properly-on-localhost/54656 "2025-05-07T03:31:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kishenarayan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kishenarayan/32/24519_2.png) [@kishenarayan](https://discourse.gohugo.io/u/kishenarayan)\
**Post date:** [May 7, 2025, 3:31am UTC](https://discourse.gohugo.io/t/hugo-rendering-not-properly-rendering-markdown-in-summary-on-github-pages-but-is-rendering-it-properly-on-localhost/54656/1 "2025-05-07T03:31:46Z")

</div>

I recently created a new hugo theme (here is a link to the repo [GitHub - kishenarayan/drishtikon](https://github.com/kishenarayan/drishtikon)) and I have successfully been able to use it as a submodule for the theme of my personal blog (which I am hosting through github pages linked here: [https://kishenarayan.github.io/](https://kishenarayan.github.io/)).

The main issue is that when I use hugo server to see my site on localhost, the links on the writing page under research to ArXiv and Google Scholar render as links. These links are the summary for a project which is written in markdown (you can find the file in content/writings). However, when I then push the changes to github and deploy using github pages, none of the markup which was defined in the markdown files comes through. I have attached the images below of this discrepancy.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/9/8/9888245fcca4e93aed430000a5048bb51d4a9136.png)  
Here is what it should look like and what is being shown in the localhost.

 ![Screenshot 2025-05-06 223654](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/1/8/1866325d2c23f52d57c45060556ac7c480ff0bb9.png)  
Here is what I am seeing on github pages.

When browsing through past topics, I first thought it was a CRLF vs LF issue, but after changing those settings on my editor (I am using IntelliJ IDEA Community Edition on a Windows laptop), nothing changed. Any ideas on how to resolve this?

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [May 7, 2025, 6:26am UTC](https://discourse.gohugo.io/t/hugo-rendering-not-properly-rendering-markdown-in-summary-on-github-pages-but-is-rendering-it-properly-on-localhost/54656/2 "2025-05-07T06:26:11Z")

</div>

Your github action builds with v0.128.0, so the `.Summary` returns plain text.  
guess you are building locally with a more recent version.

HTML rendering has been added in [v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0)

update your github action to use the _same_ version you use in development.

Some other things:

- don’t use quotes in markdown links: `[ArXiv]("https://arxiv.org/")` instead use: `[ArXiv](https://arxiv.org/)`
- you have content in repo and theme (dunno if that’s for testing but usually your theme should not have a content folder) → move needed content from theme to content repo
- using github actions to build and publish, there’s no need (and it may have unexpected results) to commit `public`, `resources`, … and others  
I would cleanup that in **both** the content and the theme repo

```auto
git rm -rf public/   
git rm -rf resources/*   
git rm .hugo_build.lock

```

create or add this to your .gitignore (both repos) (typical content for hugo)

```auto
.hugo_build.lock
node_modules/
public/
resources/

```

commit and push (both repos)

```auto
git add -A
git commit -m "cleanup build generated stuff"
git push

```

---

<div class="post-metadata">

**Author:** ![kishenarayan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kishenarayan/32/24519_2.png) [@kishenarayan](https://discourse.gohugo.io/u/kishenarayan)\
**Post date:** [May 7, 2025, 7:45pm UTC](https://discourse.gohugo.io/t/hugo-rendering-not-properly-rendering-markdown-in-summary-on-github-pages-but-is-rendering-it-properly-on-localhost/54656/3 "2025-05-07T19:45:33Z")

</div>

Thank you so much! This resolved my issue.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [May 9, 2025, 7:46pm UTC](https://discourse.gohugo.io/t/hugo-rendering-not-properly-rendering-markdown-in-summary-on-github-pages-but-is-rendering-it-properly-on-localhost/54656/4 "2025-05-09T19:46:34Z")

</div>

Closed on May 9, 2025, 7:46pm UTC

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