So, installing Jekyll should be straight-forward. MacOS Sierra already has it at version 2.0.0p648. Every other SSG software now includes a way to bring blog functionality in its core, though. Jekyll is one of the oldest static site generators and is the most famous SSG (short for Static Site Generator) of all. So, the following article (written in Feb 2017) is outdated and may not work now! This command will open the browser, and your site will be sync real-time in (Oct 24, 2017): A new simpler way to install Jekyll using MacPorts is available. It will watch any changes in the entire _site directory $ browser-sync start -proxy "localhost:4000" -files "_site/*.*" Run this command in the same directory of your site. Install it by $ npm install -g browser-sync That tool will auto synch and reload the browser for you. When you edit your post, you want the browser to be refreshed and your changes are displayed right after you saved your files. The most common way is: // Go to the downloaded folder Each theme has its own installation instructions, so follow it. You can google it or check in .ĭownload any theme you like. You can create a new Jekyll site with default minimal theme by: $ jekyll new myblogīut there are many free theme for free, so we can forget the default theme and look for a better theme. Use ls to make sure jekyll is there.Īdd that path to your shell config: $ echo 'export PATH="/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"' > ~/.zshrc Jekyll should be inside /usr/local/lib/ruby/gems/2.6.0/bin. Try to replace /gems/jekyll-3.8.5/lib/jekyll.rb with /bin. Find your Jekyll path using: $ gem which jekyll If you see the command not found error, add Jekyll path to your shell config. Install Bundler and Jekyll: $ gem install bundler jekyllĬheck if Jekyll is installed correctly. Relaunch your terminal and check your updated Ruby setup. $ echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' > ~/.zshrc Replace ~/.zshrc with ~/.bashrc if you are using bash. Install Ruby via Homebrew: $ brew install rubyĪdd Ruby path to your shell config. Install the command-line tools to be able to compile native extensions: $ xcode-select -install
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |