8000 Merge pull request #15 from dideler/patch-1 · s30java/github-cheat-sheet@0d31b36 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d31b36

Browse files
author
Rafal Chmiel
committed
Merge pull request tiimgreen#15 from dideler/patch-1
Add section on relative links
2 parents eda78be + 5ceb541 commit 0d31b36

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i
2828
- [Merged Branches](#merged-branches)
2929
- [Quick Licensing](#quick-licensing)
3030
- [TODO Lists](#todo-lists)
31+
- [Relative Links](#relative-links)
3132
- [.gitconfig Recommendations](#gitconfig-recommendations)
3233
- [Aliases](#aliases)
3334
- [Auto-correct](#auto-correct)
@@ -381,6 +382,19 @@ When they are clicked, they will be updated in the pure Markdown:
381382
- [ ] Sleep
382383
```
383384

385+
## Relative Links
386+
387+
[Relative links](https://help.github.com/articles/relative-links-in-readmes) are recommended in your Markdown files when linking to internal content.
388+
389+
```markdown
390+
[Link to a header](#awesome-section)
391+
392+
[Link to a file](docs/readme)
393+
```
394+
395+
Absolute links have to be updated whenever the URL changes (e.g. repo renamed, username changed, project forked).
396+
Using relative links makes your documentation easily stand on its own.
397+
384398
## .gitconfig Recommendations
385399

386400
Your `.gitconfig` is the file that contains all your preferences.

0 commit comments

Comments
 (0)
0