Hello,
I’ve a laptop with dual boot, Windows and Mac, and when I run the command hugo server on Mac everything is fine I can access localhost:1313 but when I do this in Windows I only see a blank page
That’s because “localhost” means just that — it’s only on that “local” device. A command that lets other devices on the same LAN see it (usually) is:
hugo server --bind=192.168.254.12 --baseURL=http://192.168.254.12:1313
…and then point your devices’ browsers to http://192.168.254.12:1313
Is it a true dual boot? With Windows installed directly on your Mac?
Or is it a Mac with a Windows VM?
Nop man, I have Windows and MacOS in a HP laptop… it’s basically a Hackintosh, you can Google It and you’ll find how to do it if you’re interested
I’m familiar. Just asked that question because it would affect how you use hugo server
as @bwintx mentioned
How is Hugo installed on your Windows setup?
Where are your site files stored? Do you have two copies, one for windows and the other for MacOS (and use GIT to keep in sync)? Or are they stored on a partition which is accessible from both Windows and MacOS?
I’d installed with choco directly on PowerShell. I have only one site and about the directory is different in both OS, I mean I do not use the same archive
My guess is there’s something wrong with the hugo site on your Windows install. Does it give any errors or warnings?
There is a Warning : found no layout file for “HTML” for “home”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination. But man, I maintain this directory by git so there is no sense to run in Mac and in Windows not
This would explain why your homepage does not display.
But how to solve it? I mean, my theme is correctly installed and it is the same way in Mac, but in Mac it works
There is something different between your Mac and Windows sites. If you share your code, we can rule out if it’s a site-specific issue.
But my hunch is that the issue is elsewhere.