Skip to content

Sync the title property of the mdx file with the name of the folder #25

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

Open
JeelRajodiya opened this issue May 27, 2024 · 16 comments
Open
Assignees
Labels
✨ Enhancement New feature or request Priority: Low This issue can probably be picked up by anyone looking to contribute to the project.
Milestone

Comments

@JeelRajodiya
Copy link
Member

We have this title property in each .mdx file
image

We want to sync this title with the folder name through the generate outline script

@JeelRajodiya JeelRajodiya added Priority: Low This issue can probably be picked up by anyone looking to contribute to the project. ✨ Enhancement New feature or request labels May 27, 2024
@JeelRajodiya JeelRajodiya added this to the Platform milestone May 28, 2024
@Abro0058T
Copy link

hi @JeelRajodiya , can i work on this issue ?

@JeelRajodiya
Copy link
Member Author

JeelRajodiya commented Jun 2, 2024

Hi @Abro0058T, The project is currently under development, and there is a lot of unstable code. I request you to wait till the project gets some stability if you wish to contribute.

Thanks for showing interest

@JeelRajodiya JeelRajodiya self-assigned this Jun 2, 2024
@29deepanshutyagi
Copy link

i want to work on this issue , as on basis of last comment , now i think this issues can be contributed , please assign me @JeelRajodiya

@JeelRajodiya
Copy link
Member Author

Sure! Assigning to you @29deepanshutyagi. I hope you are clear with the issue (since we have very little description)
Let me know if you have any queries.

@JeelRajodiya
Copy link
Member Author

@29deepanshutyagi are you still working on it? please give an update!

@Karan-Palan
Copy link

I'd like to work on it if nobody else is assigned @JeelRajodiya

@29deepanshutyagi
Copy link

yeah, will soon raise a pr

@JeelRajodiya
Copy link
Member Author

Cool!

@pavanydg
Copy link
Contributor

Hello, @JeelRajodiya. This issue has no updates. Can I take this up?

@JeelRajodiya
Copy link
Member Author

Sure @pavanydg, assigned to you.

@pavanydg
Copy link
Contributor

@JeelRajodiya, can you provide a bit more context about the issue?

Image

Here should I change the folder name from 01-Your-First-Schema to only Your-First-Schema as in title?
Let me know if I'm correct?

Thanks.

@JeelRajodiya
Copy link
Member Author

We have a scripts folder containing generateOutline.ts, which runs before each build and creates outline.json in the content folder.

We need to create a similar script in the scripts folder that runs before the build step. This script should:

  • Read the title from each lesson’s .mdx file.
  • Ensure the title matches the parent folder name (excluding the numbering).

Key Requirements:

  1. The script must compare the .mdx title with the folder name.
  2. If they don’t match, the script should rename the folder while retaining its number. The new name should:
    • Be in Title Case.
    • Use dashes instead of spaces (e.g., First SchemaFirst-Schema).
    • Keep the existing numbering (e.g., 01-Your-First-Schema).

@Yashwanth1906
Copy link

@JeelRajodiya can u assign this to me

@pavanydg
Copy link
Contributor

pavanydg commented Apr 3, 2025

@JeelRajodiya, I'm almost done with this issue, but I have some doubts.
Should we change the actual folder name? or only in the outline.json?
If yes, can't we do it generateOutline.ts itself, as changing the actual foldername will result in the change of the fullPath also?

@JeelRajodiya
Copy link
Member Author

JeelRajodiya commented Apr 6, 2025

@JeelRajodiya, I'm almost done with this issue, but I have some doubts. Should we change the actual folder name? or only in the outline.json? If yes, can't we do it generateOutline.ts itself, as changing the actual foldername will result in the change of the fullPath also?

we should change the actual folder name, if we change the actual folder name it will be reflected in the outline.json file during the build.

Outline.json is just there as a reflection of the folder structure.

@Yashwanth1906
Copy link

@JeelRajodiya, I'm almost done with this issue, but I have some doubts. Should we change the actual folder name? or only in the outline.json? If yes, can't we do it generateOutline.ts itself, as changing the actual foldername will result in the change of the fullPath also?

we should change the actual folder name, if we change the actual folder name it will be reflected in the outline.json file during the build.

Outline.json is just there as a reflection of the folder structure.

@JeelRajodiya Im done with the changes . Can i create a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement New feature or request Priority: Low This issue can probably be picked up by anyone looking to contribute to the project.
Projects
None yet
6 participants