Changing content in the index.html file

Hey Guys!

I am editing my index.html file that uses Hugo, but when I run the web all the text that I’ve edited go back to how they were! I can change somethings, but some I can’t change!



If your index.html is generated from, the behavior is to be expected. If not, you might want to explain in more detail what you’re doing. For example, what you do to “run the web” – sounds intriguing :wink:

<!DOCTYPE html>
	<meta name="generator" content="Hugo 0.87.0" />
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="alternate" type="application/rss+xml" href="/index.xml" title="">
    <link rel="stylesheet" href="/css/style.min.css">

<body><header id="banner">
    <h2><a href="/"></a></h2>
<main id="content">
<ul id="posts">
    <a href="/posts/hello/">
        <small><time>Jan 1, 0001</time></small>


        </main><footer id="footer">

This is my code, for some strange reason it doesn’t let me change the text that says posts! I could manage to do it before, but I don’t remember how I did it.

It does not help to post an HTML file that you can’t change. As I said before: if Hugo generates it from an MD file, it would be quite pointless to change the HTML, since any changes will be overridden by the next execution of Hugo. Change the MD file, not the HTML. And try to get a more profound understanding of how and what Hugo does.

Other than that, “I can’t change” could be related to, for example, file permissions. Not on-topic here, though.

1 Like

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