# Is staticDir2 available as a variable?

**URL:** <https://discourse.gohugo.io/t/is-staticdir2-available-as-a-variable/10689>\
**Category:** support\
**Created:** [February 23, 2018, 10:48am UTC](https://discourse.gohugo.io/t/is-staticdir2-available-as-a-variable/10689 "2018-02-23T10:48:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [February 26, 2018, 3:40am UTC](https://discourse.gohugo.io/t/is-staticdir2-available-as-a-variable/10689/6 "2018-02-26T03:40:09Z")

</div>

Have a look at @bep’s answer in this thread:

> [@How to check if the site is on localhost?](https://discourse.gohugo.io/t/how-to-check-if-the-site-is-on-localhost/1490):
>
> Hello, I’d like to add features to the theme that are only visible when the site is in the development environment (localhost). How can I do that? I thought about using the $.Site.BaseURL variable and checking if this variable equals or contains “localhost”. After all, this {{ printf "%#v" $.Site.BaseURL }} outputs… "http://localhost:1313/" But neither in nor eq seem to work with $.Site.BaseURL: {{ if in $.Site.BaseURL "localhost" }} localhost code, doesn't work {{ end }} and {{ if eq…

That should work without config variable if you need it only for local development.

---

_[View the full topic](https://discourse.gohugo.io/t/is-staticdir2-available-as-a-variable/10689)._
