Back to Fish

Base

site/_includes/base.html

latest565 B
Original Source

{% comment %} This allows html files to find their CSS and other assets using relative paths. The idea is that {{ base }} points at the root URL of the fish site, so you may write e.g. {{ base }}/assets/css. Search for "relative paths in Jekyll" for more on this technique. {% endcomment %} {% assign base = '' %}{% assign depth = page.url | split: '/' | size %}{% if depth <= 1 %}{% assign base = '.' %}{% elsif depth == 2 %}{% assign base = '..' %}{% elsif depth == 3 %}{% assign base = '../..' %}{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}