Skip to content

Commit

Permalink
Add switch for 404 page link prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raucao authored and jsarenik committed Jun 28, 2022
1 parent f5c746d commit 98e4b34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions _includes/root_path.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% assign ROOT_PATH = ''
%}{% assign depth = page.url | split: '/' | size | minus: 1
%}{% if depth < 1
%}{% if page.permalink == '/404.html'
%}{% assign ROOT_PATH = ''
%}{% elsif depth < 1
%}{% assign ROOT_PATH = '.'
%}{% elsif depth == 1
%}{% assign ROOT_PATH = '..'
Expand All @@ -15,4 +17,4 @@
%}{% elsif depth == 6
%}{% assign ROOT_PATH = '../../../../../..'
%}{% endif
%}
%}

0 comments on commit 98e4b34

Please sign in to comment.