Files
gitea-pages/mydoc/mydoc_install_jekyll_on_windows.md

2.5 KiB

title, permalink, keywords, sidebar
title permalink keywords sidebar
Install Jekyll on Windows /mydoc_install_jekyll_on_windows/ jekyll on windows, pc, ruby, ruby dev kit mydoc_sidebar

{% comment %}

Install Chocolately

  1. Go to Start and type cmd.

  2. Right-click the Command Line Prompt and select Run as Administrator.

  3. Copy the following code:

    @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
    
  4. Right-click in the Command Line Prompt and select Paste.

  5. Press Enter.

  6. Close the Command Line Prompt.

Install Ruby

  1. Go to Start and type cmd.

  2. Right-click the Command Line Prompt and select Run as Administrator.

  3. Type the following:

    choco install ruby -y
    
  4. Press Enter.

  5. Close the Command Line Prompt.

{% endcomment %}

Install Ruby

  1. Go to RubyInstaller for Windows.
  2. Under RubyInstallers, download and install one of the Ruby installers (usually one of the first two options).
  3. Double-click the downloaded file and proceed through the wizard to install it.

Install Ruby Development Kit

  1. Go to RubyInstaller for Windows.
  2. Under the Development Kit section near the bottom, download one of the For use with Ruby 2.0 and above... options.
  3. Extract Ruby onto your C drive in a folder called something like RubyDevKit.
  4. Browse to the RubyDevKit location on your C drive using your Command Line Prompt.
  5. Type ruby dk.rb init
  6. Type ruby dk.rb install

If you get stuck, see the official instructions for installing Ruby Dev Kit.

Install Bundler

  1. In the downloaded theme, delete the existing Gemfile and Gemfile.lock files.

  2. Type gem install bundler.

  3. Browse to the documentation-jekyll-theme directory.

  4. Type bundle init

  5. Open the Gemfile in a text editor.

  6. Paste in the following:

    # A sample Gemfile
    source "https://rubygems.org"
    
    gem 'wdm', '>= 0.1.0' if Gem.win_platform?
    gem 'jekyll', '~> 3.1', '>= 3.1.2'
    
  7. Save and close the file.

  8. Type bundle install.

Serve the Jekyll site

  1. Browse to the documentation-jekyll-theme directory.
  2. Type jekyll serve
  3. Go to the preview address in the browser. (Make sure you include the / at the end.)