Jekyll Serve | Table O Contents

GitHub publishes a current list of dependency versions for GitHub Pages, Ruby, and Jekyll …

Note. The Flammarion Logo Badge in the page header above is an .svg image file set to the dimensions of 5% width, auto height, and zoom. Go ahead and test the zoom-out feature by hovering over the badge to engage the expansion of the image.

Integrated Terminal

Hint. Jekyll server statements may be entered from the Integrated Terminal view of your target repo’s open docs folder in Visual Studio Code.

Visual Studio Code

From the main menu of Visual Studio Code, engage the File, New Window feature …

And, navigate to the local (location) of your first targeted repo that you wish to operate upon.

Note One. Because the Jekyll server we will be serving (.md) files from the pages subfolder of your repo’s docs folder by default …

Be sure to target the docs folder of your first targeted repo selection for opening.

Note Two. You may always set up a separate instance of the Jekyll server from the root folder of your first targeted repo selection …

If you need to perform an operation over any of the other files or folders of your first targeted repo’s local root folder.

Jekyll Version

To check the version of Jekyll you have installed globally on your development machine …

– Type the following shortcut -v statement derived from the Jekyll --version switch, as follows:


jekyll --v

Returns,


jekyll 3.4.3

Before including any dependency in the Bundle install or Bundle update task for your repo …

Please check the current dependency list over at Git Hub prior to applying any dependencies to your repo.

Default Port = 4000

To engage the Jekyll server via a separate tab through your Chrome browser window …


jekyll serve --watch --baseurl ""

The above Jekyll statement will automatically open up a new tab in your Chrome browser window via the serve command and the accompanying set of designated switches.

Jekyll Switches

In this case, the --watch and baseurl switches are engaged.

The watch switch shows no immediate parameter

While, the baseurl switch shows the the empty string "" as its one immediate parameter.

Note. The following URL is the default address of the Jekyll server instance, as follows:


http://localhost:4000/

Open Sez-A-Me

Served locally, you will now see the docs folder of your first targeted repo open in a separate instance of the Jekyll server via the default address of the automatically opened Chrome browser window tab.

This will allow the end-user (developer) to make changes to the underlying (.md) pages …

And, then view those changes locally via their development machine PRIOR to uploading the changes to the Git Hub server farm via Git Hub Desktop.

Note. If you wish to host multiple doc repos over multiple instances of the Jekyll server through separate tabs of your Chrome browser window …

Then, you must manually dedicate the port in your opening Jekyll serve command statement.

Set Port = 4001

The --port switch in Jekyll requires the target port as its immediate parameter, as follows:


--port 4001

In the first targeted repo example above, the Jekyll command statement defaulted to a switch of --port 4000 implicitly.

To include a 2nd tab and 2nd instance of the Jekyll server within our now open Chrome browser window …

Note. For further review, see the Jekyll --help switch.

Jekyll Help

To engage the Jekyll --help switch from an open Terminal window …


jekyll --help

Jekyll Docs

To start a local server for the Jekyll documentation …


jekyll docs

And, up pops a local iteration of Jekyll Docs served through the implicit default --port 4000.

Serve Switches

To review the optional switches for the serve command in Jekyll …


jekyll help serve

Serve Statement #2

To engage the Jekyll server via a separate tab through your Chrome browser window …


jekyll serve --watch --baseurl "" --port 4001

Now, manually open up a new tab in your Chrome browser window and set the address to the following URL …


http://localhost:4001/

You will now see the second targeted repo open in a separate instance of the Jekyll server under a separate tab of your Chrome window browser.

Note. If you wish the new and separate tab of your Chrome browser window to open automatically …

Then, set the following -o shortcut derived from the Jekyll --open switch, as well.

As follows,


jekyll serve --watch --baseurl "" --port 4001 -o

Last Subtitle

More to come …


Note. The above synopsis was derived from an article written by Blank Author [1].

  1. A Narrative of Psychology by Blank Author, Jan #1999

Support

Please support the co-workers who aggregate the Source Links for our projects.

Patreon

Like what you see in this project? If so, then support the authors and machine-elves who aggregate the source links and pages for our projects via Patreon.