Skip to content

Instantly share code, notes, and snippets.

@danblakemore
danblakemore / navigation.html
Last active April 30, 2017 14:56
Nested Jekyll page navigation without plugins
{% capture html %}
{% assign childCount = '' %}
{% comment %} Make sure there will be pages before making the ul tag. {% endcomment %}
{% assign entries = site.pages | sort: "path" %}
{% for entry in entries %}
{% capture slug %}{{ entry.url | split: "/" | last }}{% endcapture %}
{% capture current %}{{ entry.url | remove: slug | remove: "//" | append: "/" }}{% endcapture %}
{% if current == include.context %}
@danblakemore
danblakemore / gist:1994937
Created March 7, 2012 18:25
Stage Multiple Deletions Git
git diff --diff-filter=D --name-only -z | xargs -0 git rm
#from:http://stackoverflow.com/questions/6004453/how-to-remove-multiple-deleted-files-in-git-repository