Merge pull request #23 from zlargon/fix_linking_to_wrong_url

[bug fix] if website is in subdirectory, the 'Logo' will link to wrong url
pull/27/head
ppoffice 2015-06-29 00:37:22 +08:00
commit e7a195e442
3 changed files with 12 additions and 12 deletions

View File

@ -32,11 +32,11 @@ git pull
```r ```r
# Header # Header
menu: menu:
Home: / Home: .
Archives: /archives Archives: archives
Categories: /categories # -> you need to add extra page to enable this, please see the config below. Categories: categories # you need to add extra page to enable this, please see the config below.
Tags: /tags # -> you need to add extra page to enable this, please see the config below. Tags: tags # you need to add extra page to enable this, please see the config below.
About: /about About: about
# Content # Content
excerpt_link: Read More excerpt_link: Read More
@ -58,7 +58,7 @@ contacts:
twitter: '#' twitter: '#'
facebook: '#' facebook: '#'
dribbble: '#' dribbble: '#'
rss: /atom.xml rss: atom.xml
# Links # Links
links: links:
@ -66,7 +66,7 @@ links:
# Miscellaneous # Miscellaneous
google_analytics: google_analytics:
favicon: /favicon.png favicon: favicon.png
twitter: twitter:
google_plus: google_plus:
fb_admins: fb_admins:

View File

@ -1,6 +1,6 @@
# Header # Header
menu: menu:
Home: / Home: .
Archives: archives Archives: archives
Categories: categories Categories: categories
Tags: tags Tags: tags
@ -29,7 +29,7 @@ contacts:
twitter: '#' twitter: '#'
facebook: '#' facebook: '#'
dribbble: '#' dribbble: '#'
rss: /atom.xml rss: atom.xml
# Links # Links
links: links:
@ -37,7 +37,7 @@ links:
# Miscellaneous # Miscellaneous
google_analytics: google_analytics:
favicon: /favicon.png favicon: favicon.png
twitter: twitter:
google_plus: google_plus:
fb_admins: fb_admins:

View File

@ -1,7 +1,7 @@
<header id="header"> <header id="header">
<div id="header-main" class="header-inner"> <div id="header-main" class="header-inner">
<div class="outer"> <div class="outer">
<a href="<%- url_for() %>" id="logo"><i class="logo"></i><span class="site-title"><%= config.title %></span></a> <a href="<%- url_for('.') %>" id="logo"><i class="logo"></i><span class="site-title"><%= config.title %></span></a>
<nav id="main-nav"> <nav id="main-nav">
<% for (var i in theme.menu){ %> <% for (var i in theme.menu){ %>
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a> <a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
@ -31,4 +31,4 @@
</tr> </tr>
</table> </table>
</div> </div>
</header> </header>