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

Document proper directory names when working with Hugo #98

Open
Cli4d opened this issue Nov 22, 2023 · 1 comment
Open

Document proper directory names when working with Hugo #98

Cli4d opened this issue Nov 22, 2023 · 1 comment

Comments

@Cli4d
Copy link
Member

Cli4d commented Nov 22, 2023

There needs to be a caution on having whitespace in directory names when working with Hugo.
There is an error generated when whitespace is left in the directory names when creating a Hugo site to preview changes. e.g. "work project/docs" will cause an error. It should be "work-project/docs". Or any other way that does not involve the white space.

This needs to be highlighted in the docs ReadMe.

image

@Cli4d Cli4d changed the title Document handling of directory names when working with Hugo Document proper directory names when working with Hugo Nov 22, 2023
@MattiSG
Copy link
Member

MattiSG commented Nov 22, 2023

Thanks for reporting!

I can't reproduce this issue under macOS:

› pwd
/Users/opentermsarchive/Desktop/folder with spaces/docs copy
› npm run  start:dev
> [email protected] start:dev
> hugo serve --watch --logLevel debug --disableFastRender
Built in 855 ms
Environment: "development"
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) 
Press Ctrl+C to stop

Could you please try running with npm run instead of using hugo directly?

If that solves the problem, then please close this issue.
If that does not, please check that there is no open issue on the hugo source repository.
If neither, then you can either close this issue considering that this report is helpful enough for others, or open a pull request to add a small note in the README regarding usage of spaces on Windows 🙂

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