Hello World
Table of contents:
This is the first post on this blog. Built with Hugo and the Archie-Solarized theme. Everything below is a test of markdown rendering.
Text Formatting
This is bold text and this is italic text. You can also do bold and italic together. Here’s some strikethrough text and some inline code.
Links
- External link: Hugo Documentation
- Auto-link: https://github.com/absolutepraya
- Link with title
Blockquotes
This is a blockquote. It can span multiple lines and should render with a nice left border.
Nested blockquotes:
This is a nested blockquote.
And this is even deeper.
Lists
Unordered List
- First item
- Second item
- Nested item A
- Nested item B
- Even deeper
- Third item
Ordered List
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
Task List
- Set up Hugo blog
- Customize the theme
- Write actual content
- Add analytics
Code Blocks
Python
def fibonacci(n: int) -> list[int]:
"""Generate the first n Fibonacci numbers."""
seq = [0, 1]
for _ in range(2, n):
seq.append(seq[-1] + seq[-2])
return seq[:n]
print(fibonacci(10))
JavaScript
const debounce = (fn, ms) => {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => fn(...args), ms);
};
};
Go
package main
import "fmt"
func main() {
ch := make(chan string)
go func() { ch <- "hello from goroutine" }()
fmt.Println(<-ch)
}
Shell
# Deploy the blog
hugo --minify && rsync -avz public/ server:/var/www/blog/
YAML
server:
host: 0.0.0.0
port: 8080
tls:
enabled: true
cert: /etc/ssl/cert.pem
Tables
| Feature | Supported | Notes |
|---|---|---|
| Bold | Yes | **text** |
| Italic | Yes | *text* |
| Code blocks | Yes | With syntax highlighting |
| Tables | Yes | With alignment |
| Mermaid | Yes | Diagram support |
| Math (KaTeX) | Planned | Needs katex: true |
Horizontal Rules
Content above the rule.
Content below the rule.
Images
Here’s the Hugo logo (external image):
Footnotes
Hugo is one of the most popular static site generators1. It’s written in Go and is known for its speed2.
Mermaid Diagrams
Flowchart
graph TD
A[Write Post] --> B{Is it good?}
B -->|Yes| C[Publish]
B -->|No| D[Revise]
D --> A
C --> E[Share]
Sequence Diagram
sequenceDiagram
participant B as Browser
participant C as CDN
participant S as Hugo Server
B->>C: GET /posts/hello-world/
C-->>B: Cached HTML
Note over B: Renders static page
B->>C: GET /css/main.css
C-->>B: Stylesheet
Git Graph
gitGraph
commit id: "init"
commit id: "add theme"
branch feature
commit id: "customize header"
commit id: "add mermaid"
checkout main
merge feature id: "merge feature"
commit id: "deploy"
Definition List
- Hugo
- A fast static site generator built with Go.
- Markdown
- A lightweight markup language for creating formatted text.
- Solarized
- A sixteen-color palette designed for use with terminal and GUI applications.
That covers most markdown features. More real posts coming soon.