Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: 500/404 Error from a GitHub Source Content #879

Conversation

ndianabasi
Copy link
Contributor

This PR fixes an error when opening the last page from a remote source. The error manifests as 500 in development mode and 404 error when the document site is generated.

The Sidebar link for the last page is generated from cannot be accessed.

This is the error generated when clicking on the last page from a GitHub source in development mode.

Screenshot 2023-04-03 at 15 52 06

This is the error when the last page from a GitHub source is opened from a static hosting.

Screenshot 2023-04-03 at 16 23 25

Here is our nuxt.config.ts:

export default defineNuxtConfig({
  extends: "@nuxt-themes/docus",
  content: {
    sources: {
      cloud_backend: {
        prefix: "/cloud-backend",
        driver: "github",
        repo: "Cavai/Cloud-Backend",
        branch: "docs%23move_in_docs",
        dir: "docs",
        token: process.env.NUXT_GITHUB_TOKEN
      },
      cloud_frontend: {
        prefix: "/cloud-frontend",
        driver: "github",
        repo: "Cavai/Cloud-Frontend",
        branch: "docs__move_in_docs",
        dir: "docs",
        token: process.env.NUXT_GITHUB_TOKEN
      }
    },
  }
});

@vercel
Copy link

vercel bot commented Apr 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docus ✅ Ready (Inspect) Visit Preview Apr 3, 2023 3:28pm

@bdrtsky bdrtsky merged commit 2eb013d into nuxt-themes:main Apr 10, 2023
2 checks passed
@ndianabasi ndianabasi deleted the fix_500_error_on_last_item_of_github_source_content branch October 6, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants