question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access to all route data in PageContext

See original GitHub issue

Description

Hello, I am making a page which links to all my MDX pages in my blog directory. I found that I can get all of this information via pageContext._pageFilesAll, but obviously this is not a public/stable API due to the leading underscore.

Specifically I’m doing this pageContext._pageFilesAll.filter((f) => f.pageId.match(/^\/pages\/blog/)) And that gets me all the information I need to do what I want, but I wish I could do this in an official way, without a plugin.

Can this or similar access be made official? Or is there already an official way to do this?

Thank you!

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
brilloutcommented, Nov 29, 2022

I do support fixing internal bugs like these. I’ll have a look at it.

0reactions
reedspoolcommented, Dec 7, 2022

Thanks! I will try it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found