I would like to create a site with hugo.
In the installation phase, I am stuck with an error message. Could you please help me?
Thanks in advance.
Here is the message:
Deltas resolution: 100% (1467/1467), done.
m9@m9-Lenovo-B50-50:~$ echo “theme = ‘ananke’” >> config.toml
m9@m9-Lenovo-B50-50:~$ hugo server
Error: add site dependencies: create deps: failed to create file caches from configuration: mkdir /tmp/hugo_cache/m9: permission denied
m9@m9-Lenovo-B50-50:~$ hugo new site quickstart
Error: /home/m9/quickstart already exists and is not empty. See --force.
In short, rename or remove the previous folder first, and then perform the commands you posted should work.
mv quickstart quickstart-bak
hugo new site quickstart
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> config.toml
You’re performing the same commands on the same folder multiple times, and the echo "theme = 'ananke'" >> config.toml appends the content at the end of the config file, so that there are multiple theme key inside the configuration, which is not allowed. You can fix it by one of following ways:
Rename or remove the previous folder.
Modify the config.toml to remove the duplicate theme keys.