Skip to content

Use with Astro #866

Answered by vivgui
basarozcan asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out! You need to use the node-ray package and use the toJson method, Here's an example of running it from an Astro file frontmatter:

---
import { ray } from 'node-ray';
let logos = (await getLogos()) || [];

ray().toJson(logos);
---

This returns the logos object all expanded:

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by basarozcan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants