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
-
I'd like to access the
site.data
object from inside a helper function. Can you recommend how that is done?Example code:
Currently, I'm getting the error
site is undefined
which makes sense as I don't see the var in the live data of VScode debugger. However, I don't see thesite
nor thedata
objects 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