intro icon indicating copy to clipboard operation
intro copied to clipboard

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

Open Codexnever opened this issue 1 year ago β€’ 5 comments

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!

Codexnever avatar Oct 01 '24 10:10 Codexnever

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. 😊

adiati98 avatar Oct 03 '24 08:10 adiati98

.take

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

Codexnever avatar Oct 03 '24 14:10 Codexnever

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?

Codexnever avatar Oct 04 '24 11:10 Codexnever

@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.

BekahHW avatar Oct 04 '24 15:10 BekahHW

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?

Codexnever avatar Oct 05 '24 06:10 Codexnever