# Using an outside url in front matter

**URL:** <https://talk.jekyllrb.com/t/using-an-outside-url-in-front-matter/508>\
**Category:** Help\
**Created:** [May 2, 2017, 2:46pm UTC](https://talk.jekyllrb.com/t/using-an-outside-url-in-front-matter/508 "2017-05-02T14:46:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pliske](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/pliske/32/200_2.png) [@pliske](https://talk.jekyllrb.com/u/pliske)\
**Post date:** [May 2, 2017, 2:46pm UTC](https://talk.jekyllrb.com/t/using-an-outside-url-in-front-matter/508/1 "2017-05-02T14:46:12Z")

</div>

I’m obviously not understanding something key with Jekyll.

Each .md file in my \_posts folder will be a portfolio item. Each portfolio item has a date, title, description, thumbnail, etc. All of that works fine for each project when I loop through the items. What I’d LIKE to do, is auto-generate a button, that gets its href from the url in the front matter.

But whenever I try this, the url instead becomes something like “[http://localhost:4000/portfolio/2016/06/01/plan-it.html](http://localhost:4000/portfolio/2016/06/01/plan-it.html)”

**Here’s my loop:**

```
{% for items in site.categories.portfolio %}
        <li>
            <a href="{{items.url}}" data-largesrc="images/portfolio/{{items.mainImage}}" data-title="{{items.title}}" data-description="{{items.description}}
            <span class='client'><strong>Client: </strong>{{items.client}}</span>
            <span class='role'><strong>Role: </strong>{{items.role}}</span>
            <span class='year'><strong>Launched: </strong>{{items:launchDate}}</span>">   
                <img src="images/portfolio/thumbs/{{items.thumbnail}}" alt="img09" />
            </a>
        </li>
{% endfor %} 

```

Thanks! - Bill

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [May 2, 2017, 10:00pm UTC](https://talk.jekyllrb.com/t/using-an-outside-url-in-front-matter/508/2 "2017-05-02T22:00:55Z")

</div>

As of Jekyll 3.3 I think jekyll serve automatically prepends localhost to urls like this, which when doing dev locally can be handy.

What are you expecting items.url to produce?

When working locally does the url work? seems like it should.

How are you hosting the site in production? GH pages? have you checked it there?

more info on how jekyll handles some urls:

> **[News](https://jekyllrb.com/news/)**
>
> Transform your plain text into static websites and blogs
