# Offline mode for resources.GetRemote

**URL:** <https://discourse.gohugo.io/t/offline-mode-for-resources-getremote/45665>\
**Category:** support\
**Created:** [August 8, 2023, 8:02pm UTC](https://discourse.gohugo.io/t/offline-mode-for-resources-getremote/45665 "2023-08-08T20:02:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![couchbed](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@couchbed](https://discourse.gohugo.io/u/couchbed)\
**Post date:** [August 8, 2023, 8:02pm UTC](https://discourse.gohugo.io/t/offline-mode-for-resources-getremote/45665/1 "2023-08-08T20:02:19Z")

</div>

I’m occasionally in a situation where I’d like to work on one of my websites while I don’t have internet access. However, if the site is using resources.GetRemote, the build fails because it can’t access the resource.

This of course makes sense, but would there be any way to tell it “Just do your best, I know some content won’t be present, just skip over it?” That way I could work on the other parts of the website that aren’t using remote resources.

I tried using `with` but it seems that hugo is still making the attempt to find the resource and erroring.

Caching could be an option I suppose. But that puts you in the situation of having to make sure you spin up the server so stuff gets cached while you still have internet access, and if you forget to do that, you’d be out of luck.

Any ideas?

---

<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:** [August 8, 2023, 8:25pm UTC](https://discourse.gohugo.io/t/offline-mode-for-resources-getremote/45665/2 "2023-08-08T20:25:45Z")

</div>

Have you tested this construct?

> **[Hugo Pipes](https://gohugo.io/hugo-pipes/introduction/#error-handling)**
>
> Hugo Pipes is Hugo's asset processing set of functions.

---

<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:** [August 9, 2023, 3:04am UTC](https://discourse.gohugo.io/t/offline-mode-for-resources-getremote/45665/3 "2023-08-09T03:04:08Z")

</div>

Let’s say I have the result cached from a previous run, but the maxAge has already passed. If I warn instead of error when unable to reach the destination, will the expired cache still be available?

---

<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:** [August 9, 2023, 8:43am UTC](https://discourse.gohugo.io/t/offline-mode-for-resources-getremote/45665/4 "2023-08-09T08:43:29Z")

</div>

> [@jmooring](#):
>
> If I warn instead of error when unable to reach the destination, will the expired cache still be available?

I’m slightly confused by the question, but I’m pretty sure the answer is “no”.
