GithubHelp home page GithubHelp logo

apremjee8 / vagrant-jekyll-github-pages Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wesleyzhao/vagrant-jekyll-github-pages

0.0 0.0 0.0 8 KB

Vagrant box set up to serve jekyll and github pages projects

Shell 100.00%

vagrant-jekyll-github-pages's Introduction

Vagrant Box with Jekyll/Github Pages

Goal

Get a local Jekyll/Github Pages project running as fast as possible.

Requirements

Vagrant
Virtualbox

Quickstart

Clone this repo and within the repo directory:

$ vagrant up && vagrant provision

Optional but suggested

Before the vagrant up command first set JEKYLL_SITE_PATH to point to your jekyll/github pages project. See below for details.

Usage

The quickstart vagrant up should do almost all the work for you to set up a working local environment for your github pages/jekyll site.

In addition to the main installations, you may want to mirror your jekyll/github pages project from your host onto the vagrant box or actually run the jekyll serve command to start seeing your project at http://localhost:4000/

Mirroring Your Jekyll Project Folder

IMO the best way to develop/test your project is to have the files on your host box and mirror that folder onto the vagrant box.

Set JEKYLL_SITE_PATH on your host and reload the vagrant box

$ export JEKYLL_SITE_PATH=/path/to/github-pages/project/
$ vagrant reload

Serving Your Jekyll Site

Next, you'll want to actually serve the project pages and make them available to view on your browser.

While on your vagrant box, go into the Jekyll site folder (by default we set it to /home/vagrant/site)

$ vagrant ssh
$ cd /home/vagrant/site
$ bundle install
$ bundle exec jekyll serve --host 0.0.0.0

WARNING

I have had issues serving updated local files. Adding the livereload flag along with force_polling solved this for me. So this is how I serve on my box:

$ bundle exec jekyll serve --host 0.0.0.0 --force_polling -l

By default you can now go to http://localhost:4000/ to see your site

Notes

This is a working MVP. It works. It will get a vagrant box running with jekyll and github-pages installed to easily get started with github pages. The different guides I used to put this together are here:

TODO

  • provisioning should not require re-provision
  • Flag for either plain jekyll use versus github-pages
  • Automatically pull/clone github-pages site
  • Ansible provisioning option

vagrant-jekyll-github-pages's People

Contributors

wesleyzhao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.