{"action":"created","issue":{"url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant/issues/4","repository_url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant","labels_url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant/issues/4/comments","events_url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant/issues/4/events","html_url":"https://github.com/jsturtevant/jekyll-vagrant/issues/4","id":160296964,"number":4,"title":"Vagrant/Jekyll and symlinks","user":{"login":"xcomSteveJohnson","id":1268334,"avatar_url":"https://avatars.githubusercontent.com/u/1268334?v=3","gravatar_id":"","url":"https://api.github.com/users/xcomSteveJohnson","html_url":"https://github.com/xcomSteveJohnson","followers_url":"https://api.github.com/users/xcomSteveJohnson/followers","following_url":"https://api.github.com/users/xcomSteveJohnson/following{/other_user}","gists_url":"https://api.github.com/users/xcomSteveJohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/xcomSteveJohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcomSteveJohnson/subscriptions","organizations_url":"https://api.github.com/users/xcomSteveJohnson/orgs","repos_url":"https://api.github.com/users/xcomSteveJohnson/repos","events_url":"https://api.github.com/users/xcomSteveJohnson/events{/privacy}","received_events_url":"https://api.github.com/users/xcomSteveJohnson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-14T22:14:50Z","updated_at":"2016-06-16T22:52:56Z","closed_at":"2016-06-14T22:33:33Z","body":"Windows 7, Virtual Box 5.0.20, cloned your site the other day but using a modified `Vagrantfile`.\r\n\r\nCasting about for ideas. To avoid copying .md files that haven't changed between releases for our documentation site, we're using symlinks to represent them. IOW, the 2.0 directory might have `mytopic.md` and if that topic hasn't changed in 2.1, it's represented in that directory with a symlink to the 2.0 directory.\r\n\r\nOn Windows, Jekyll simply copies the `.md` files from `_site/2.0` to `_site/2.1`. Mac does the right thing by rendering the symlink as `.html`.\r\n\r\nThoughts?\r\n\r\n`Vagrantfile`\r\n\r\n```\r\n# -*- mode: ruby -*-\r\n# vi: set ft=ruby :\r\n\r\nNAME=\"magento-devdocs\"\r\nHOST_PORT=\"4000\"\r\nRAM=\"1024\"\r\nCPU=\"50\"\r\n\r\n# All Vagrant configuration is done below. The \"2\" in Vagrant.configure\r\n# configures the configuration version (we support older styles for\r\n# backwards compatibility). Please don't change it unless you know what\r\n# you're doing.\r\nVagrant.configure(2) do |config|\r\n  config.vm.box = \"ubuntu/trusty64\"\r\n  config.vm.hostname = NAME\r\n  config.vm.provision :shell, path: \"bootstrap.sh\"\r\n  config.vm.network :forwarded_port, guest: \"4000\", host: HOST_PORT\r\n  config.vm.synced_folder \"../.\", \"/jekyll/devdocs\"\r\n  config.vm.provider \"virtualbox\" do |v|\r\n    v.customize ['modifyvm', :id, '--name', NAME, '--memory', RAM, \"--cpuexecutioncap\", CPU]\r\n  end\r\nend\r\n```\r\n\r\n`bootstrap.sh`\r\n\r\n```\r\n#!/usr/bin/env bash\r\n\r\n# Customization parameters\r\nRUBY_VERSION=2.2\r\nRVM_PATH=/usr/local/rvm\r\nGEMS=bundler\r\n\r\n# Get information on the newest versions of Ubuntu packages\r\nsudo apt-get update\r\n\r\n# Install Ubuntu packages\r\nsudo apt-get install nodejs -y\r\n\r\n# Install Ruby\r\nif [ ! -e $RVM_PATH ]; then\r\n\tgpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3\r\n\tcurl -sSL https://get.rvm.io | bash -s\r\nfi\r\n\r\nsource $RVM_PATH/scripts/rvm\r\n\r\nrvm use --install $RUBY_VERSION --default\r\n\r\n# Install gems\r\ngem install $GEMS\r\n\r\n# Clean up\r\nsudo apt-get autoremove -y\r\n\r\n# Install gems and dependencies from Gemfile\r\ncd /jekyll/devdocs\r\nbundle install\r\n\r\n# Run devdocs in Jekyll\r\ncd /jekyll/devdocs && bundle exec jekyll serve --host=0.0.0.0\r\n```"},"comment":{"url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant/issues/comments/226636722","html_url":"https://github.com/jsturtevant/jekyll-vagrant/issues/4#issuecomment-226636722","issue_url":"https://api.github.com/repos/jsturtevant/jekyll-vagrant/issues/4","id":226636722,"user":{"login":"xcomSteveJohnson","id":1268334,"avatar_url":"https://avatars.githubusercontent.com/u/1268334?v=3","gravatar_id":"","url":"https://api.github.com/users/xcomSteveJohnson","html_url":"https://github.com/xcomSteveJohnson","followers_url":"https://api.github.com/users/xcomSteveJohnson/followers","following_url":"https://api.github.com/users/xcomSteveJohnson/following{/other_user}","gists_url":"https://api.github.com/users/xcomSteveJohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/xcomSteveJohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcomSteveJohnson/subscriptions","organizations_url":"https://api.github.com/users/xcomSteveJohnson/orgs","repos_url":"https://api.github.com/users/xcomSteveJohnson/repos","events_url":"https://api.github.com/users/xcomSteveJohnson/events{/privacy}","received_events_url":"https://api.github.com/users/xcomSteveJohnson/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T22:52:56Z","updated_at":"2016-06-16T22:52:56Z","body":"This is a [good explanation](http://blog.rudylee.com/2014/10/27/symbolic-links-with-vagrant-windows/) of the problem and workaround.\r\n\r\nIn our case, we have Markdown files in a 2.0 and 2.1 directory. Any file that's identical in both is represented in the 2.1 directory by a symlink. I cloned the GitHub repository, ran `vagrant up` with the workaround but discovered none of the symlinks were there anymore. They were all ordinary files with binary content.\r\n\r\nI noticed though that I could _create new_ symlinks.\r\n\r\nWhat I got to work was to clone the repository in the Vagrant container; however, I'm not sure yet that the symlinks won't be converted again to something strange. I'll post an update when I know."}}
{"actor":{"display_login":"xcomSteveJohnson"}}