Skip to main content

Command Palette

Search for a command to run...

Hugo "Hello World"

Updated
1 min read

When you make a Hugo quickstart, you were suggested to download a theme, but you don't have to. So this is how to create a simple bare Hugo site. Here's how to do it.

  1. create a new site with hugo new site quickstart command (you can change the quickstart with another name)

  2. create an _index.md the content folder with the command hugo new _index.md. Here is the content:

     ---
     title: "Home Grown Post"
     date: 2023-02-14T07:49:43+07:00
     draft: true
     ---
    
     Hello, World!
    

    you can name the title into whatever you want

  3. create an index.html in the layouts folder, here's the content:

     <html>
       <head>
         <title>{{ .Title }}</title>
       </head>
       <body>
         <h1>{{ .Title }}</h1>
         {{ .Content }}
       </body>
     </html>
    
  4. use the command hugo to compile it

  5. use the command hugo server -D to run it

it will look like this

the source is available on my GitHub