You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been building up my website, starting from the Hugo Academic template.
I tried modifying the landing page style, but found it more difficult to modify the existing one, and it's actually easier to make my own style using a raw HTML file.
The following is the part of the customized HTML that I want to use.
Here is my question:
When I try this code under content/about/index.html, this code works well and shows the contents under the menu "about".
What I want to do is to show this page as the landing page.
I did some research and felt that changing the landing page itself can be quite tricky.
So I tried customizing the landing page itself but then it screws up.
If I change the content/_index.md to conent/index.html to put my customized HTML code, the landing page itself shows well but the navigation link on menu tab is screwed up. Is there a way to fix the url link for other tabs? For instance, the previous menu tab had url link as url: '/About'. It's going to be great if I can simply fix these url links to other tabs.
Another option is to keep the content/_index.md and override the existing template. Is there a way to keep the existing formatting (e.g., background colors, navigation menu, etc) and just add content? I tried adding layouts/index.html but then the existing formatting is all gone. To me, overriding the whole landing page seems to be quite difficult to work with.
My current content/_index.md file looks like this:
---
# Leave the homepage title empty to use the site title
title: ''
date: 2022-10-24
type: landing
---
I don't want to use existing hugo blocks. I am trying to find ways to add my customized HTML codes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all!
I've been building up my website, starting from the Hugo Academic template.
I tried modifying the landing page style, but found it more difficult to modify the existing one, and it's actually easier to make my own style using a raw HTML file.
The following is the part of the customized HTML that I want to use.
Here is my question:
When I try this code under
content/about/index.html
, this code works well and shows the contents under the menu "about".What I want to do is to show this page as the landing page.
I did some research and felt that changing the landing page itself can be quite tricky.
So I tried customizing the landing page itself but then it screws up.
If I change the
content/_index.md
toconent/index.html
to put my customized HTML code, the landing page itself shows well but the navigation link on menu tab is screwed up. Is there a way to fix the url link for other tabs? For instance, the previous menu tab had url link asurl: '/About'
. It's going to be great if I can simply fix these url links to other tabs.Another option is to keep the
content/_index.md
and override the existing template. Is there a way to keep the existing formatting (e.g., background colors, navigation menu, etc) and just add content? I tried addinglayouts/index.html
but then the existing formatting is all gone. To me, overriding the whole landing page seems to be quite difficult to work with.My current
content/_index.md
file looks like this:I don't want to use existing hugo blocks. I am trying to find ways to add my customized HTML codes.
Thank you all for your attention and help!
Beta Was this translation helpful? Give feedback.
All reactions