# Function "site" not defined

**URL:** <https://discourse.gohugo.io/t/function-site-not-defined/50299>\
**Category:** support\
**Created:** [June 14, 2024, 1:23pm UTC](https://discourse.gohugo.io/t/function-site-not-defined/50299 "2024-06-14T13:23:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AudeSportisse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/audesportisse/32/22303_2.png) [@AudeSportisse](https://discourse.gohugo.io/u/AudeSportisse)\
**Post date:** [June 14, 2024, 1:23pm UTC](https://discourse.gohugo.io/t/function-site-not-defined/50299/1 "2024-06-14T13:23:53Z")

</div>

Hello,

I am using an old theme and I am trying to update it manually ([GitHub - alanorth/hugo-theme-bootstrap4-blog: A blogging-centric Bootstrap v4 theme for the Hugo static site generator.](https://github.com/alanorth/hugo-theme-bootstrap4-blog)). The website can be deployed locally (with blockdown in Rstudio) but when I push it to Github, it fails.  
The error I get in several html templates is as follows

> function “site” not defined

Can you help me? Thank you very much.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [June 14, 2024, 1:54pm UTC](https://discourse.gohugo.io/t/function-site-not-defined/50299/2 "2024-06-14T13:54:15Z")

</div>

Which version of Hugo are you using to build your site (a) locally and (b) with GitHub Pages?

The global `site` function was introduced a long time ago in [v0.53](https://github.com/gohugoio/hugo/releases/tag/v0.53).

---

<div class="post-metadata">

**Author:** ![AudeSportisse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/audesportisse/32/22303_2.png) [@AudeSportisse](https://discourse.gohugo.io/u/AudeSportisse)\
**Post date:** [June 14, 2024, 2:09pm UTC](https://discourse.gohugo.io/t/function-site-not-defined/50299/3 "2024-06-14T14:09:30Z")

</div>

Thanks for your answer.  
(a) Locally I am using 0.127.0  
(b) with Github Pages, how can I see this ?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [June 14, 2024, 2:31pm UTC](https://discourse.gohugo.io/t/function-site-not-defined/50299/4 "2024-06-14T14:31:26Z")

</div>

> [@AudeSportisse](#):
>
> with Github Pages, how can I see this ?

Look at your workflow file, presumably `.github/workflows/something`.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [June 29, 2024, 12:50pm UTC](https://discourse.gohugo.io/t/function-site-not-defined/50299/5 "2024-06-29T12:50:40Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
