The simple solution:
jekyll serve command:
$ bundle exec jekyll serve --host $(hostname -I)
Then point Chrome to this address:
I’m glad you asked! This is a good opportunity to learn a bit more about how ChromeOS works under the hood.
Maybe you followed the Quickstart Jekyll Guide (or a similar routine) without any issues, but got stuck when trying to view the site in the Chrome browser.
jekyll serve starts the server on
127.0.0.1:4000. However, the
Chrome browser and the Linux Terminal
are basically running on different machines.
Chrome does not know about localhost on the Linux Terminal.
In order for the two to communicate with one another, we have to go through an acceptable channel. Ater Chrostini 69.0.3486.0 the following method for resolving Linux container hostnames was introduced for the browser. These follow the pattern:
This means the problem can be solved by hosting the Jekyll server on a hostname and port the browser can listen on.
On my machine:
$ hostname penguin $ hostname -I 100.115.92.202
When we run
jekyll serve on this host:
--host $(hostname -I) and the default port,
we can point the Chrome browser to
resolve to the Jekyll server!