Access site.data files/data from within a helper function
#5196
Unanswered
lorezyra
asked this question in
Question / Answer
Replies: 2 comments 8 replies
-
|
try |
Beta Was this translation helpful? Give feedback.
6 replies
-
|
You can try |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to access the
site.dataobject from inside a helper function. Can you recommend how that is done?Example code:
Currently, I'm getting the error
site is undefinedwhich makes sense as I don't see the var in the live data of VScode debugger. However, I don't see thesitenor thedataobjects either. Do I need to load a class or library? Or, should I use a simplerequire()to/source/_data/myDataFile.json?Related
Beta Was this translation helpful? Give feedback.
All reactions