Jekyll Snippets21 Jan 2017
Some quick solutions when using Jekyll to generate static sites.
How to serve Jekyll on the local network?
In order to serve your site on the local network you can run
jekyll serve -w --host=0.0.0.0
In order to figure out the IP address of the site on a Windows machine, you can use the command
ipconfig in cmd and search for the network you use currently. For example search in Wireless LAN adapter Wi-Fi for Ipv4 when you want to access the site on your phone or other machine from your WiFi network.
I found the solution on Stack Overflow
How to run multiple Jekyll sites on the local network?
By default Jekyll serves the site on port 4000. In order to run multiple sites simultaneously, each site needs to be served at a different port. This can be done by setting the port flag
jekyll serve -w --port 3000
The port can be also specified in the
_config.yml file, by adding the Local Server Port with the option
port: 3000. Further options can be found in the Jekyll configuration.
How to create Jekyll Blog Posts with Jupyter Notebooks
It is possible to create Jekyll blog posts with Jupyter notebooks by simply converting the notebook to markdown.
jupyter nbconvert jekyll-notebook.ipynb --to markdown