Jekyll2019-05-05T11:21:04+00:00http://cedwards.dev//feed.xmlCatherine EdwardsDeveloper portfolio for Catherine Edwards, a web developer based in Wellington, New Zealand.Adding a custom domain to your Github page2019-04-30T03:33:00+00:002019-04-30T03:33:00+00:00http://cedwards.dev//jekyll/create/custom/domain/2019/04/30/adding-custom-domain<p>If you have bought your <code class="highlighter-rouge">.dev</code> domain via <a href="https://porkbun.com/">Porkbun</a> like I have, setting up your <code class="highlighter-rouge">.dev</code> domain for your Github page is quite straight-forward.</p>
<p>[Follow the instructions on this Porkbun knowledge base article.)[
https://kb.porkbun.com/article/64-how-to-connect-your-domain-to-github-pages]</p>
<p>You should also make a CNAME record for your Github repository - the one that is named <code class="highlighter-rouge">[YOUR GITHUB USERNAME].github.io</code></p>
<p>Do this with the following script in the root directory of your repository:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nv">$ </span>touch CNAME</code></pre></figure>
<p>You don’t need to worry about file extensions. Open the file in your code editor of choice, and put in the <code class="highlighter-rouge">.dev</code> domain name you are using. For example, <a href="https://github.com/catherineedwards/catherineedwards.github.io/blob/master/CNAME">in the CNAME record in my repository directory</a>, I have entered <code class="highlighter-rouge">cedwards.dev</code>. This should clear any domain-resolution issues with Github.io.</p>If you have bought your .dev domain via Porkbun like I have, setting up your .dev domain for your Github page is quite straight-forward.Getting started with Jekyll2019-04-24T03:42:00+00:002019-04-24T03:42:00+00:00http://cedwards.dev//jekyll/update/2019/04/24/getting-started-jekyll<p>Hi there! You may be interested in this series of blog posts to learn how to build a site using Jekyll.</p>
<p>I’m writing as if you have similar amounts of knowledge to web development as me:</p>
<ul>
<li>Completed a web development boot camp, e.g. <a href="https://devacademy.co.nz/">Enspiral Dev Academy</a></li>
<li>Built some nodeJS CRUD (create read update delete) apps</li>
<li>Deployed those apps and their datastores locally and on a platform such as <a href="https://www.heroku.com/">Heroku</a></li>
</ul>
<p>I’m always learning, and I hope by sharing what I’ve learnt (and how ‘ve learnt it) that you pick up something new along the way as well :smile:</p>
<p>For reference’s sake, I am using a MacBook with macOS Mojave 10.14.4. I’m confident this walkthrough will be similar on an FOSS operating system such as Ubuntu. I can provide <em>some</em> support for Windows 10/WSL, but I’m not as confident in that area since changing over to a Macbook.</p>
<h2 id="getting-ready-for-jekyll">Getting ready for Jekyll</h2>
<p>One drawback of documentation out there on the web is that it’s written with undocumented assumptions about the reader. I found the Jekyll docs were well-pitched to someone who had a development set up that had been through the gauntlet of different languages and frameworks. As for my MacBook, well… the relationship between it and me is still relatively new as I made the change from a Surface Pro 4 only a couple of months ago.</p>
<p>Here’s what I needed to do to get Jekyll running locally.</p>
<p>Note: I didn’t use <code class="highlighter-rouge">sudo</code> unless the scripts specifically asked to be executed with <code class="highlighter-rouge">sudo</code> permissions.</p>
<h3 id="installing-homebrew">Installing Homebrew</h3>
<p>When I started using macOS, I didn’t even know I needed a package manager. Homebrew - or Brew - is a popular package manager for new starters to macOS.</p>
<p>I pasted and executed the following script into my terminal:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nv">$ </span>/usr/bin/ruby <span class="nt">-e</span> <span class="s2">"</span><span class="k">$(</span>curl <span class="nt">-fsSL</span> https://raw.githubusercontent.com/Homebrew/install/master/install<span class="k">)</span><span class="s2">"</span></code></pre></figure>
<p>And that was it! Brew installed. Read more about Brew and its delights at <a href="https://brew.sh/">brew.sh</a></p>
<h3 id="installing-ruby">Installing Ruby</h3>
<p>Now that you have Brew, you can install Ruby with:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nv">$ </span>brew install ruby</code></pre></figure>
<p>Boom. In either a later revision or a separate blog post, I’ll provide a comparison of how to use Ruby if you’re use to using Node and its package managers (either <code class="highlighter-rouge">npm</code> or <code class="highlighter-rouge">yarn</code>).</p>
<p>If you are using a different package manager, check out the installation guides on <a href="https://www.ruby-lang.org/en/documentation/installation/">ruby-lang.org</a></p>
<h3 id="installing-jekyll">Installing Jekyll</h3>
<p>We’re about to get the <a href="http://en.brickimedia.org/wiki/Piece_of_Resistance">pièce de résistance</a> by installing Jekyll.</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nv">$ </span>gem install bundler jekyll</code></pre></figure>
<h3 id="create-a-new-jekyll-project">Create a new Jekyll project</h3>
<p>Now that you’ve installed Jekyll, you will be able to build a new Jekyll-based project. When you create a new project, Jekyll will create a directory and the initial scaffolding (i.e. the files needed to start the foundations of your project) in it.</p>
<p>To create your new Jekyll project:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nv">$ </span>jekyll new my-new-blog
<span class="nv">$ </span><span class="nb">cd </span>my-new-blog</code></pre></figure>
<p>Have a look through your directory, and you should see a list of files and directories created to get you started.</p>
<p>I’ll talk through what’s in the directory in another post.</p>
<p>You should see that the Jekyll project is working for you. Run the following command to get your Jekyll site going:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell"><span class="nv">$ </span>bundle <span class="nb">exec </span>jekyll serve</code></pre></figure>
<p>This runs your Jekyll site locally on port 4000 by default. Browse to http://localhost:4000 in your web browser, and you should see a basic Jekyll site, waiting for your content and creativity to fill it!</p>Hi there! You may be interested in this series of blog posts to learn how to build a site using Jekyll.