draft |
---|
true |
Welcome! This is the public repository for our documentation site's content. Here, you'll can edit the notes found on the site. Feel free to jump in, make edits, and contribute to building a valuable resource for everyone studying these topics.
Ready to make some edits or add new content? Awesome! Just follow these simple steps:
-
Fork the Repository
A fork is a copy of this repository under your GitHub account. This allows you to freely make changes without affecting the original repository. Here’s how:
- Go to the repository page: ank-docs-source-code.
- Click the Fork button at the top right corner of the page. This will create a copy of the repository under your GitHub profile.
-
Clone Your Forked Repository
Once you’ve forked the repository, clone it to your local machine to start making edits:
git clone https://github.com/<your-username>/ank-docs-source-code.git
Replace
<your-username>
with your GitHub username. This will download your forked copy to your local system.Navigate into the cloned directory:
cd ank-docs-source-code
-
Create a New Branch for Your Edits
It’s best to make your changes in a separate branch so that your work stays organized. To create a new branch, run:
git checkout -b your-branch-name
Replace
your-branch-name
with a descriptive name for your branch, such asupdate-physics-notes
oradd-math-concepts
. -
Edit the Markdown Files
-
Open the content folder where all the markdown files are stored.
-
Open any markdown (
.md
) file in VS Code or any other markdown editor.- You can view the preview of your edits by clicking the Markdown Preview button at the top right of the editor (VS Code).
-
Alternatively, use this online Markdown & MathJax editor if you prefer a browser-based tool.
-
Feel free to add new files, update existing content, or improve formatting as needed.
-
-
Stage, Commit, and Push Your Changes
After making your changes, use these commands to save and upload them to GitHub:
-
Stage your changes:
git add .
-
Commit your changes with a message describing what you did:
git commit -m "Added new content to physics notes"
-
Push your changes to your forked repository on GitHub:
git push origin your-branch-name
-
-
Stay up-to-date with the Main Repository
To stay up-to-date with the main repository, follow these steps:
-
Add the Main Repository as an Upstream Remote
First, we need to link your local clone to the main repository (the one you forked from), so you can pull updates from it.
git remote add upstream https://github.com/ankitsm08/ank-docs-source-code.git
Here,
upstream
is a label pointing to the main repository. Now your local clone has two remotes:origin
: your fork on GitHubupstream
: the main repository
-
Fetch Updates from the Main Repository
Get the latest changes from the
upstream
repository:git fetch upstream
This fetches any new commits from the main repository without merging them yet.
-
Merge Changes from Upstream into Your Local Branch
To update your fork’s
main
branch, switch to it and merge theupstream
changes:git checkout main git merge upstream/main
This merges the changes from the main repository’s
main
branch into your fork’smain
branch on your local machine. -
Push the Updated Main Branch to Your Fork
Finally, push the updated local
main
branch to your GitHub fork to bring it up-to-date:git push origin main
-
-
Create a Pull Request
Now that your changes are pushed to GitHub, it’s time to submit a Pull Request (PR) to merge your edits into the main repository.
- Go to your forked repository on GitHub.
- You should see a message offering to create a Pull Request for your recently pushed branch. Click on Compare & pull request.
- Add a title and description for your PR explaining your changes.
- Click Create pull request to submit it.
Your PR will be reviewed, and once approved, it will be merged into the main repository. 🎉
To make editing smoother, we recommend these extensions for VS Code:
- Markdown All in One: Offers several tools for working with Markdown.
- Markdown Extended: Provides extra syntax support.
- Markdown Footnotes: Handy for adding detailed references and notes.
- Markdown Preview Mermaid Support: Helps visualize diagrams in Markdown.
- Markdown Table: Makes working with tables easier.
- Markdown YAML Preamble: Assists with YAML front matter.
- Markdown+Math: Enables MathJax for easy mathematical notation.
The repository is organized into folders by subject, making it easy to navigate and find the information you need. Here’s how it’s structured:
-
repo/
This is the main base repository where all the documentation lives.
Inside this repo, you'll find subfolders for each subject:-
(subjects)
- physics/
- maths/
- chemistry/
-
Inside each subject folder, we have sections(topics) and subsections(subtopics).
-
Each directory has its own
_index.md
file to serve as a page.
The_index.md
file is a Markdown file that contains the content for the directory (page in the site).
-
repo
│
├───maths
│ ├───algebra
│ │ ├───binomial-theorem
│ │ ├───complex-numbers
│ │ ├───matrices-&-determinants
│ │ ├───permutation-&-combination
│ │ ├───quadratic-equations
│ │ └───sequence-&-series
│ ├───calculus
│ │ ├───continuity-differentiability
│ │ ├───differentiation
│ │ ├───integration
│ │ └───limits
│ ├───constants-&-approximations
│ │ ├───approximations
│ │ └───constants
│ ├───coordinate-geometry
│ ├───trigonometry
│ │ ├───general-solutions
│ │ ├───identities
│ │ ├───inverse-trigo
│ │ ├───solution-of-triangles
│ │ └───values
│ ├───sets,-relation-&-function
│ └───statistics-&-probability
└───physics
├───constants-&-conversions
│ ├───constants
│ ├───conversions
│ └───units
├───electromagnetism
│ └───induction
├───mechanics
├───modern-physics
├───optics
│ ...
├───thermodynamics
│ ...
└───waves
...
Each subject folder contains an _index.md
file, which creates a page in the site which lists the sections of the subject. The front matter in this file looks like this:
---
menuPre: " <i class='fa-fw fas fa-atom'></i> "
title: 'Physics'
description: 'Physics'
weight: 200
---
{{% children containerstyle="div" style="h2" %}}
- menuPre: This is an optional field that allows you to add an icon to the subject in the menu (using Font Awesome icons).
- title: This is the name of the subject that will be displayed on the site.
- description: A brief description of the subject, which can help users understand what content to expect.
- weight: This determines the order of subjects in the menu. A lower number means it will appear higher up in the list.
- children shortcode: This lists the subsections of the subject.
For subsections of a subject or sections of the subject itself, there will also be subfolders with their own _index.md
files. For example, the maths/ folder might contain a subfolder called trigonometry/ with its own _index.md
file that looks like this:
---
menuPre: " "
title: 'Constants & Conversions'
description: 'Constants & Conversions'
weight: 100
---
{{% children containerstyle="div" style="h3" %}}
In this case:
- menuPre: This is empty(with a space for padding), meaning no icon will be displayed for this subsection.
- title: This is the name of the subsection that will be shown on the site.
- description: A brief description specific to the subsection.
- weight: This controls the order of subsections within the subject, allowing you to organize them in a way that makes sense for users.
- children shortcode: This lists the subsections of the section.
This documentation site is built using Hugo and the Relearn theme. To ensure compatibility with the site, check out the Relearn theme's syntax guidelines: Relearn Hugo Theme Documentation if you want to add advanced features.
- Creating a branch for your changes is important for organization and version control. Instead of making all changes on the main main branch of your fork, each new feature or edit is created in its own branch, such as update-physics-notes.
- This keeps your work separated, so if you decide not to pursue a change or make a mistake, you can abandon that branch without affecting anything else.
- It’s especially useful if you’re making multiple contributions to the same repo; you can work on several things at once without merging unfinished work.
- Pushing to your fork allows you to review your changes on GitHub and make sure they appear as expected. It’s like a final checkpoint before you formally suggest merging them into the main project.
- This also avoids overwhelming the main repository with multiple incomplete changes and commits.
- Only trusted maintainers have direct write access to the main repository. This prevents unwanted edits and ensures a high standard for contributions.
- It also maintains consistency. Multiple people making direct edits without review could lead to errors, conflicts, and confusion in the main project’s content.
-
Stay Organized
- Keep entries clear and concise. If you’re adding a formula, a law, or a concept, ensure it has a title, description, and if possible, a worked example.
-
Follow the Format
- Use existing entries as a reference for formatting. Consistent formatting helps everyone understand and find information quickly.
-
Test Your Changes
- If possible, preview your markdown changes before committing. You can use Markdown Preview in VS Code or the online editor to check your edits.
-
Be Respectful
- Avoid unnecessary edits, and respect the existing content structure. This keeps the documentation coherent for everyone.
-
Regular Updates
- Feel free to improve on any entry, but avoid large-scale changes without discussion. Let’s keep it a friendly, collaborative space!
Happy contributing! 😊
If you have questions or concerns about this Code of Conduct, please reach out via one of the following methods:
- GitHub Issues: Please open an issue in the repository.
- Discussions: Feel free to post in the Discussions section of the repository for any concerns or suggestions.