Closed rjc123 closed 1 week ago
I think we have had this discussion before, and I think the argument against it was that it wasn't a good/simple multi platform way to do this. But I see now that this exists, which looks solid enough:
https://github.com/pkg/browser
As to flags, I would suggest we go for -O (uppercase). I have tried to make it lowercase=configuration, uppercase=actions. Some of the uppercase are a little bit borderline, but I think it makes sense.
So:
hugo server -O
As a not-very-technical hugo user I would like to generate my site locally to test (heavily using
hugo server -D
) and see it immediately upon build in a local browser. So that I can review it works as I would have expected.hugo server -D && open http://localhost:1313
doesn't function, as it requires the server command to complete before opening the browseropen http://localhost:1313 && hugo server -D
does function as needed, but doesn't match the order one would think about these things.The best result would be
hugo server -D -o
-- so that the browser opens to the localhost immediately on the first build of the site, leaving the server running.