Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start 'hugo server' after following the 'Create a new site: start with a prepopulated site' instructions #2142

Open
juanchax opened this issue Dec 12, 2024 · 1 comment

Comments

@juanchax
Copy link

The repo cloned when following the docs seems to be out-of-date, there's no hugo.toml file but rather a hugo.yaml file.

Image

vs

Image

Issue

When using this cloned repo, I hit an endless number of errors, this one as well as this other one; and was unable to successfully run hugo server.

Running the suggested solutions did nothing to solve the issue tho.

My solution

I was lucky enough to stumble upon a different branch of the repo, so I started from scratch, followed the docs, and before running and previewing my site, I just:

  1. renamed hugo.yaml to hugo.old.yaml
  2. created a new hugo.toml file
  3. copied the contents of the hugo.toml file and pasted them into the file created in 2.

After this, everything seemed to work as the docs suggested.

Hope this helps -- and I apologize if everything I hit was caused by an issue between the chair and the computer, Hugo rookie here.

@wismann
Copy link

wismann commented Dec 15, 2024

Hello juanchax,

The repo cloned when following the docs seems to be out-of-date, there's no hugo.toml file but rather a hugo.yaml file.

Quite the opposite, actually! Hugo can work with yaml, toml and json config file formats. It has been decided that the default for docsy is yaml (see #951). And as such the config file in recent releases of the docsy-example is hugo.yaml.

I think the problem is in the documentation, all commands referring to hugo require a hugo installation in your PATH environment. But the example brings its own hugo version as npm package.

The example runs as follows:

git clone --depth 1 --branch v0.11.0 https://github.com/google/docsy-example.git my-new-site
cd  my-new-site
npm install
npm run serve

I think half of the people having problems getting docsy up and running are having problems because their local hugo installations are outdated, don't match the requirements of the docsy-example or are simply nonexistent.

I will open an issue to get the docs fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants