# Symbolic links not supported

**URL:** <https://discourse.gohugo.io/t/symbolic-links-not-supported/590>\
**Category:** support\
**Created:** [January 14, 2015, 6:44pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590 "2015-01-14T18:44:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [January 14, 2015, 6:44pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/1 "2015-01-14T18:44:31Z")

</div>

Sad to see this error.

I have all my javascript (and other) web packages managed by bower. I then set up symbolic links (in linux) from the various js files I will use within those packages to a js directory within the static folder. The idea being is if I do a bower update then hugo will use in the latest js files when it builds. I am trying to avoid putting the entire bower\_components (packages) folder within the static folder because that just puts a lot of unsued files into the website itself.

Can anyone suggest an alternative workable workflow so one simple bower update command and hugo uses the latest js files?

Guess I don’t understand symbolic links well enough to understand why hugo would complain about this. I use them all the time to “fool” other programs. So is it possible that Hugo can support symbolic links in a future release? Is this really because it is an OS specific issue? I mean one would have to build for example a linux specific version?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [January 14, 2015, 7:25pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/2 "2015-01-14T19:25:47Z")

</div>

Ask Google’s Rob Pike about why symbolic links are a challenge.

Hugo doesn’t support them because Go’s filepath.Walk doesn’t follow them:.

[http://golang.org/pkg/path/filepath/#WalkFunc](http://golang.org/pkg/path/filepath/#WalkFunc)

In the latest Hugo, an error will be printed to the console when a symbolic link is found.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [January 14, 2015, 10:25pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/3 "2015-01-14T22:25:13Z")

</div>

Such as it is.

For any reading who may be using bower I found this. It does what I need (i.e. puts only the required files of a package where I want them i.e. /static).

[https://www.npmjs.com/package/bower-installer](https://www.npmjs.com/package/bower-installer)

short of this there is always bash script. :-).

---

<div class="post-metadata">

**Author:** ![mikeaja](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mikeaja](https://discourse.gohugo.io/u/mikeaja)\
**Post date:** [February 12, 2016, 7:20pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/4 "2016-02-12T19:20:57Z")

</div>

I came across this today… I mean the symlink error. In my case, nothing to do with Bower.

However, it actually works ( @bep )

So, in Windows, recreated the Hugoo content folder as a symlink to content\_src (just as an exxperiment).

I get this ‘Symbolic links for directories not supported’, but Hugo does follow and the content is generated as it should be.

So i could do this, just have to live with the error. But am I missing something here?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 13, 2016, 10:33pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/5 "2016-02-13T22:33:34Z")

</div>

> [@mikeaja](#):
>
> So i could do this, just have to live with the error. But am I missing something here?

`filepath.Walk`, the Go function doing the heavy lifting, doesn’t follow symbolic links, hence the error. But I believe that the “root folder” as a symbolic link should work, and that is what you see – and the error message is wrong. (could you create an issue at GitHub?)

So /content\_src as a symbolic link seems to be fine, but /content/blog or whatever would fail. Not sure.

---

<div class="post-metadata">

**Author:** ![mikeaja](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mikeaja](https://discourse.gohugo.io/u/mikeaja)\
**Post date:** [February 13, 2016, 10:41pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/7 "2016-02-13T22:41:39Z")

</div>

Thanks for the explanation, sounds like that’s what’s going on. Will create issue.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 14, 2016, 9:09pm UTC](https://discourse.gohugo.io/t/symbolic-links-not-supported/590/8 "2016-02-14T21:09:32Z")

</div>

See

> <https://github.com/gohugoio/hugo/pull/1857>

Note that this only supports symbolic links for the top-level directory of these different content paths – so /static can be a symbolic link, but not /static/js …
