| title | Kitchen Sink Demo |
|---|---|
| author | Topdeck Team |
This is bold text and this is italic text.
You can also do bold and italic together.
Here's some inline code in a sentence.
And strikethrough for deleted content.
- First item
- Second item
- Nested item
- Another nested item
- Even deeper
- Back to top level
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
- Fourth step
- Install dependencies
- Go 1.21+
- Git
- Clone the repo
- Use SSH if you have keys
- Use HTTPS otherwise
- Build and run
package main
import (
"fmt"
"os"
)
func main() {
name := os.Getenv("USER")
if name == "" {
name = "World"
}
fmt.Printf("Hello, %s!\n", name)
}def fibonacci(n: int) -> list[int]:
"""Generate Fibonacci sequence."""
if n <= 0:
return []
elif n == 1:
return [0]
fib = [0, 1]
for _ in range(2, n):
fib.append(fib[-1] + fib[-2])
return fib
print(fibonacci(10))const fetchUser = async (id) => {
try {
const response = await fetch(`/api/users/${id}`);
if (!response.ok) {
throw new Error(`HTTP error: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error('Failed to fetch user:', error);
return null;
}
};# Clone and build topdeck
git clone https://github.com/alexcabrera/topdeck.git
cd topdeck
go build .
# Run a presentation
./topdeck examples/full-example.md| Language | Typing | Paradigm | Year |
|---|---|---|---|
| Go | Static | Imperative | 2009 |
| Python | Dynamic | Multi | 1991 |
| Rust | Static | Multi | 2010 |
| JavaScript | Dynamic | Multi | 1995 |
| Haskell | Static | Functional | 1990 |
"Simplicity is the ultimate sophistication."
— Leonardo da Vinci
This is a blockquote.
This is nested inside the blockquote.
It can have multiple paragraphs.
Back to the outer level.
Here are some useful links:
- Parse markdown files
- Extract frontmatter
- Split on horizontal rules
- Render with Glamour
- Style with Lipgloss
- Keyboard navigation
- Add image support
- Add speaker notes
You can use horizontal rules within slides for visual separation.
Like this one above (using * * *).
Or this one (using ___).
Note: Only --- on its own line creates a new slide!
Topdeck supports emoji! 🚀 ✨ 🎉
Some favorites:
- 👍 Thumbs up
- ❤️ Heart
- 🔥 Fire
- ⭐ Star
- ☕ Coffee
// A more complex example with structs and methods
type Presentation struct {
Title string
Author string
Slides []Slide
Current int
}
type Slide struct {
Content string
Notes string
}
func (p *Presentation) Next() bool {
if p.Current < len(p.Slides)-1 {
p.Current++
return true
}
return false
}
func (p *Presentation) Prev() bool {
if p.Current > 0 {
p.Current--
return true
}
return false
}
func (p *Presentation) Progress() string {
return fmt.Sprintf("%d / %d", p.Current+1, len(p.Slides))
}Term 1 : Definition for term 1
Term 2 : Definition for term 2 : Can have multiple definitions
Complex Term : A longer definition that explains the concept in more detail.
While we don't render LaTeX, you can still show formulas:
E = mc²
a² + b² = c²
∑(i=1 to n) i = n(n+1)/2
╔═══════════════════════════════╗
║ Welcome to Topdeck! ║
║ ║
║ ┌─────────┐ ║
║ │ Slide │ ──► Terminal ║
║ └─────────┘ ║
║ ║
╚═══════════════════════════════╝
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
First paragraph with some introductory text that sets up the context for what follows.
Second paragraph that builds on the first one and provides more details about the topic at hand.
Third paragraph that wraps things up and provides a conclusion or summary of the key points.
| Key | Action |
|---|---|
→ l n Space |
Next slide |
← h p |
Previous slide |
g Home |
First slide |
G End |
Last slide |
q Esc |
Quit |
That's all folks!
Press q to exit.
Hidden Bonus Slide
You found the secret slide! 👀
_____ _ _
|_ _| |__ __ _ _ __ | | _____
| | | '_ \ / _` | '_ \| |/ / __|
| | | | | | (_| | | | | <\__ \
|_| |_| |_|\__,_|_| |_|_|\_\___/