আধুনিক ব্লগ পৃষ্ঠায় কোড ব্লকগুলোতে স্বয়ংক্রিয়ভাবে ভাষা বা ফাইলের নামের হেডার, লাইট/ডার্ক থিম উপযোগী Chroma কালার এবং সম্পূর্ণ কোড কপি করার বাটন থাকে।
দীর্ঘ কনফিগারেশনে স্বয়ংক্রিয় ফোল্ডিং (previewLines: 8)
ব্লক ফোল্ড করা অবস্থায় থাকলেও Copy বাটনে চাপ দিলে সম্পূর্ণ কোড ক্লিপবোর্ডে কপি হয়:
module:
imports:
- path: github.com/hugo-toha/toha/v4
params:
home:
layout: portfolio
features:
componentsDesign:
enable: true
portfolio:
enable: true
modern:
enable: true
navigation: bar
hero:
style: photo
search:
enable: true
codeBlock:
copyButton:
enable: true
folding:
enable: true
previewLines: 8
প্রসারিত কোড ও লাইন নম্বর
1package backup
2
3import (
4 "context"
5 "fmt"
6 "time"
7)
8
9func RunSnapshot(ctx context.Context, volumeID string) error {
10 deadline, cancel := context.WithTimeout(ctx, 30*time.Second)
11 defer cancel()
12
13 select {
14 case <-deadline.Done():
15 return fmt.Errorf("snapshot %s timed out: %w", volumeID, deadline.Err())
16 default:
17 return nil
18 }
19}
সংক্ষিপ্ত কমান্ড ও সাধারণ টেক্সট লগ
[1/4] Generating build statistics (hugo_stats.json)
[2/4] Compiling semantic Tailwind CSS tokens
[3/4] Bundling modern portfolio and blog scripts
[4/4] Built cleanly
mise run portfolio