# Accessing a theme's package.json variables

**URL:** <https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819>\
**Category:** Developer help\
**Created:** [January 4, 2019, 5:53pm UTC](https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819 "2019-01-04T17:53:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kheo](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@Kheo](https://forum.ghost.org/u/Kheo)\
**Post date:** [January 4, 2019, 5:53pm UTC](https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819/1 "2019-01-04T17:53:27Z")

</div>

Hi there,

Can anyone share a link explaining how to access the config variables of a theme’s package.json, unsing handlebars (or anything adequate to process those values in an .hbs file)?  
It surely is possible since:  
“config”: {  
“posts\_per\_page”: 10  
}  
is used.  
thanks!

---

<div class="post-metadata">

**Author:** ![Hannah](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hannah/32/22_2.png) [@Hannah](https://forum.ghost.org/u/Hannah)\
**Post date:** [January 4, 2019, 5:56pm UTC](https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819/2 "2019-01-04T17:56:19Z")

</div>

This is documented here:

> **[Ghost Handlebars Theme Helpers: @config](https://ghost.org/docs/themes/helpers/config/)**
>
> How to access global data properties with @config in your Handlebars theme. Read more about Ghost themes ⚡️

---

<div class="post-metadata">

**Author:** ![Kheo](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@Kheo](https://forum.ghost.org/u/Kheo)\
**Post date:** [January 4, 2019, 6:04pm UTC](https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819/3 "2019-01-04T18:04:14Z")

</div>

oops… thank you!  
(I’m sort of lost in the docs, but that’s no excuse)

---

<div class="post-metadata">

**Author:** ![Kheo](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@Kheo](https://forum.ghost.org/u/Kheo)\
**Post date:** [January 4, 2019, 6:09pm UTC](https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819/4 "2019-01-04T18:09:43Z")

</div>

mmm…

> Inside of the config block, there is currently a single supported property - posts\_per\_page.

so if I define

```
  "config": {
    "posts_per_page": 10,
    "foobar": "123"
  }

```

I won’t be able to have `{{@config.foobar}}`, right?

Can it be hacked, or it’s hopeless at this point? (I’d love to use @config to configure a theme)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [January 18, 2019, 6:09pm UTC](https://forum.ghost.org/t/accessing-a-themes-package-json-variables/4819/5 "2019-01-18T18:09:51Z")

</div>

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