![]() ![]() To create a folder in windows that begins with a dot, you will need to add an additional dot at the end. In order to use your own template in windows, you will need to create a folder in the windows user directory called. If you’re first starting out, take a look at the default templates and change them to your needs. The default templates should be located somewhere around C:\Ruby193\lib\ruby\gems\1.9.1\gems\middleman-core-3.2.1\lib\middleman-core\templates To install the development kit, open up a command prompt and run the following commands: (you might have to run them from the devkit folder) ruby dk.rb initįrom the command prompt, run gem install middleman Next, extract the development kit to C:\ruby193\devkit. It should have installed to C:\ruby193 or whatever version/location you have. When installing Ruby, make sure to add Ruby executables to the PATH (everything is done from the command line). Since Middleman is a Ruby gem, we’ll install that from the console in the coming steps. Update! The problem was that eventmachine 1.0.3 couldn’t be installed in ruby 2.0.0.ĭownload Ruby and its corresponding development kit from here. So, you may have to stick with the latest 1.9 version of Ruby. Grab the InstallersĪs of, I couldn’t get Ruby 2.0.0-p353 (圆4) and Middlmean 3.2 to play nicely together. The Windows installation isn’t as easy as it should have been (at least for my case), so here are a few tips on getting things started. I’ll share some of the links I used here, and you can basically just clone my github repository if you’d like a base to start with and a fast way to get up and running (would appreciate a credit on your site if you do use it for a live blog!).Middleman is a static site generator based on Ruby. I patched together a lot of different pieces by watching YouTube videos of how people styled elements on their sites, how to troubleshoot CSS and padding issues, building a header banner etc. This is the fun and frustrating part of the process. Middleman’s documentation was really helpful for me to make sense of things as I went along, I recommend browsing through the sections, to better understand their concepts such as partials. Personally I’m not entirely sure why this worked for me, but I’m sharing this to help any one who might get stuck here. The fix for me was to add this line to my gem file: gem 'middleman-autoprefixer'. Somehow I ran into the error below when I first tried to run my localhost server. Personally, I use Atom as my code editor, and it’s all I’ve needed so far! Shut down down your localhost server with CTRL c. You should now be able to access your Middleman blog site by visiting This lets you test out running your Middleman blog on your local machine, and it’s also where you’ll be able to check that your work and changes to your HTML, JavaScript and CSS are appearing correctly. Rename my_blog_project to your choice of project name for your blog. # Change directory to your blog project cd my_blog_project Middleman init my_blog_project -template =blog Here are the important code steps to get started: You’ll need to have Ruby on Rails installed on your terminal (I use Bash on Ubuntu), if you haven’t you can follow these steps here for Windows 10. I was able to follow most of the setup steps listed here by Adrian Ching, which helped me get my bearings pretty quickly. Step 1: Decide how you want your blog to lookįirst up, I gathered some ideas for how I wanted the blog to look, here were some of my visual references. This article assumes some familiarity with working with the terminal, Ruby on Rails, HTML, CSS and JavaScript. I’m documenting the major steps I took here, as well as how I managed to troubleshoot some errors I ran into, so that it can hopefully be a useful updated guide to others that might want to try this fun project out as well! It took me about a weekend to get the first version up and running, which was really fulfilling and a personal milestone in my amateur coding journey. I wondered how doable it would be to code and setup a website myself from scratch.Īfter a quick search online and finding several useful guides outlining the required steps, I decided to give it a shot. I had been toying with the idea of setting up a personal website or blog for some time, and thanks to my work in a tech SaaS startup, I had been exposed to tools such as Middleman (a static site generator) which we host on Github Pages (for free!). Steps on how to code and setup a Middleman Blog on GitHub Pages from scratch, for free. How To Setup A Middleman Blog For Free With GitHub Pages
0 Comments
Leave a Reply. |