{"id":3275,"date":"2021-08-25T11:14:22","date_gmt":"2021-08-25T11:14:22","guid":{"rendered":"https:\/\/helpdesk.spider-themes.net\/docs\/docy-jekyll-theme\/deployment\/github\/"},"modified":"2021-08-25T11:14:22","modified_gmt":"2021-08-25T11:14:22","slug":"github","status":"publish","type":"docs","link":"https:\/\/mantra4money.com\/index.php\/docs\/docy-jekyll-theme\/deployment\/github\/","title":{"rendered":"Github"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Set up your github repo<\/h2><ol class=\"wp-block-list\"><li>Make sure you have Git installed. You can download and install <a href=\"https:\/\/git-scm.com\/download\/win\">Git for Windows here<\/a> and <a href=\"https:\/\/git-scm.com\/download\/mac\">Git for Mac here<\/a>. If you\u2019re on a Mac, chances are you might already have git installed. You can check by opening up a terminal and typing <code>which git<\/code>.<\/li><li>Go to <a href=\"https:\/\/github.com\">Github.com<\/a> and sign up for an account.<\/li><li>Click the <strong>+<\/strong> button in the upper-right corner and select <strong>New repository<\/strong>.<\/li><li>Name the repository something like <strong>mydoctheme<\/strong>.<\/li><li>Type a description..<\/li><li>Select the <strong>Initialize this repository with a README<\/strong> check box.<\/li><li>Add a license if desired.<\/li><li>Leave the other options at the defaults and click <strong>Create repository<\/strong>.<\/li><li>Click the <strong>Settings<\/strong> button.<\/li><li>Go to your repository\u2019s home page, and click the branch drop-down menu.<\/li><li>Create a new branch called <strong>gh-pages<\/strong>.<\/li><li>Click <strong>Settings<\/strong> and change the default branch to <strong>gh-pages<\/strong><\/li><li>Go back to your repository\u2019s homepage. With the gh-pages branch selected, copy the <strong>https clone url<\/strong>:<\/li><li>Open a terminal, browse to a convenient location for your project, and type <code>git clone https:\/\/github.com\/tomjoht\/myreponame.git<\/code>, replacing the <code>https:\/\/github.com\/tomjoht\/myreponame.git<\/code> with your repository\u2019s https clone URL that you copied.<\/li><li>Move the jekyll theme files into this new folder that you just created in the previous step.<\/li><li>Open the _config.yml file and add the following:<\/li><\/ol><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\"> url: tomjoht.github.io\r\n baseurl: \/myreponame<\/span><\/code><\/pre><p>Change the url to your github account name, and the baseurl to your repo name.<\/p><h2 class=\"wp-block-heading\">Install Bundler<\/h2><p>Bundler is a package manager for Ruby that will install all dependencies you might need to build your site locally.<\/p><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">gem install bundler<\/span><\/code><\/pre><h2 class=\"wp-block-heading\">Add the github pages gem<\/h2><div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\"><ul class=\"wp-block-list\"><li>In terminal, browse to your Jekyll project directory.<\/li><li>Type <code>bundle init<\/code>. This creates a Gemfile and Gemfile.lock in your project.<\/li><li>Type <code>open gemfile<\/code>. This opens the gemfile in your default text editor.<\/li><li>Add the following in the gemfile (replacing the existing contents):<\/li><\/ul><\/div><\/div><pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-vivid-green-cyan-color\">source 'https:\/\/rubygems.org'\r\ngem 'github-pages'<\/span><\/code><\/pre><div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\"><ul class=\"wp-block-list\"><li> Run <code>bundle install<\/code>.<\/li><li> Add the new jekyll files to git: <code>git add --all<\/code>.<\/li><li> Commit the files: <code>git commit -m \"committing my jekyll theme\"<\/code>.<\/li><li> Push the files up to your github repo: <code>git push<\/code>.<\/li><\/ul><\/div><\/div><p>Github Pages will now automatically build your site. Wait a minute or two, and then visit tomjoht.github.io\/yourreponame, replacing this path with your github account and branch<\/p>","protected":false},"excerpt":{"rendered":"<p>Set up your github repo Make sure you have Git installed. You can download and install Git for Windows here and Git for Mac here. If you\u2019re on a Mac, chances are you might already have git installed. You can check by opening up a terminal and typing which git. Go to Github.com and sign [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3274,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-3275","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs\/3275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/comments?post=3275"}],"version-history":[{"count":0,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs\/3275\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/docs\/3274"}],"wp:attachment":[{"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/media?parent=3275"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/mantra4money.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=3275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}