Editing content in your website
First, you should take a look at our project's file structure. Click on the button below to fold or unfold the file structure tree.
File Structure Tree
- components
- images
- lib
pages
blog
[slug].mdx- ...
index.mdxabout.mdxprojects.mdxteaching.mdx
- public
- styles
- types
Essentially the points of interaction are the *.mdx files, when you want to edit pages across the website. You do not have to worry about the rest of the file structure, assuming you are happy with the current layout and points of editing availability.
If you want to add more pages, you can do so by creating a new *.mdx file in the pages folder. If you want to add more blog posts, you can do so by creating a new *.mdx file in the pages/blog folder.
Editing step by step guide
If you are not very familiar with touching the code and editing it locally, this section is for you. Next up is a list of steps you need to follow to edit the content of the website.
-
Head over to the the GitHub repository of this website.
-
Look for the green button with the text
Codeand click on it. This should open a dropdown. -
The dropdown should have a tab named
Codespaceswhich is a GitHub tool to edit code on the cloud, skipping the need to clone and setup the repository locally. Click on it. -
If this is the first time you are using GitHub Codespaces, you will be asked to create a new one. Click on the
Create codespace on mainbutton. Otherwise, choose the codespace you want to use that you have previously created. -
You should have been taken to an address that is the codespace. The codespace gives you a VS Code window with the code of the repository already cloned and ready to be edited. You can now edit the code as you wish.
-
You will notice that your window has vertical tabs on the left. Here are the relevant tabs:
- The first one is the file explorer. You can use it to navigate through the files of the project.
- The second one is the search tab. You can use it to search for files and text in the project.
- The third one is the version control tab. You can use it to see the changes you have made to the code and commit them.
- The fourth one is the extensions tab. You can use it to install and manage extensions.
-
[Optional] You should install the following extensions for optimal experience:
- Material Icons
- Prettier
- MDX
- ESLint
- Tailwind CSS IntelliSense
- Tailwind Docs
- Atom Keymap
-
On the File Explorer tab, go ahead and open the
pagesfolder. -
Open the
index.mdxfile. If you edit the content belowexport const metayou should see changes in the main text of your website. -
Assuming you have made all the changes you wanted, go ahead and commit them. Go to the Version Control tab.
-
Now you can start by clicking on the
+button on the Version Control tab. Make sure you click the+on theChangesbutton, which will add all your changes to a staging area. There are other+buttons that will add each specific file to the staging area. -
Once you have added all the changes you want to commit, you can write a commit message. You can do so by clicking on the
Messagebutton on the Version Control tab. -
Once you have written a commit message, you can commit your changes by clicking on the
Commitbutton on the Version Control tab. -
Once you have committed your changes, you can push them to the repository by clicking on the
Pushbutton on the Version Control tab.