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

Bug : Broken "Edit the Page" Link on Intro to OSS Page #241

Closed
Codexnever opened this issue Oct 1, 2024 · 5 comments · Fixed by #247
Closed

Bug : Broken "Edit the Page" Link on Intro to OSS Page #241

Codexnever opened this issue Oct 1, 2024 · 5 comments · Fixed by #247
Assignees
Labels
🐛 bug Something isn't working

Comments

@Codexnever
Copy link
Contributor

Describe the bug

Expected Behavior

The link should redirect to the correct file for editing in the repository, allowing users to contribute to the documentation.

Actual Behavior

The link leads to a 404 Not Found error, preventing access to the intended editing page.

Steps to reproduce

bug

Steps to Reproduce

  1. Go to the Intro to Open Source Course.
  2. Scroll down to the bottom of the page.
  3. Click on the "Edit the page" link.
  4. Observe that it redirects to https://github.com/open-sauced/intro/docs/intro-to-oss/README.md, which results in a 404 error.

I would like to be assigned to this issue to help resolve it. Thank you!

@adiati98
Copy link
Member

adiati98 commented Oct 3, 2024

Hey @Codexnever,

We've removed the needs triage label. You can assign yourself to this issue.
Please read our Contributing Guidelines for more information.

Thank you. 😊

@Codexnever
Copy link
Contributor Author

.take

Thank you for removing the label, @adiati98 I'll start working on the issue now. 😊

@Codexnever
Copy link
Contributor Author

Hey @adiati98 ,

I need some assistance regarding my recent changes in open-sauced/intro project.

Background:

I made some changes in the Docusaurus files, specifically in the site-docs-intro-to-oss-readme-md-014.json file located at:

.docusaurus/docusaurus-plugin-content-docs/default/site-docs-intro-to-oss-readme-md-014.json

The changes work perfectly on my local environment, but when I try to push them, I encounter issues during the deploy preview.

The Issue:

I noticed that my Docusaurus site is not loading properly in the preview. A common error I see is:

Your Docusaurus site did not load properly.
A very common reason is a wrong site baseUrl configuration.
Current configured baseUrl = /learn/
We suggest trying baseUrl = /

Git Configuration:

Currently, my .gitignore file includes the following lines regarding the Docusaurus folder:

!.docusaurus/docusaurus-plugin-content-docs/default/site-docs-intro-to-oss-readme-md-014.json
.docusaurus/

I want to know if it’s advisable to remove the Docusaurus folder from the .gitignore file altogether to push all changes or if I should only be focusing on the specific file I modified.
Deploy err

Questions:

  1. Should I remove .docusaurus/ from my .gitignore to push all changes related to Docusaurus?
  2. Is there a specific reason why the site works locally but fails in the preview?
  3. Are there any best practices or guidelines for handling generated files in Docusaurus that I should be aware of?

@BekahHW
Copy link
Member

BekahHW commented Oct 4, 2024

@Codexnever you shouldn't need to make any changes in your docusaurus files.

So the reason it works locally and not on the preview is bc it's working from a redirected site. You can create the PR if it's working locally.

The issue seems to be bc we broke the course into two subfolders:

image

The subfolder isn't showing up in the path: https://github.com/open-sauced/intro/docs/intro-to-oss/README.md

I think this can be addressed on line 47 of docusaurus.config.js. But we need to find a way to make that dynamic.

@Codexnever
Copy link
Contributor Author

Hey @BekahHW ,

I noticed that while everything works fine locally, the deploy preview is showing an issue with the baseUrl configuration. The error message states:

"Your Docusaurus site did not load properly. A very common reason is a wrong site baseUrl configuration. Current configured baseUrl = /learn/."

It suggests trying baseUrl = /, but my config has it set to /learn/ as needed. When I go to the /learn route manually, it works fine, but initially, this error appears. Additionally, the deploy preview isn't loading the CSS properly, so only text-based content is displayed.

I’ve raised a PR which you can check #247 , but this issue seems to persist only in the deployment. Could you take a look and let me know if there are any adjustments I should make or if there's something with the deployment setup causing the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
3 participants