Skip to content

Instantly share code, notes, and snippets.

@sskylar
Created March 27, 2015 15:45
Show Gist options
  • Save sskylar/53e079958572d761fd2f to your computer and use it in GitHub Desktop.
Save sskylar/53e079958572d761fd2f to your computer and use it in GitHub Desktop.
Get top-level page slug from nested post/subpage url in Siteleaf
{% assign section = url | remove_first:'/' | split:'/' | first %}
@callumflack
Copy link

Can this also be done via 'parent.slug'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment