Help generating new site


I have been using Hugo for a few years, however I am just a simple user. I used the Hyde theme but now I which to change for another theme, minimalist: GitHub - ronv/minimalist: Minimalist is content focused, minimal theme for Hugo

However it doesn’t seem to work as usual. If I follow the Hugo Quickstart Quick Start | Hugo I can’t generate my site properly.

After having created a new site with:

hugo new site quickstart
cd quickstart
git init

I then do:

git submodule add themes/minimalist

But when I apply the above command it downloads a full website infrastructure in the already created infrastucture of my just created site.

So I got lost and don’t know what I should do then.

Thank you for any suggestions.

I think your problem is that that repo isn’t really a theme but a full project, so you can’t install it like a theme. You could fork or download that repo and then delete all the content you don’t want, or pick a different theme that’s configured to be a theme. I’m partial to the XMin theme.

1 Like

This is not true.

Start over.

hugo new site quickstart
cd quickstart
git init
git submodule add themes/minimalist
echo "theme = 'minimalist'" >> config.toml
mv themes/minimalist/content/ .
hugo server

When you visit http://localhost:1313/ you will see:

Remove the sample content by deleting the markdown files from the content/writing directory.

Add new content with:

hugo new writing/

But make sure you change the value of draft in front matter to false when you are ready to publish, or run hugo with the -D option.


You’re right more or less. But I think a theme is just layouts and the bare minimum config and static files, and without content or data. As a user I should be able to update a theme to the latest by updating the Hugo mod or the git submodule and not have to deal with any content that I’ve moved or deleted earlier.

Might as well fork that repo or download and create a new repo, but then it’s not really a theme, it’s a whole new project.


Thank you. I checked the XMin theme, it is a nice theme too!

Thank you very much, it worked.

I am back, because it doesn’t work. It worked once and now I have errors…

This is the root of my website:


My posts are in minimalist-main/content/writing/

My pictures are in minimalist-main/static/xxx.jpg

This is my config.yaml:

baseurl: ‘
languageCode: en-us
title: Mon blog!
theme: osm
googleAnalytics: “”
disqusShortname: “”
preserveTaxonomyNames: true
footnotereturnlinkcontents: :leftwards_arrow_with_hook:
disableHugoGeneratorInject: true
pluralizeListTitles: false
pygmentsCodeFences: false
pygmentsUseClasses: false
minify: false
paginate: 9999

  • section
  • categories
  • tags

writing: /:year/:month/:day/:slug/

description: “Minimalist theme for Hugo”

author: Example
github: ‘
facebook: ‘
sitename: Minimalist
twitter: ‘@twitter

changefreq: monthly
filename: sitemap.xml
priority: 0.5

mediatype: application/rss
baseName: atom
mediatype: application/json
baseName: feed

I added the osm theme ( in the theme folder with:

git clone themes/osm

then adding ‘theme: osm’ in the above config.yaml. (I need it to add maps in my posts).

I then run hugo server :

hugo server
Start building sites …
hugo v0.101.0+extended linux/amd64 BuildDate=unknown
WARN 2022/09/09 01:29:20 The google_news internal template will be removed in a future release. Please remove calls to this template. See for additional information.

               | EN  

Pages | 39
Paginator pages | 0
Non-page files | 0
Static files | 41
Processed images | 0
Aliases | 9
Sitemaps | 1
Cleaned | 0

Built in 202 ms
Watching for changes in /home/xxx/sites/minimalist-main/{archetypes,assets,content,layouts,static,themes}
Watching for config changes in /home/xxxx/sites/minimalist-main/config.yaml
Environment: “development”
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/blog/ (bind address
Press Ctrl+C to stop

It opens ok at http://localhost:1313/blog/ :


However images don’t show, just the description:


They should show up as in my .md file I have, e.g :


And when I click on the blog title, instead of going back to my homepage I go to a ‘404 page not found’ message (at http://localhost:1313/ and not http://localhost:1313/blog/).


What can be wrong?

Thank you.

Screenshots are not very helpful.

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.


Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

1 Like

You are right :slight_smile: Here is a .zip of my project:

You are serving your site from a subdirectory.

baseurl: ''

But you are trying to access your images from the root of the host:

![wuhan album 1](/wuhan-album-1.jpg)

If you’re going to keep your images in static, you need to do this instead:

![wuhan album 1](/blog/wuhan-album-1.jpg)

But I recommend using page bundles instead:

├── wuhan-album-1.jpg
├── wuhan-album-2.jpg
└── wuhan-album-3.jpg

Then the photos are relative to the content:

![wuhan album 3](wuhan-album-3.jpg)

Finally, some themes are not designed to accomodate serving the site from a subdirectory.

1 Like

Thank you! I will follow your advice and use page bundles.

And what about the baseurl: ‘’ in my config.yaml ?

Currently when I click on the home link on top of my articles I go back to a “404 page not found” instead of my home page.

In layouts/partials/header.html, replace

<a href="/">


<a href="{{ site.Home.RelPermalink }}">
1 Like

Thank you very much for your help.

Could you explain what {{ site.Home.RelPermalink }} does instead of / ?

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