Can functions access content at all?

I have a nuxt site with netlify cms, I want to make a function to refresh my content in algolia. So the content exists in the /app/content folder as json files. Do I have ANY ability to parse those in the function?

I’ve tried using the syntax from the vuex helper

const entry = require(`@/content/blog/some-post.json`);

But I just get a “Cannot find module” error

Functions do not have access to your site’s source code, no. You’d need to use some process like this to copy files you want to access into the function, which may not be practical depending on the size of your site:

Access to static site published data is one example, and showing all the possibilities for functions deployment.