mickey icon indicating copy to clipboard operation
mickey copied to clipboard

Make urls work locally as well as on gh-pages

Open tabuchid opened this issue 10 years ago • 4 comments

If you deploy to a page you need to add '/{Project Name}/' to the _config.yml However then all the asset linking breaks for testing locally. From what I can tell from the Jekyll docs you can get around this but I haven't quite figured out a good fix as I'm new to jekyll and gulp. This issue seems to affect your personal blog as well it would be nice if both of these rendered correctly

  • http://aneverendingdream.com/
  • http://vincentchan.github.io/aneverendingdream/

tabuchid avatar Sep 29 '15 16:09 tabuchid

+1 to this. It works great locally but assumes you are pushing to an organisation page not a project page, and so the asset paths all break

davesag avatar Oct 12 '15 13:10 davesag

I know that this issue is pretty old, but Can anyone help me about adding this rule at _config.yml?? I'm not able to figure out in Jekyll 3, and I tried different things and nothing work.

FreakDroid avatar Aug 11 '17 16:08 FreakDroid

+1

PierLuisVona avatar Sep 21 '17 12:09 PierLuisVona

Guys I resolved this problem many months ago as the others guys, but I post here the steps to fixed.

What I did was update the config.yml the permalink section with:

# Permalinks
permalink:           /:title/
baseurl:             ''
baseurl_posts_img:   '/assets/images/hero/'
baseurl_featured_img: '/assets/images/hero/'
baseurl_featured_thumbnail: '/assets/images/thumbnail/'
baseurl_javascripts: '/assets/javascripts/'
icon:                /assets/images/icon.jpg

Also I updated _includes/menu.html the go back button because was broken after update the permalink with:

<nav class="menuWrapper">
  <ul class="popover popover--menu">
    <li class="menu-avatar">
      <a href="/" class="brandLogo brandLogo--small
      {% if page.bgContrast == "light" %}
        brandLogo--black
      {% endif %}
      ">{{ site.name }}</a>
      <ul class="list list--avatarMenu hidden">
        <li class="list-item"><a href="">Twitter</a></li>
        <li class="list-item"><a href="">LinkedIn</a></li>
        <li class="list-item"><a href="">Quora</a></li>
        <li class="list-item"><a href="">Dribbble</a></li>
        <li class="list-item"><a href="">Kiva</a></li>
      </ul>
    </li>
  </ul>
</nav>

Everything is working either localhost and in my github page, Here is my repo and currently working on jekyll 3.5.

I hope help you.

FreakDroid avatar Nov 11 '17 16:11 FreakDroid