{"id":8291,"date":"2020-07-11T16:14:43","date_gmt":"2020-07-11T16:14:43","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=8291"},"modified":"2020-07-11T16:14:43","modified_gmt":"2020-07-11T16:14:43","slug":"getting-started-with-jekyll","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/getting-started-with-jekyll\/","title":{"rendered":"Getting started with jekyll"},"content":{"rendered":"<p>GitHub pages, by default, uses jekyll and I wanted to get something running locally to test things.<\/p>\n<p><strong>Getting everything up and running<\/strong><\/p>\n<p>Let&#8217;s start by installed Ruby by going to <a href=\"https:\/\/rubyinstaller.org\/downloads\/\">RubyInstaller for Windows Downloads<\/a> if you don&#8217;t already have Ruby and Gem installed.<\/p>\n<p>Now go through the <a href=\"https:\/\/jekyllrb.com\/\" rel=\"noopener noreferrer\" target=\"_blank\">Jekyll<\/a> Quick-start Instructions &#8211; I&#8217;ll list them here also.<\/p>\n<ul>\n<li>gem install bundler jekyll<\/li>\n<li>jekyll new my-awesome-site<\/li>\n<li>cd my-awesome-site<\/li>\n<li>bundle exec jekyll serve<\/li>\n<\/ul>\n<p>So if all went well, the last line of these instructions will run up our jekyll site.<\/p>\n<p><strong>Testing our GitHub pages<\/strong><\/p>\n<ul>\n<li>Clone (if you don&#8217;t already have it locally) you repository with you GitHub pages<\/li>\n<li>Run <em>git checkout master<\/em>, i.e. or where you store your markdown\/html file content (in other words not the gh-pages branch if you&#8217;re using the standard master\/gh-pages branches).<\/li>\n<li>I don&#8217;t have a Gemfile, so in the root folder, create a file name Gemfile and here&#8217;s the contents (if you have a Gemfile add these two lines)\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nsource 'https:\/\/rubygems.org'\r\ngem 'github-pages', group: :jekyll_plugins\r\n<\/pre>\n<\/li>\n<li>Run <em>bundle install<\/em><\/li>\n<li>Run <em>bundle exec jekyll serve<\/em><\/li>\n<\/ul>\n<p><em>Note: You can commit the Gemfile and Gemfile.lock files to your GitHub repository, these are not used by GitHub Pages.<\/em><\/p>\n<p>After you&#8217;ve run up the server a <em>_site<\/em> folder will be created, these need not be committed.<\/p>\n<p><strong>Changing the theme<\/strong><\/p>\n<p>The first thing you might want to try is change the theme to one of the other <a href=\"https:\/\/pages.github.com\/themes\/\" rel=\"noopener noreferrer\" target=\"_blank\">supported themes<\/a>. Simply open the <em>_config.yml<\/em> file and change the name of the theme, i.e.<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\ntheme: jekyll-theme-cayman\r\n<\/pre>\n<p>Other supported themes include<\/p>\n<ul>\n<li>Architect <a href=\"https:\/\/github.com\/pages-themes\/architect\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-architect<\/a><\/li>\n<li>Cayman <a href=\"https:\/\/github.com\/pages-themes\/cayman\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-cayman<\/a><\/li>\n<li>Dinky <a href=\"https:\/\/github.com\/pages-themes\/dinky\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-dinky<\/a><\/li>\n<li>Hacker <a href=\"https:\/\/github.com\/pages-themes\/hacker\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-hacker<\/a><\/li>\n<li>Leap-day <a href=\"https:\/\/github.com\/pages-themes\/leap-day\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-leap-day<\/a><\/li>\n<li>Merlot <a href=\"https:\/\/github.com\/pages-themes\/merlot\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-merlot<\/a><\/li>\n<li>Midnight <a href=\"https:\/\/github.com\/pages-themes\/midnight\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-midnight<\/a><\/li>\n<li>Minima <a href=\"https:\/\/github.com\/jekyll\/minima\" rel=\"noopener noreferrer\" target=\"_blank\">minima<\/a><\/li>\n<li>Minimal <a href=\"https:\/\/github.com\/pages-themes\/minimal\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-minimal<\/a><\/li>\n<li>Modernist <a href=\"https:\/\/github.com\/pages-themes\/modernist\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-modernist<\/a><\/li>\n<li>Slate <a href=\"https:\/\/github.com\/pages-themes\/slate\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-slate<\/a><\/li>\n<li>Tactile <a href=\"https:\/\/github.com\/pages-themes\/tactile\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-tactile<\/a><\/li>\n<li>Time machine <a href=\"https:\/\/github.com\/pages-themes\/time-machine\" rel=\"noopener noreferrer\" target=\"_blank\">jekyll-theme-time-machine<\/a><\/li>\n<\/ul>\n<p>If you change the theme you&#8217;ll need to shut the server down and <em>bundle exec jekyll serve<\/em> which will run <em>jekyll build<\/em> and update the <em>_site<\/em> directory.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub pages, by default, uses jekyll and I wanted to get something running locally to test things. Getting everything up and running Let&#8217;s start by installed Ruby by going to RubyInstaller for Windows Downloads if you don&#8217;t already have Ruby and Gem installed. Now go through the Jekyll Quick-start Instructions &#8211; I&#8217;ll list them here [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[297,299,298],"tags":[],"class_list":["post-8291","post","type-post","status-publish","format-standard","hentry","category-github","category-jekyll","category-ruby"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/8291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=8291"}],"version-history":[{"count":5,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/8291\/revisions"}],"predecessor-version":[{"id":8296,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/8291\/revisions\/8296"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=8291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=8291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=8291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}