Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4185aa4

Browse files
base url test
1 parent 69cfa7d commit 4185aa4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

_layouts/docs.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
{% if page.path contains "index.md" %}
2+
{% capture basehref %}{{ page.url }}{% endcapture %}
3+
{% else %}
4+
{% assign crumbs = page.url | split: '/' %}
5+
{% assign stoppingpoint = crumbs | size | minus: 1 %}
6+
{% assign output = "" %}
7+
{% for crumb in crumbs %}
8+
{% if forloop.index == stoppingpoint %}
9+
{% capture basehref %}{{basehref}}{{ crumb }}/{% endcapture %}
10+
{% break %}
11+
{% else %}
12+
{% capture basehref %}{{basehref}}{{ crumb }}/{% endcapture %}
13+
{% endif %}
14+
{% endfor %}
15+
{% endif %}
116
<!DOCTYPE html>
217
<html class="js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms no-csstransforms3d csstransitions fontface no-generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths retina-display is_not_retina chrome version webkit" lang="en">
318
<head>
19+
<base href="{{ basehref }}"/>
420
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
521
<style type="text/css">
622
@charset "UTF-8";

0 commit comments

Comments
 (0)