Access Jekyll local server remotely

Posted on: 7th March 2021

Yesterday I found myself in need of checking out how this blog renders on a Kindle browser while running some tests for on the Paperwhite. A quick search on the internet and I was checking out my pages on the Kindle, desktop and the iPhone while making changes locally on the desktop.

Jekyll runs a local server with jekyll serve on the desktop. By default it runs on the address which is accessible only by the machine its running on. To access it on devices on the same network, one just needs to pass along: jekyll serve --host= and the jekyll server becomes available at http://<ipaddressofthelocalmachine>:4000. To avoid passing along the host parameter every time we start the server, add an entry in the _config.yml file for host: This configuration never gets picked up in the build.

Checking out my blog this way on the Desktop, iPhone and the Kindle while working on it was helpful in finding issues that weren’t obvious immediately. The pre and highlight styles for the dark mode were not working on the iOS until I used a filter for brightness instead of background-color. The search bar close button refuses to change color in iOS dark mode. The top border on my footer won’t switch to dark mode style on iOS no matter what I tried, while on desktop it worked fine. I haven’t been able to find a fix for the last two yet. On the Kindle, the main section was pushed all the way to the left without any margin. Trying to find a fix for that led to learning how to truly set main in the center which came in handy to fix display on the Kindle.

These are minor issues that probably doesn’t need this much attention 😅 but makes this blog a tiny bit more accessible, even on a Kindle.

Day 90 - Join Me in #100DaysToOffload

tags: 100daystooffload jekyll