Mastering Markdown
Published:
By Andrew RutledgeThis post serves as a quick-reference cheat sheet for rendering various elements beautifully within the archive.
Mastering Markdown in the Archive
Welcome to the A4 Analytics Markdown guide. This platform runs on a custom Parsedown engine integrated with Highlight.js, allowing for seamless documentation of complex data pipelines, SQL queries, and Python scripts.
This post serves as a quick-reference cheat sheet for rendering various elements beautifully within the archive.
1. Syntax Highlighting & Code Blocks
The archive is configured with the Atom One Dark theme. To trigger the syntax highlighter and the custom copy-to-clipboard button, wrap your code in triple backticks and specify the language.
Python Example
import pandas as pd
def clean_dataset(df):
"""Standardizes column names and drops nulls."""
df.columns = df.columns.str.lower().str.replace(' ', '_')
return df.dropna()
SQL Example
-- Calculating rolling averages for monthly sales
SELECT
order_date,
SUM(sales) as daily_sales,
AVG(SUM(sales)) OVER (ORDER BY order_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) as rolling_7d_avg
FROM order_history
GROUP BY order_date;
2. Text Formatting & Hierarchy
Creating readable documentation requires good typographic hierarchy.
- Use a single asterisk for italic emphasis.
- Use double asterisks for strong bold text.
- Use double tildes for
deprecated workflows. - Use backticks for
inline codereferences, like defining a$variable.
Nested Lists
Breaking down complex Alteryx workflows or data cleaning steps is best done with nested lists:
- Extract data via API
- Authenticate using bearer token
- Handle pagination loops
- Transform payload to JSON
- Load to target database
3. Data Visualization in Tables
For data mapping or schema definitions, Markdown tables are essential. The A4 custom CSS handles the borders and padding automatically.
| Column Name | Data Type | Description |
|---|---|---|
user_id |
INT | Primary Key, Auto-increment |
email_hash |
VARCHAR | SHA-256 hashed email address |
last_login |
TIMESTAMP | UTC timestamp of last activity |
is_active |
BOOLEAN | Account status flag |
4. Blockquotes & Callouts
When documenting warnings, best practices, or quoting documentation from vendors like Tableau or Microsoft, use the blockquote syntax.
Crucial Note: Always ensure you are working on the development database before running destructive
DROPorTRUNCATEcommands. Measure twice, query once.
Happy documenting!
Now again without the formatting
# Mastering Markdown in the Archive
Welcome to the A4 Analytics Markdown guide. This platform runs on a custom Parsedown engine integrated with Highlight.js, allowing for seamless documentation of complex data pipelines, SQL queries, and Python scripts.
This post serves as a quick-reference cheat sheet for rendering various elements beautifully within the archive.
---
## 1. Syntax Highlighting & Code Blocks
The archive is configured with the **Atom One Dark** theme. To trigger the syntax highlighter and the custom copy-to-clipboard button, wrap your code in triple backticks and specify the language.
### Python Example
```python
import pandas as pd
def clean_dataset(df):
"""Standardizes column names and drops nulls."""
df.columns = df.columns.str.lower().str.replace(' ', '_')
return df.dropna()
```
### SQL Example
```sql
-- Calculating rolling averages for monthly sales
SELECT
order_date,
SUM(sales) as daily_sales,
AVG(SUM(sales)) OVER (ORDER BY order_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) as rolling_7d_avg
FROM order_history
GROUP BY order_date;
```
## 2. Text Formatting & Hierarchy
Creating readable documentation requires good typographic hierarchy.
* Use a single asterisk for *italic emphasis*.
* Use double asterisks for **strong bold text**.
* Use double tildes for ~~deprecated workflows~~.
* Use backticks for `inline code` references, like defining a `$variable`.
### Nested Lists
Breaking down complex Alteryx workflows or data cleaning steps is best done with nested lists:
1. Extract data via API
* Authenticate using bearer token
* Handle pagination loops
2. Transform payload to JSON
3. Load to target database
## 3. Data Visualization in Tables
For data mapping or schema definitions, Markdown tables are essential. The A4 custom CSS handles the borders and padding automatically.
| Column Name | Data Type | Description |
| :--- | :---: | :--- |
| `user_id` | INT | Primary Key, Auto-increment |
| `email_hash` | VARCHAR | SHA-256 hashed email address |
| `last_login` | TIMESTAMP | UTC timestamp of last activity |
| `is_active` | BOOLEAN | Account status flag |
## 4. Blockquotes & Callouts
When documenting warnings, best practices, or quoting documentation from vendors like Tableau or Microsoft, use the blockquote syntax.
> **Crucial Note:** Always ensure you are working on the development database before running destructive `DROP` or `TRUNCATE` commands. Measure twice, query once.
---
*Happy documenting!*