This guide will show you how to format text using Markdown through a delicious pasta recipe. Let’s explore the world of food while learning Markdown syntax!
Basic Syntax Demonstrationh2
Heading Levelsh3
In recipes, we often need different levels of headings to organize content. Markdown provides six heading levels:
# Classic Garlic Bacon Pasta## Ingredients Preparation### Main Ingredients#### Seasonings##### Kitchen Tools###### Tips
Text Formattingh3
When describing recipes, we often need to emphasize certain important information:
Important steps need to be bold
Critical timing uses italics
Special notes use both bold and italics
Optional steps use strikethrough
**Important steps** need to be bold*Critical timing* uses italics***Special notes*** use both bold and italics~~Optional steps~~ use strikethrough
Lists Usageh3
Ingredients List (Unordered List):h4
- Pasta 400g
- Bacon 200g
- Preferably with a good mix of fat and lean
- Cut into small pieces
- Minced garlic 3-4 cloves
- Olive oil 2 tablespoons
- Pasta 400g- Bacon 200g - Preferably with a good mix of fat and lean - Cut into small pieces- Minced garlic 3-4 cloves- Olive oil 2 tablespoons
Cooking Steps (Ordered List):h4
- Boil water with a pinch of salt
- Add pasta, cook until 80% done
- Meanwhile, prepare the sauce:
- Heat oil in pan
- Sauté minced garlic
- Add bacon and stir-fry
1. Boil water with a pinch of salt2. Add pasta, cook until 80% done3. Meanwhile, prepare the sauce: 1. Heat oil in pan 2. Sauté minced garlic 3. Add bacon and stir-fry
Blockquotesh3
Chef’s tip: Add a bit of olive oil to the boiling water to prevent the pasta from sticking together.
Remember to save some pasta water, it can be used to adjust the sauce consistency.
> Chef's tip: Add a bit of olive oil to the boiling water to prevent the pasta from sticking together.>> Remember to save some pasta water, it can be used to adjust the sauce consistency.
Code Blocksh3
Can be used to show precise ingredient ratios or timing:
# Ingredient Calculatordef calculate_ingredients(servings): base_pasta = 100 # grams/person base_bacon = 50 # grams/person
return { "pasta": base_pasta * servings, "bacon": base_bacon * servings }
Tablesh3
Nutritional Information:
Nutrient | Amount (per 100g) | % Daily Value |
---|---|---|
Calories | 157 kcal | 7.85% |
Protein | 5.7g | 9.5% |
Carbs | 21.6g | 7.2% |
Links and Imagesh3
For more culinary inspiration, visit: Food Forum
Final dish presentation:
Horizontal Ruleh3
Used to separate different content sections:
Inline Codeh3
Pasta cooking time: 8-10 minutes
, maintain an al dente
texture.
Math Formulash3
Ingredient ratio calculation:
Calorie calculation formula:
Task Listsh3
Preparation checklist:
- Purchase ingredients
- Wash and cut ingredients
- Prepare cooking utensils
- Preheat oven
Footnotesh3
This dish is inspired by traditional Italian recipes1.
Finally, I hope this food-themed Markdown guide helps you better understand and use Markdown syntax. Remember, just like cooking, practice makes perfect! Happy writing! 👨🍳👩🍳
You can find this file: src/content/posts/markdown-syntax-guide.md
in the project and learn it based on the rendering results.
Footnotesh2
-
From “100 Classic Italian Pasta Dishes”, page 23. ↩