File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change
1
+ <!-- _includes/base.html -->
2
+ {% assign base = '' %}
3
+ {% assign depth = page.url | split: '/' | size | minus: 1 %}
4
+ {% if depth == 1 %}{% assign base = '.' %}
5
+ {% elsif depth == 2 %}{% assign base = '..' %}
6
+ {% elsif depth == 3 %}{% assign base = '../..' %}
7
+ {% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}
Original file line number Diff line number Diff line change
1
+ {% include base.html %}
1
2
<!doctype html>
2
3
< html lang ="en ">
3
4
< head >
13
14
< meta name ="msapplication-tooltip " content ="Anurag Khandelwal academic webpage ">
14
15
15
16
< link href ="http://fonts.googleapis.com/css?family=Montserrat:700,400 " rel ="stylesheet " type ="text/css ">
16
- < link rel ="stylesheet " href ="/css/styles.css ">
17
+ < link rel ="stylesheet " href ="{{ base }} /css/styles.css ">
17
18
<!--[if lt IE 9]>
18
19
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
19
20
<![endif]-->
20
21
21
- < link rel ="icon " href ="/favicon.ico " type ="image/x-icon ">
22
- < link rel ="shortcut icon " href ="/favicon.ico " type ="image/x-icon ">
22
+ < link rel ="icon " href ="{{ base }} /favicon.ico " type ="image/x-icon ">
23
+ < link rel ="shortcut icon " href ="{{ base }} /favicon.ico " type ="image/x-icon ">
23
24
24
25
{%include google-analytics.html %}
25
26
</ head >
46
47
</ul>
47
48
!-->
48
49
</ h1 >
49
- < div class ="img-frame "> < img src ="/images/me.jpg " width ="180 " height ="180 "/> </ div >
50
+ < div class ="img-frame "> < img src ="{{ base }} /images/me.jpg " width ="180 " height ="180 "/> </ div >
50
51
{% comment %} External Links {% endcomment %}
51
52
< ul >
52
- < li > < a href ="/cv/CV.pdf " target ="_blank "> Resume</ a > </ li >
53
+ < li > < a href ="{{ base }} /cv/CV.pdf " target ="_blank "> Resume</ a > </ li >
53
54
< li > < a href ="https://github.com/anuragkh " target ="_blank "> GitHub</ a > </ li >
54
55
< li > < a href ="http://www.linkedin.com/in/anuragkh " target ="_blank "> LinkedIn</ a > </ li >
55
56
</ ul >
You can’t perform that action at this time.
0 commit comments