base.html 333 B

1234567891011121314
  1. {% assign base = ''
  2. %}{% assign depth = page.url | split: '/' | size | minus: 1
  3. %}{% if depth < 1
  4. %}{% assign base = '.'
  5. %}{% elsif depth == 1
  6. %}{% assign base = '..'
  7. %}{% elsif depth == 2
  8. %}{% assign base = '../..'
  9. %}{% elsif depth == 3
  10. %}{% assign base = '../../..'
  11. %}{% elsif depth == 4
  12. %}{% assign base = '../../..'
  13. %}{% endif
  14. %}