# Cloudflare Pages exploring

**URL:** <https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437>\
**Category:** support\
**Created:** [July 10, 2022, 7:59am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437 "2022-07-10T07:59:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ramon/32/11980_2.png) [@Ramon](https://discourse.gohugo.io/u/Ramon)\
**Post date:** [July 10, 2022, 7:59am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437/1 "2022-07-10T07:59:09Z")

</div>

hi,

After a great HugoConf, I wanted to try Cloudflare Pages.  
Using the [Quickstart Guide](https://gohugo.io/getting-started/quick-start/) and connecting GitHub → Cloudflare I have this error.  
I used the ‘default’ theme of Ananke. Any pointers are greatly appreciated.  
It does run on GitHub Pages… I do use a custom domain, is the problem there?

> | 09:50:25.127 | Cloning repository… |
> | --- | --- |
> | 09:50:25.990 | From [GitHub - moorlag/cloudflaredemo](https://github.com/moorlag/cloudflaredemo) |
> | 09:50:25.991 | \* branch 3db6459622775881d097ba8d8697a3202e083b14 → FETCH\_HEAD |
> | 09:50:25.991 | |
> | 09:50:26.041 | HEAD is now at 3db6459 remove |
> | 09:50:26.041 | |
> | 09:50:27.017 | Submodule ‘themes/ananke’ ([GitHub - theNewDynamic/gohugo-theme-ananke: Ananke: A theme for Hugo Sites](https://github.com/theNewDynamic/gohugo-theme-ananke.git)) registered for path ‘themes/ananke’ |
> | 09:50:27.018 | Cloning into ‘/opt/buildhome/clone/themes/ananke’… |
> | 09:50:27.018 | Submodule path ‘themes/ananke’: checked out ‘470ea40982f5036554819253c3ac6ed4a34193f4’ |
> | 09:50:27.018 | |
> | 09:50:27.044 | Success: Finished cloning repository files |
> | 09:50:27.626 | Installing dependencies |
> | 09:50:27.637 | Python version set to 2.7 |
> | 09:50:30.735 | v12.18.0 is already installed. |
> | 09:50:31.836 | Now using node v12.18.0 (npm v6.14.4) |
> | 09:50:32.044 | Started restoring cached build plugins |
> | 09:50:32.061 | Finished restoring cached build plugins |
> | 09:50:32.517 | Attempting ruby version 2.7.1, read from environment |
> | 09:50:35.974 | Using ruby version 2.7.1 |
> | 09:50:36.331 | Using PHP version 5.6 |
> | 09:50:36.483 | 5.2 is already installed. |
> | 09:50:36.509 | Using Swift version 5.2 |
> | 09:50:36.509 | Installing Hugo 0.54.0 |
> | 09:50:37.203 | Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z |
> | 09:50:37.207 | Started restoring cached go cache |
> | 09:50:37.227 | Finished restoring cached go cache |
> | 09:50:37.364 | go version go1.14.4 linux/amd64 |
> | 09:50:37.382 | go version go1.14.4 linux/amd64 |
> | 09:50:37.385 | Installing missing commands |
> | 09:50:37.385 | Verify run directory |
> | 09:50:37.386 | Executing user command: hugo |
> | 09:50:37.445 | Error: /opt/buildhome/repo/themes/ananke/layouts/partials/func/GetFeaturedImage.html:41:1: parse failed: template: partials/func/GetFeaturedImage.html:41: function return not defined |
> | 09:50:37.453 | Failed: build command exited with code: 255 |
> | 09:50:38.136 | Failed: an internal error occurred |

---

<div class="post-metadata">

**Author:** ![Ramon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ramon/32/11980_2.png) [@Ramon](https://discourse.gohugo.io/u/Ramon)\
**Post date:** [July 10, 2022, 8:08am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437/2 "2022-07-10T08:08:05Z")

</div>

I found a resource that’s helpful.  
[Deploy a Hugo site on Cloudlfare Pages](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/).

---

<div class="post-metadata">

**Author:** ![tut](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tut](https://discourse.gohugo.io/u/tut)\
**Post date:** [July 10, 2022, 8:21am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437/3 "2022-07-10T08:21:51Z")

</div>

Cloudflare Pages uses a very old version of Hugo, so it is advised to set the environment variable to a more recent version of Hugo, otherwise the build will fail.

---

<div class="post-metadata">

**Author:** ![techmagus](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/techmagus/32/16997_2.png) [@techmagus](https://discourse.gohugo.io/u/techmagus)\
**Post date:** [July 10, 2022, 10:17am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437/4 "2022-07-10T10:17:11Z")

</div>

Here are my settings.

 ![Screenshot from 2022-07-10 18-14-50](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/0/3/0320f3a5e239a6977195af075b8c03b2a9109002.png)

![Screenshot from 2022-07-10 18-15-00](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/8/d/8d4d53c2c9d0dc70f7ae7ef493c0b6cce1687f37.png)

I hope it helps.

---

<div class="post-metadata">

**Author:** ![Ramon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ramon/32/11980_2.png) [@Ramon](https://discourse.gohugo.io/u/Ramon)\
**Post date:** [July 11, 2022, 8:36am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437/5 "2022-07-11T08:36:37Z")

</div>

Thanks @techmagus!  
This solved the problem 🙂

GO\_VERSION 1.18.3  
HUGO\_VERSION 0.101.0

demo.ramonmoorlag.nl is online!  
 ![Screenshot 2022-07-11 at 10.34.24](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/4/c/4c757a209d215233c90db4e274f2a43559c878e8.png)

---

<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:** [July 13, 2022, 8:36am UTC](https://discourse.gohugo.io/t/cloudflare-pages-exploring/39437/6 "2022-07-13T08:36:38Z")

</div>

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