Files
Drone-FabAcademy-2025/docs/Assignments/week_1_fabacademy/markdown.md
2025-01-29 12:05:01 +01:00

58 lines
3.2 KiB
Markdown

# Markdown
## What is Markdown
Markdown is a markup language. It's used a lot for documenting because its easy to style and you dont have to struggle with html css when used with Mkdocs or Hugo.
## How do I use markdown
Markdown can be used anywhere. You just simple have to create a file that ends with `.md`. If you wanna view the markdown that you're writing in vistual studio code you can click the icon below in the top right of your screen.
![alt text](../../assets/markdownViewerIcon.jpg)
### Styling in markdown
You can syle text by placing different operators around text.
Basic markdown syntax
| Text | How to create it |
| --------------------------------------------------- | ----------------------------------------------------- |
| *very italic* | ```*a*``` |
| **bold** | ```**bold**``` |
| # Head 1 | ```# Head1``` |
| ## Head 2 | ```## Head 2 ``` |
| ### Head 3 | ```### Head 3 ``` |
| `code` | suround text with ` |
| [Link](https://www.youtube.com/watch?v=dQw4w9WgXcQ) | `[link](https://www.youtube.com/watch?v=dQw4w9WgXcQ)` |
| ![image](relative_path_to_image) | `![image](relative_path_to_image_or_link) ` |
| | |
## Markdown conventions
All markdown files must start with a `Head1` otherwise Mkdocs won't understand the file and the pipline will crash.
## Drop down menu's
### How do I install drop down menus?
Drop down menu's are part of the `pymdownx.details` extension. You need to place that in your `mkdocs.yml` under `markdown_extensions:` liket his:
```yaml
markdown_extensions:
- pymdownx.details
```
### How do I use it
You can use it like this. Don't forget that you need to use 2 tabs to get the text in the collapsable box.
```
??? Notes
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent lacinia rutrum nibh sit amet pharetra. Aenean in metus fringilla, varius nulla eu, malesuada nulla. Praesent placerat tortor lacus, nec sollicitudin felis elementum sit amet. Nam mollis tincidunt arcu ac gravida. Vivamus turpis nisi, lacinia in eleifend sed, interdum ultricies quam.
```
Result:
??? Info
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent lacinia rutrum nibh sit amet pharetra. Aenean in metus fringilla, varius nulla eu, malesuada nulla. Praesent placerat tortor lacus, nec sollicitudin felis elementum sit amet. Nam mollis tincidunt arcu ac gravida. Vivamus turpis nisi, lacinia in eleifend sed, interdum ultricies quam.
## Sources
* [markdown cheatsheet](https://www.markdownguide.org/cheat-sheet/)
* [docs about drop down menu's](https://facelessuser.github.io/pymdown-extensions/extensions/details/)