-
Notifications
You must be signed in to change notification settings - Fork 2
How to edit MDX files?
Yasin edited this page Nov 5, 2024
·
1 revision
This guide will help you edit .mdx
files directly on GitHub, which is useful for making small changes without needing to clone the repository locally.
- Log in to GitHub.
- Go to the repository where the
.mdx
file you want to edit is located.
All the content is located in: https://github.com/ELIXIR-NO/website/blob/main/src/content
- Once inside the repository, navigate through the directory structure to locate the
.mdx
file. - Click on the file name to open it.
-
With the file open, look for a pencil icon (✏️) in the top-right corner, labeled Edit this file. Click it to open the file in edit mode.
-
Make the necessary edits in the GitHub editor. GitHub supports Markdown and basic MDX syntax, so you can edit text, add links, and insert MDX components directly here.
- Note: If your MDX file includes complex components or imports, you might not get a preview on GitHub, but basic Markdown elements will render.
GitHub doesn’t currently support MDX previews. If you need to see how your changes will render, you should locally run the source code before finalizing your edits.
- Find the Commit changes button.
- Add a brief commit message describing your edits.
- Choose between:
-
Commit directly to the
main
branch to apply changes immediately (DO NOT Choose this option). - Create a new branch for this commit and start a pull request for review (Recommended option )
-
Commit directly to the
- Click Propose changes to save your edits.
- Now GitHub will present you with the PR creation stage.
If you created a pull request (PR):
- Go to the Pull Requests tab.
- Open your new PR to review changes.
- A maintainer should review and approve your change.
- Once, everything looks good, maintainers will deploy the changes.