여태껏 Linode에 매달 5천원씩 바치고 있었는데 (한참전에 akamai cloud로 바뀐듯?) 좀 많이 아깝다. 뭐 가장 싼 호스팅이여서 워드프레스가 겨우겨우 돌아가는 문제도 있었고.

내 웹사이트는 그리 무거운 호스팅이 필요하지 않은데, 최근 (8개월 전) DigitalOcean에서 무료로 Static website를 호스팅 한다는 것을 알게 되었다. 나 역시도 워드프레스의 무거움 때문에 언젠가는 이동해야겠다고 마음먹은 참에 드디어 8개월만에 성공적으로 옮겼다. 결과적으로 현재 홈페이지는 Hugo 기반으로 작동한다. 내가 블로그 글을 markdown 형식으로 작성을 하면 Hugo가 자동적으로 HTML 파일로 변환을 해서 ./public/이라는 폴더에 저장을 한다. 난 그럼 그 폴더를 깃헙에 푸시를 한다. DigitalOcean은 내 Private한 Repo를 읽을 수 있기에, Static하게 저장된 웹사이트를 deploy하게 된다.

Wordpress에서 Hugo 문법으로 옮기는데 사실 그리 쉽지는 않았는데 Claude AI와 같이 하니까 겨우겨우 어느 정도 마무리가 됐다. 예전 글들 중에서 좀 변환이 제대로 되지 않은 글 들도 있는데, 그걸 누가 읽을까.

추가: archetypes/default.md

+++
title = '{{ $basename := .File.ContentBaseName }}{{ $afterDate := substr $basename 11 }}{{ if $afterDate }}{{ replace $afterDate "-" " " | title }}{{ else }}{{ replace $basename "-" " " | title }}{{ end }}'
date = {{ .Date }}
draft = true
+++

이렇게 해놓고

hn.ps1

#!/usr/bin/env pwsh
param(
    [Parameter(Mandatory=$true)]
    [string]$PostName
)

# Get current date in the format YYYY-MM-DD
$date = Get-Date -Format "yyyy-MM-dd"
$year = Get-Date -Format "yyyy"

# Create the full file path following your naming convention
$fileName = "$date-$PostName.md"
$fullPath = "posts/$year/$fileName"

# Run hugo new command
Write-Host "Creating new post: $fullPath" -ForegroundColor Green
hugo new $fullPath

if ($LASTEXITCODE -eq 0) {
    Write-Host "✅ Successfully created: content/$fullPath" -ForegroundColor Green
    Write-Host "📝 Opening in default editor..." -ForegroundColor Yellow
    
    # Optional: Open the file in your default editor (you can customize this)
    # Uncomment one of the following lines based on your preference:
    
    # For VS Code:
    # code "content/$fullPath"
    
    # For Notepad:
    # notepad "content/$fullPath"
    
    # For default system editor:
    # Start-Process "content/$fullPath"
} else {
    Write-Host "❌ Failed to create post" -ForegroundColor Red
}

이런 파일을 만들어 놓으니까

./hn "새 포스트"

이렇게 하면 알아서

./content/posts/2025/2025-09-24-새로운 제목.md 라는 포스트를 만들어준다.

+++
title = '새로운 제목'
date = 2025-09-24T07:46:19-04:00
draft = true
+++

물론 내가 만든건 아니고 Claude가…