<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alison Johnston on Medium]]></title>
        <description><![CDATA[Stories by Alison Johnston on Medium]]></description>
        <link>https://medium.com/@chookie?source=rss-b772ca3c6e04------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1VsO50dgxKs82hmtF5ZiEg.png</url>
            <title>Stories by Alison Johnston on Medium</title>
            <link>https://medium.com/@chookie?source=rss-b772ca3c6e04------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 08:45:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chookie/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Easy Linux GUI Applications on Windows 10]]></title>
            <link>https://chookie.medium.com/easy-linux-gui-applications-on-windows-10-ed7d39f5b055?source=rss-b772ca3c6e04------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed7d39f5b055</guid>
            <dc:creator><![CDATA[Alison Johnston]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 15:10:38 GMT</pubDate>
            <atom:updated>2022-03-27T20:35:52.233Z</atom:updated>
            <content:encoded><![CDATA[<p>It is with mixed emotions that I publish an article showing why I no longer need to have a Mac for software development. As beautiful as the Mac is, it is hard to justify having one in a corporate since it is now completely possible and usable to have the best of both worlds. So all those cool apps that are only on Linux/Mac can now be run on Windows.</p><p>With WSL and an XWindows application you can now run your favourite Linux GUI applications side by side with your Windows applications, launching them both from the same taskbar. Your full Linux Pycharm using Linux python modules and docker in Linux (which is the only way for full Airflow development), running seamlessly alongside Windows Office.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*itATo-LrlZxr4JEpAxO-Bg.png" /><figcaption>Running Ubuntu GUI apps side by side with Windows Apps</figcaption></figure><h3><strong>Install WSL2</strong></h3><ul><li>Install WSL 2 and Ubuntu as shown on the <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">WSL installation guide</a>.</li><li>Once complete open a terminal and upgrade your ubuntu installation.</li></ul><pre>sudo apt update &amp;&amp; sudo apt upgrade</pre><h3>Install Windows Terminal</h3><ul><li>Though this is really option I strongly suggest you <a href="https://docs.microsoft.com/en-us/windows/terminal/">install the new Windows Terminal</a> for a better experience. It enables quickly switching between multiple Linux command lines, Windows Command Prompt, PowerShell, Azure CLI, search feature, and custom themes. You can also find Ubuntu desktop terminal themes online like my favourite <a href="https://docs.microsoft.com/en-us/windows/terminal/custom-terminal-gallery/raspberry-ubuntu">Windows Terminal Raspberry Ubuntu</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKeuFT1xfahuxHSnSuB1Ow.png" /><figcaption>Ubuntu Raspberry Terminal Theme</figcaption></figure><h3><strong>Windows X Server</strong></h3><p>This is where the magic happens that allows Linux GUI applications to run in a Windows window. It create a bridge between the 2 environments.</p><ul><li>As shown <a href="https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242">here</a> install the third-part display manager called <strong>VcXsrv Windows X Server</strong> available at <a href="https://sourceforge.net/projects/vcxsrv/">https://sourceforge.net/projects/vcxsrv/</a></li><li>Start the VcXsrv application.</li><li>Make sure you allow private and public access on the firewall options otherwise you will get no messages on why the GUI is not showing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/0*edaFhIPtaEXBgA5V" /></figure><ul><li>Choose all defaults except for “disable access control”. Make sure this is checked.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*sUqMwJxC7bbFP2cxhiTVMQ.png" /></figure><ul><li>On the next screen save a configuration file called “config.xlaunch” to %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup</li><li>This will ensure your XWindow starts on each startup.</li><li>Start a session now though but running that file.</li></ul><pre>%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\config.xlaunch </pre><ul><li>Edit ~/.bashrc to link WSL to the windows X Server. You can also add it to the /etc/bash.bashrc file if you just want it for multiple users.</li></ul><pre>nano ~/.bashrc</pre><ul><li>Add these lines:</li></ul><pre>export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk &#39;{print $2}&#39;):0<br>export LIBGL_ALWAYS_INDIRECT=1</pre><ul><li>Restart your WSL terminal.</li><li>You can test it works by running some ubuntu GUI utilities. Make sure you still have X Server running from the above step.</li></ul><pre>sudo apt install nautilus<br>nautilus ~</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hUrja8fryCNLYGX24FyZ3w.png" /><figcaption>Ubuntu xcalc app running on Windows</figcaption></figure><h3><strong>Pycharm &amp; Other IDE’s</strong></h3><ul><li>Download <a href="https://www.jetbrains.com/help/pycharm/installation-guide.html#standalone">Pycharm for Linux</a> standalone installation. (Make sure you choose the Linux tab as the default is Windows). Pycharm seems to like to have <a href="https://itsfoss.com/install-chrome-ubuntu/#install-chrome-terminal">Google Chrome installed</a> also</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_Zc7-gc_r6bUX4rwZYGig.png" /></figure><ul><li>Replace pycharm-*.tar.gz with the current version you download</li></ul><pre>sudo tar xzf pycharm-*.tar.gz -C /opt/<br>sudo ln -s /opt/pycharm-*/bin/pycharm.sh /usr/local/bin/pycharm</pre><ul><li>You should now be able to start Pycharm by typing pycharm from the terminal (Make sure you still have X Server running from the above step).</li><li>You can follow similar instructions for VS Code, Webstorm or any other GUI application.</li></ul><h3>NVM and PYENV</h3><p>Whilst unrelated to GUI applications I strongly suggest you use a version manager<a href="https://github.com/nvm-sh/nvm"> NVM for node</a> or <a href="https://github.com/pyenv/pyenv">PYVENV for python</a> rather than installing a fixed version globally. These tools allow you to have multiple versions of node and python installed and choose which version to use for which project and make upgrades easier.</p><h3>Launch from Windows Taskbar Shortcut</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*MeL0QmPUPkT_fuLy1nLaaw.png" /><figcaption>Run ubuntu and windows apps from the same taskbar</figcaption></figure><p>You can create icons on your windows taskbar that will start ubuntu apps. Here we are going to add Pycharm installed above.</p><ul><li>First ensure your Ubuntu distribution is the default distribution in WSL</li></ul><pre>wslconfig /l</pre><ul><li>If you have other distributions such as Docker then you may see this</li></ul><pre>Windows Subsystem for Linux Distributions:<br>docker-desktop (Default)<br>Ubuntu-20.04<br>docker-desktop-data</pre><ul><li>If so then in the above example run</li></ul><pre>wslconfig /setdefault Ubuntu-20.04</pre><ul><li>Now you should see</li></ul><pre>Windows Subsystem for Linux Distributions:<br>Ubuntu-20.04 (Default)<br>docker-desktop<br>docker-desktop-data</pre><ul><li>Create a folder</li></ul><pre>%HOMEPATH%\xwindows</pre><ul><li>Create a new file called pycharm.vbs and add this content</li></ul><pre>Set oShell = CreateObject (&quot;Wscript.Shell&quot;)<br>Dim strArgs<br>strArgs = &quot;C:\\Windows\\System32\\bash.exe -c &quot;&quot;export DISPLAY=`sed -n &#39;s/nameserver //p&#39; /etc/resolv.conf`:0;pycharm&quot;&quot; &quot;<br>oShell.Run strArgs, 0, false</pre><ul><li>Find a pycharm png image and <a href="https://www.freeconvert.com/png-to-ico">convert it to a windows icon</a> and save it in the xwindows folder.</li><li>In windows explorer open the location</li></ul><pre>%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar</pre><ul><li>Create a new text file called “pycharm.exe” removing the .txt extenstion. Leave this file empty. Select yes when asked to change extenstion.</li><li>Right click on the pycharm.exe and select “Add to taskbar”.</li><li>A new icon will be created just below your exe file.</li><li>Right click the new shortcut and change the target to</li></ul><pre>%HOMEPATH%\xwindow\pycharm.vbs</pre><ul><li>Also change the icon to the one you downloaded earlier.</li><li>Save and you should now have a new icon on your taskbar for pycharm.</li><li>You can delete the pycharm.exe file we created above, it was just temporary to create and register the shortcut properly.</li></ul><h3><strong>Linux Task Bar in Windows</strong></h3><ul><li>This is an optional step that gives you a full Linux task bar with a Ubuntu file explorer and a bunch of other Ubuntu apps as well as also allowing you to create shortcuts to your GUI apps. <a href="https://medium.com/@nandraj.rathod.009/how-to-add-xfce-4-panel-on-windows-10-desktop-with-wsl-c96019b295c1">Full instructions here</a>.</li><li>In a WSL terminal.</li></ul><pre>sudo apt-get update<br>sudo apt-get upgrade<br>sudo apt-get install xfce4 -y<br>sudo apt-get install xfce4-goodies -y<br>sudo apt install gnome-themes-standard -y<br>sudo apt install conky -y</pre><ul><li>Create a file called “xfce4-panel.vbs” on your desktop or anywhere you like with this content. Make sure you have the correct double and single quote characters.</li></ul><pre>Set oShell = CreateObject (&quot;Wscript.Shell&quot;)<br>Dim strArgs<br>strArgs = &quot;C:\\Windows\\System32\\bash.exe -c &quot;&quot;export DISPLAY=`sed -n &#39;s/nameserver //p&#39; /etc/resolv.conf`:0;xfsettingsd - sm-client-disable; xfce4-panel - sm-client-disable - disable-wm-check&quot;&quot; &quot;<br>oShell.Run strArgs, 0, false</pre><ul><li><strong>Optional</strong>: <a href="https://support.microsoft.com/en-us/windows/change-which-apps-run-automatically-at-startup-in-windows-10-9115d841-735e-488d-e749-9ba301d441e6#:~:text=Here%20are%20two%20ways%20you%20can%20change%20which,the%20Startup%20tab.%20(If%20you%20don%20...">Run this script automatically on Windows startup</a> as we did for XServer above to save you having to remember.</li><li>Double click the icon to start the taskbar. Click an icon to start that app.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*LW3j4-RTgDPGuB1pYysvYg.png" /><figcaption>Move the XCFE taskbar where you like</figcaption></figure><ul><li>This will add 2 tasks bars to the screen. You can move the 2 taskbars around by right clicking and selecting unlock. Also change the panel preferences.</li><li>Add your own custom icons on the taskbar as <a href="https://randomlinux.com/xubuntuxfce-adding-custom-quick-launch-tool-bar-launchers-4/">shown here</a>.</li><li>Right click the panel, select add new items, select launcher, add, close.</li><li>Back on your new item right click and select properties</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*VBbKkMrjRUN0sIXTTAYYhw.png" /></figure><ul><li>Add a new empty item</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*vN4kVm_wTKw_ca9u_cLMkw.png" /></figure><ul><li>Fill in the details</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*yaG-NzZi5YOdaSc46IYwPg.png" /></figure><ul><li>You have your new launch icon.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbbXwSwWFZyA192LDIoZHg.png" /></figure><ul><li>Play around, you can add icons to the application list also.</li></ul><h3>Optional: Install Docker on WSL</h3><ul><li>The latest version of Docker runs natively in WSL No more piping to Windows with all the associated issues.</li><li>Connect your pycharm or VS Code to docker.</li></ul><h3>Code Away in Ubuntu</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed7d39f5b055" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GraphQL API Driven Design]]></title>
            <link>https://medium.com/cardano/graphql-api-driven-design-da27c179ffd0?source=rss-b772ca3c6e04------2</link>
            <guid isPermaLink="false">https://medium.com/p/da27c179ffd0</guid>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Alison Johnston]]></dc:creator>
            <pubDate>Tue, 12 Nov 2019 15:47:34 GMT</pubDate>
            <atom:updated>2019-11-12T15:47:34.331Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Using API driven design with GraphQL to create mock data for a schema that is shared with the real data for a self documenting API.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ag-sXu01hNVs7J8XBX-Prw.png" /></figure><p>This article is not a <a href="http://graphql.org/">GraphQL</a> tutorial but rather focuses on the specific case of mocking data with GraphQL. It discusses some investigations I did into using GraphQL to rapidly create a mock service which helps the consumers and producers to rapidly agree up the api schema then use that exact schema to create provide the real data as well as a portal where users can try it out. If you know all about this stuff then jump to <a href="#setting-up-the-mocking">Setting up the Mocking</a> below, if not then read on to see how this is an efficient way to start projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*apC4ixplpw7dOutUkzPDTw.png" /><figcaption>GraphiQL allows you to easiy create and try your queries then copy the query to use as a standard json get request or post in your application.</figcaption></figure><h3>Why API Driven Design and Why Graph QL</h3><p>Just as in the case of interface driven design in the world of Java or C#, API driven design means before any code is written the schema of the API has been agreed upon. Providing mock data is quick and easy then allows the consumers to actually use the api and verify it is what they want. This also means that both UI development can start before the real service is ready.</p><p>In this sample both the initial mock is the start of the final service, it is the actual project. Because <a href="http://graphql.org/">GraphQL</a> uses a schema we create the schema and provide mock data then deploy where the UI developers can access it. Then the api developers start to fill out the real data using exactly the same schema. No chance of getting out of sync with the mock. If one changes, the other changes. Whilst I really like [<a href="https://apiary.io/">Apiar</a> and even <a href="https://apigee.com/">Apigee</a> they are separate from your project so need syncing and rely on developers to remember. They do some checks and may even code gen but with GraphQL and mocking you are always in the real project.</p><p>I strongly recommend reading up on <a href="http://graphql.org/">GraphQL</a>. If you have ever written a rest api before then you will read about GraphQL and just smile. Think of it like SQL for rest. It is still completely rest under the covers and rest clients can call it still but it adds a whole lot more. It is a superset of rest. Plus it’s self documenting and you get this great api portal built in. This app is part of your api, not separate. If you want the documentation, send a text/html content type, if you want to query the api send an application/json content type.</p><p>If you are new to GraphQL I suggest you read up a little before continuing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*CGOSQEgw9YZzmY5nyxy6zA.jpeg" /></figure><h4>Star Wars</h4><p><a href="http://graphql.org/swapi-graphql/?query=%7B%0A%20%20allFilms(first%3A%201)%20%7B%0A%20%20%20%20films%20%7B%0A%20%20%20%20%20%20title%0A%20%20%20%20%20%20speciesConnection%20%7B%0A%20%20%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20%20%20classification%0A%20%20%20%20%20%20%20%20%20%20%20%20averageHeight%0A%20%20%20%20%20%20%20%20%20%20%20%20homeworld%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20population%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A">Click this query</a> to open the stars wars api GraphQL editor with a query ready to run. The “Prettify” button will format it, then hit play. The query defines which fields you want from the API as well as filtering. You can also get multiple results in one server request.</p><h3>Setting up the Mocking</h3><p>Source code is available on <a href="https://github.com/chookie/graphql-mock">GitHub</a>. The starting point for GraphQL is a standard node/express service then you add the graph middleware as an endpoint. So wherever you normally setup your routes use this:</p><pre>app.use(‘/graphql’, GraphQLHTTP({<br> schema: realSchema,<br> graphiql: true<br> }));</pre><p>The core of GraphQL is the idea of a schema. You can create a javascript file with the schema and the data loaders, known as resolvers. You can, however, also separate the schema and the load so you can easily provide both mock data and real data on the same schema file. We use the new ES6 template string and the [<a href="https://github.com/apollographql/graphql-tools">GraphQL Tool</a> library from Apollo, an npm package and an opinionated structure for how to build a GraphQL schema and resolvers in JavaScript, following the GraphQL-first development workflow. I used <a href="http://dev.apollodata.com/tools/graphql-tools/index.html">their documents</a> to create this sample.</p><p>First the string schema, complete with comments which GraphiQL will also display. <em>Note this is a template string so it starts and ends with backticks.</em></p><pre>export default`<br>  # This is the description for Link type<br>  type Link {<br>    id: String! # ! means required<br>    # This is the description for title<br>    title: String<br>    url: String<br>  }</pre><pre>  # This is the description for Query type<br>  type Query {<br>    # This is the description for links<br>    links(title: String, url: String): [Link]<br>  }</pre><pre>  # This is the description for schema type<br>  schema {<br>    # This is the description for query<br>    query: Query<br>  }<br>`</pre><p>Since we are following the API Driven approach, we next create a mock resolver to get the data for this schema.</p><pre>export default {<br> Link: () =&gt; ({<br> title: () =&gt; casual.title,<br> url: () =&gt; casual.url<br> })<br>}</pre><p>Then you combine the two back in your main express code. The graphiql: true is what show he GraphiQL UI.</p><pre>// Make a GraphQL schema with no resolvers<br>const mockSchema = makeExecutableSchema({ typeDefs: schemaString });<br>// Add mocks, modifies schema in place<br>addMockFunctionsToSchema({<br> schema: mockSchema,<br> mocks: mockResolver,<br> preserveResolvers: false<br>});<br>app.use(‘/mock’, GraphQLHTTP({<br> schema: mockSchema,<br> graphiql: true<br>}));</pre><p>That is it, seriously. A couple of anonymous functions and using the excellent <a href="https://www.npmjs.com/package/casual-browserify">casual-browserify</a> which makes it so simple to return many types of sample data from phone numbers, to addresses, url’s, descriptions, names etc.</p><p>So now put your service on Heroku or AWS etc and within around an hour we have a mock of our service that we can deploy and the UI developers can start using and the clients can test.</p><h3>The Real Thing</h3><p>Now the api developers get to work on providing the real data. In my sample I connected to a Mongo DB to get the data. This goes in a new resolver then back in the express code we can either swap the endpoint for real data, or as I have done here provide two different endpoints, /mock for mock data and /graphql for real data. Both use the same schema so a change in one requires a change in the other or we get a compile time error and both have the GraphiQL interface with the exact same schema and comments. No more developes forgetting to update a wiki somewhere.</p><pre>MongoClient.connect(projectConfig.mongo, (err, database) =&gt; {<br> if (err) {<br>   throw err;<br> }<br> db = database;<br> const realSchema = makeExecutableSchema({<br>   typeDefs: schemaString,<br>   resolvers: resolverMap(db)<br> });</pre><pre>app.use(‘/graphql’, GraphQLHTTP({<br>  schema: realSchema,<br>  graphiql: true<br>}));<br>...</pre><p>There is a lot more to GraphQL as I said but even just this is a big win. Rapid development, centralised schema, easy mocking, easy querying and automatic documentation. And it is all done in javasrcript, in the real project.</p><h3>Complete Source Code</h3><p>The complete exa mple is available on our Github at <a href="https://github.com/cardano/graphql-mocking">https://github.com/cardano/graphql-mocking</a>.</p><p>You can see our Cardano Engineering site running at <a href="https://cardano.github.io/blog/2017/02/08/graphql-shared-schema-mock-and-real">https://cardano.github.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da27c179ffd0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cardano/graphql-api-driven-design-da27c179ffd0">GraphQL API Driven Design</a> was originally published in <a href="https://medium.com/cardano">cardano</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating an Engineering Blog with GitHub Pages]]></title>
            <link>https://medium.com/cardano/creating-an-engineering-blog-with-github-pages-4e9bf423c1d0?source=rss-b772ca3c6e04------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e9bf423c1d0</guid>
            <category><![CDATA[jekyll]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[github-pages]]></category>
            <dc:creator><![CDATA[Alison Johnston]]></dc:creator>
            <pubDate>Thu, 23 Feb 2017 13:05:36 GMT</pubDate>
            <atom:updated>2017-02-23T13:05:36.376Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<blockquote>This post explains how to create a free blog site using GitHub pages which has built in markdown support from Jekyll. Includes setting up local environment for OSX or Windows.</blockquote><h3>So You Want to Setup A Blog</h3><p>As part of our platform uplift we wanted to start giving back to the community and sharing our experiences, which means we need a blog. GitHub pages is a great way to setup a free static website and it includes Jekyll which provides a great way to setup a blog. Your content is just static markdown pages which you commit to Github, just like code.</p><p>We could have gone with something more elaborate like WordPress or Drupal with a database behind it and the related complications but this seems a natural and great starting point for a web development team. The team starts using Github and the Github flow branching strategy just as they will be doing with code.</p><h3>Creating a Site</h3><p>You can create a site with no local development by creating and editing the site directly on Github by adding a new file. GitHub runs Jekyll when you commit then it deploys your site.</p><p>Personally I created the site initially following the excellent guide by <a href="http://jmcglone.com/guides/github-pages">Jonathon Mcglone</a>. Then to customise, add Bootstrap etc I pulled down the project locally, installed Jekyll and used Visual Studio Code, on my Mac.</p><p>I am not going to add a full tutorial when as above there is the great one already from <a href="http://jmcglone.com/guides/github-pages">Jonathon Mcglone</a> and another from <a href="https://www.smashingmagazine.com/2014/08/build-blog-jekyll-github-pages/">Barry Clark</a>. For the markdown syntax see <a href="https://help.github.com/articles/basic-writing-and-formatting-syntax">https://help.github.com/articles/basic-writing-and-formatting-syntax</a>.</p><h3>Running Jekyll Locally</h3><p>As I said above you can do this without installing or running locally just by committing to GitHub. However if you want to do some customisation and see how it looks before pushing then you need to install Jekyll. We run it with the watch option so any changes will be built automatically then you just have to refresh the browser to see them. This means you can live preview your blogs.</p><p>The easiest way to do this is by <a href="https://docs.docker.com/engine/installation">installing Docker</a>, no need to install anything else. In the root of your project create a docker-compose file as below then in a terminal from the project root run the command `docker-compose up` and Jekyll will run connected live to your code. Any changes will be automatically detected and redeployed as above.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e5aa78026ea9f4feb9c0c4c2474e5a0f/href">https://medium.com/media/e5aa78026ea9f4feb9c0c4c2474e5a0f/href</a></iframe><h4>Explanation</h4><ul><li>We are using the official Jekyll docker image which has Jekyl fully installed and ready to run. When you first run this file it will be downloaded from [docker hub](<a href="https://hub.docker.com/r/jekyll/jekyll/">https://hub.docker.com/r/jekyll/jekyll/</a>).</li><li>We give a name to our running docker image so we can identify it when cleaning up.</li><li>Line 7 we mount our current directory as a volume or drive available within the container. So Jekyll can see our files.</li><li>Line 10 we run the Jekyll command line using the mapped location and watch for files changes.</li><li>Line 11 We make the port specified in our _config file available form outside the docker image. Left side is port for the outside world, right is the one the app is running on within the image.</li></ul><h3>Styling</h3><p>We wanted to add bootstrap styling and our own stylesheet. You can take a look at our code.</p><h4>Bootstrap</h4><p>Update your <a href="https://github.com/cardano/cardano.github.io/blob/master/_layouts/default.html">_layouts/default.html</a> file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0985c4d3aa631b8c0cccb9e8f471d307/href">https://medium.com/media/0985c4d3aa631b8c0cccb9e8f471d307/href</a></iframe><p>Next is and our logo so inside the assets folder (which is copied to the _site folder) I added an images folder with our favicon and logo then added this in the header.</p><pre>&lt;link rel=’shortcut icon’ href=’/assets/images/favicon.ico’ type=’image/x-icon’ /&gt;</pre><p>then the logo svg in the Body</p><pre>&lt;a href=”/” class=”navbar-brand”&gt;<br> &lt;img src=’/assets/images/cardano_logo.svg’ /&gt;<br>&lt;/a&gt;</pre><h4>SCSS</h4><p>You can also use SASS or SCSS files as Jekyll has a built in compiler. Simply rename the main.css file to main.scss. That’s it. Jekyll will place a compiled file in _site\assets\css\main.css.</p><h4>Code Highlighting</h4><p>Jekyll has <a href="http://pygments.org/">pigments</a> built in so you can download lots of css files which can change your code styling, such as <a href="https://demisx.github.io/jekyll/2014/01/13/improve-code-highlighting-in-jekyll.html">demisx.github.io</a>. You also might want to get rid of the borders by adding this to the end of the file.</p><pre>.highlight pre { border: none }</pre><h3>Complete Source Code</h3><p>Our complete site with all of the above is available on our Github at <a href="https://github.com/cardano/cardano.github.io">https://github.com/cardano/cardano.github.io</a>.</p><p>You can see our Cardano Engineering site running at <a href="https://cardano.github.io/blog/2016/11/29/creating-an-engineering-blog">https://cardano.github.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e9bf423c1d0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cardano/creating-an-engineering-blog-with-github-pages-4e9bf423c1d0">Creating an Engineering Blog with GitHub Pages</a> was originally published in <a href="https://medium.com/cardano">cardano</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>