My Cool Project
GitHubGitHub
  • My home page!
  • Introduction to Components
  • Code examples
  • SWR
  • Advanced nextra
    • The next.js @ alias
    • Accesing Config
  • getServerSideProps example
  • Loading Dynamically a mdx page with getServerSideProps
    • Secret
  • Example of protected content in a client component
  • Example of reading files in a mdx page
  • Another example of reading files in a mdx page
  • Example of passing info to getStaticProps via context
  • Passing information to getStaticProps
  • Simple example of getStaticProps with cats!
  • Reading a .md file from a .mdx page using getStaticProps (no processing)
  • Building a mdx file using getServerSideProps and buildDynamicMDX preserving Nextra style dynamically reading a mdx file
  • Building a mdx file using getStaticProps and buildDynamicMDX
  • mdx page with useEffect using a client component
  • Combining buildDynamicMDX with Authentication and getServerSideProps and using a client component
  • Live Components
    • Login
    • Page having a mix of private and public content
Question? Give us feedback →Edit this page
Example of reading files in a mdx page
[
  {
    "filename": "e1.json",
    "content": "{\n  \"a\": 4,\n  \"b\": 6\n}"
  },
  {
    "filename": "e2.json",
    "content": "{\n  \"c\": \"hello\",\n  \"d\": \"world!\"\n}"
  }
]
Example of protected content in a client componentAnother example of reading files in a mdx page

MIT 2024 © Nextra.