도구 및 플러그인
적절한 도구와 플러그인을 선택하면 마크다운 작성의 효율성과 품질을 크게 향상시킬 수 있습니다. 이 가이드는 완전한 마크다운 워크플로우를 구축하는 데 도움이 되는 다양한 유형의 도구를 소개합니다.
추천 에디터
전문 코드 에디터
Visual Studio Code
특징: 무료, 크로스 플랫폼, 풍부한 플러그인
추천 플러그인:
- Markdown All in One: 올인원 마크다운 지원
- Markdown Preview Enhanced: 향상된 미리보기
- markdownlint: 문법 검사 및 린팅
- Paste Image: 빠른 이미지 붙여넣기
- Table Editor: 시각적 테이블 편집
- Math to Image: 수식을 이미지로 변환
설정 예제:
{
"markdown.preview.fontSize": 14,
"markdown.preview.lineHeight": 1.6,
"markdown.extension.toc.levels": "1..6",
"markdown.extension.print.absoluteImgPath": false,
"[markdown]": {
"editor.wordWrap": "on",
"editor.lineNumbers": "on",
"editor.quickSuggestions": false
}
}
Typora
특징: WYSIWYG, 깔끔한 인터페이스, 풍부한 테마
주요 기능:
- 실시간 미리보기 편집
- 수식 지원
- 통합 차트 그리기
- 다양한 형식으로 내보내기
- 자동 이미지 복사
- 시각적 테이블 편집
Mark Text
특징: 오픈소스, 실시간 미리보기, 뛰어난 성능
핵심 기능:
- 실시간 미리보기 렌더링
- 집중 모드
- 수식 지원
- 순서도 지원
- 다양한 내보내기 형식
- 사용자 정의 테마
온라인 에디터
StackEdit
특징: 브라우저 기반, 클라우드 동기화, 협업
하이라이트:
- Google Drive, Dropbox 실시간 동기화
- GitHub, 블로그 플랫폼에 게시
- 오프라인 편집 지원
- 수식과 차트
- 협업 편집
- 버전 히스토리
Dillinger
특징: 간단한 인터페이스, 다중 플랫폼 통합
통합 플랫폼:
- GitHub
- Dropbox
- Google Drive
- OneDrive
- HTML, PDF로 내보내기
- 실시간 미리보기
HackMD
특징: 팀 협업, 프레젠테이션 기능
협업 기능:
- 다중 사용자 실시간 편집
- 댓글 시스템
- 버전 관리
- 권한 관리
- 프레젠테이션 모드
- 북 모드
미리보기 및 변환 도구
정적 사이트 생성기
VitePress
특징: Vue 에코시스템, 우수한 성능, 현대적
// .vitepress/config.js
export default {
title: '내 문서',
description: 'VitePress 사이트',
themeConfig: {
nav: [
{ text: '홈', link: '/' },
{ text: '가이드', link: '/guide/' }
],
sidebar: {
'/guide/': [
{
text: '시작하기',
items: [
{ text: '소개', link: '/guide/introduction' },
{ text: '설치', link: '/guide/installation' }
]
}
]
}
},
markdown: {
math: true,
mermaid: true,
lineNumbers: true
}
}
GitBook
특징: 아름다운 인터페이스, 팀 협업, 버전 관리
기능 강조:
- 현대적 읽기 경험
- 팀 협업 편집
- 다중 형식 내보내기
- 검색 기능
- 통합 분석
- API 문서 자동 생성
Docusaurus
특징: Facebook 오픈소스, React 에코시스템, 다국어 지원
// docusaurus.config.js
module.exports = {
title: '내 사이트',
tagline: '내 사이트의 태그라인',
url: 'https://your-docusaurus-test-site.com',
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/',
},
blog: {
showReadingTime: true,
editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
themeConfig: {
navbar: {
title: '내 사이트',
logo: {
alt: '내 사이트 로고',
src: 'img/logo.svg',
},
},
},
};
형식 변환 도구
Pandoc
특징: 전문 변환기, CLI 도구, 풍부한 형식
# Markdown to PDF
pandoc document.md -o document.pdf
# Markdown to Word
gpandoc document.md -o document.docx
# Markdown to HTML (custom style)
pandoc document.md -s --css=style.css -o document.html
# 일괄 변환
find . -name "*.md" -exec pandoc {} -o {}.pdf \;
# 템플릿 사용
pandoc document.md --template=template.html -o output.html
# TOC 생성
pandoc document.md --toc --toc-depth=3 -o document.pdf
markdownlint
특징: 문법 검사, 통합 표준, 자동 수정
# 설치
npm install -g markdownlint-cli
# 단일 파일 확인
markdownlint README.md
# 디렉토리 확인
markdownlint docs/
# 자동 수정
markdownlint --fix *.md
# 설정 파일 사용
markdownlint --config .markdownlint.json docs/
설정 예제:
{
"default": true,
"MD013": {
"line_length": 120,
"code_blocks": false,
"tables": false
},
"MD033": {
"allowed_elements": ["div", "span", "img", "a"]
},
"MD041": false
}
이미지 및 미디어 도구
이미지 처리 도구
PicGo
특징: 자동 업로드, 다중 플랫폼 지원, 플러그인 확장
지원 플랫폼:
- Qiniu Cloud
- Tencent Cloud COS
- Upyun
- GitHub
- Alibaba Cloud OSS
- Imgur
- 사용자 지정 업로드
설정 예제:
{
"picBed": {
"uploader": "github",
"github": {
"repo": "username/image-repo",
"token": "your_github_token",
"path": "images/",
"customUrl": "https://cdn.jsdelivr.net/gh/username/image-repo",
"branch": "main"
}
},
"settings": {
"autoRename": true,
"uploadNotification": true
}
}
ImageOptim / TinyPNG
특징: 이미지 압축, 크기 축소, 품질 유지
# ImageOptim CLI 사용
imageoptim *.png *.jpg
# TinyPNG API 사용
curl --user api:YOUR_API_KEY \
--data-binary @original.png \
--output compressed.png \
https://api.tinify.com/shrink
차트 생성 도구
draw.io (diagrams.net)
특징: 무료, 강력한 다중 형식 내보내기
사용 사례:
- 시스템 아키텍처 다이어그램
- 흐름도 디자인
- UML 다이어그램
- 네트워크 토폴로지 다이어그램
- 민첩 맵
- 프로토타이핑
Excalidraw
특징: 핸드드로잉 스타일, 협업 편집, 사용하기 쉬움
특별한 기능:
- 핸드드로잉 스타일 다이어그램
- 실시간 협업
- 오프라인 사용
- PNG/SVG 내보내기
- 라이브러리 관리
- 무한 캔버스
문서 관리 플랫폼
팀 협업 도구
Notion
특징: 모든 것을 한 번에 통합, 데이터베이스 기능, 풍부한 템플릿
문서 기능:
- 계층적 페이지 구조
- 실시간 협업 편집
- 데이터베이스 통합
- 템플릿 시스템
- 멀티미디어 지원
- API 통합
Confluence
특징: 기업용, 권한 관리, 강력한 통합
기업 기능:
- 고급 권한 제어
- 승인 워크플로우
- 브랜드 사용자 정의
- 기업 통합
- 고급 검색
- 분석 보고서
GitBook
특징: 개발자 친화적, 버전 관리, 아름다운 인터페이스
핵심 장점:
- Git 통합
- 버전 히스토리
- 팀 협업
- 사용자 정의 도메인
- 검색 기능
- 분석 데이터
게시 플랫폼
GitHub Pages
특징: 무료 호스팅, 버전 관리, 사용자 정의 도메인
# .github/workflows/deploy.yml
name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
Netlify
특징: 빠른 배포, CDN 가속, 폼 처리
# netlify.toml
[build]
publish = "dist"
command = "npm run build"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[build.environment]
NODE_VERSION = "16"
Vercel
특징: 제로 컨피그 배포, 전역 CDN, 미리보기 배포
{
"builds": [
{
"src": "package.json",
"use": "@vercel/static-build",
"config": {
"distDir": "dist"
}
}
],
"routes": [
{
"handle": "filesystem"
},
{
"src": "/(.*)",
"dest": "/index.html"
}
]
}
자동화 도구
CI/CD 통합
GitHub Actions
워크플로우 예제:
name: 문서 빌드 및 배포
on:
push:
branches: [ main ]
paths: [ 'docs/**' ]
pull_request:
branches: [ main ]
paths: [ 'docs/**' ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 마크다운 린트
uses: articulate/actions-markdownlint@v1
with:
config: .markdownlint.json
files: 'docs/**/*.md'
build:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Node.js 설정
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: 의존성 설치
run: npm ci
- name: VitePress 빌드
run: npm run docs:build
- name: 아티팩트 업로드
uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
deploy:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: GitHub Pages에 배포
id: deployment
uses: actions/deploy-pages@v1
Pre-commit Hooks
설정 파일 .pre-commit-config.yaml
:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
args: ['--fix']
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
language_version: python3
- repo: local
hooks:
- id: docs-build
name: Build documentation
entry: npm run docs:build
language: system
files: '^docs/.*\.md$'
pass_filenames: false
문서 생성 도구
API 문서 자동 생성
// JSDoc을 사용하여 API 문서 생성
/**
* 새로운 사용자 생성
* @param {Object} userData - 사용자 데이터
* @param {string} userData.name - 사용자 이름
* @param {string} userData.email - 이메일 주소
* @param {string} [userData.role=user] - 사용자 역할
* @returns {Promise<Object>} 생성된 사용자 객체
* @example
* const user = await createUser({
* name: 'John Doe',
* email: 'john@example.com'
* });
*/
async function createUser(userData) {
// 구현...
}
# 문서 생성
jsdoc src/ -d docs/api/ -c jsdoc.conf.json
OpenAPI/Swagger 문서
# openapi.yaml
openapi: 3.0.0
info:
title: User Management API
version: 1.0.0
description: RESTful API for user management system
paths:
/users:
post:
summary: Create a new user
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserRequest'
responses:
'201':
description: User created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/User'
components:
schemas:
User:
type: object
properties:
id:
type: string
example: "12345"
name:
type: string
example: "John Doe"
email:
type: string
format: email
example: "john@example.com"
CreateUserRequest:
type: object
required:
- name
- email
properties:
name:
type: string
email:
type: string
format: email
role:
type: string
default: "user"
성능 최적화 도구
빌드 최적화
이미지 최적화 스크립트
// optimize-images.js
const sharp = require('sharp');
const fs = require('fs');
const path = require('path');
async function optimizeImages(dir) {
const files = fs.readdirSync(dir);
for (const file of files) {
const filePath = path.join(dir, file);
const stat = fs.statSync(filePath);
if (stat.isDirectory()) {
await optimizeImages(filePath);
} else if (/\.(jpg|jpeg|png)$/i.test(file)) {
const outputPath = filePath.replace(/\.(jpg|jpeg|png)$/i, '.webp');
await sharp(filePath)
.webp({ quality: 80 })
.toFile(outputPath);
console.log(`최적화됨: ${file} -> ${path.basename(outputPath)}`);
}
}
}
optimizeImages('./docs/assets/images');
문서 빌드 스크립트
// build-docs.js
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
function buildDocs() {
console.log('📝 문서 빌드 시작...');
// 1. 마크다운 문법 확인
console.log('🔍 마크다운 문법 확인 중...');
execSync('markdownlint docs/', { stdio: 'inherit' });
// 2. 이미지 최적화
console.log('🖼️ 이미지 최적화 중...');
execSync('node optimize-images.js', { stdio: 'inherit' });
// 3. 정적 사이트 빌드
console.log('🏗️ 정적 사이트 빌드 중...');
execSync('vitepress build docs', { stdio: 'inherit' });
// 4. 사이트맵 생성
console.log('🗺️ 사이트맵 생성 중...');
generateSitemap();
console.log('✅ 문서 빌드 완료!');
}
function generateSitemap() {
const baseUrl = 'https://yoursite.com';
const pages = findMarkdownFiles('./docs');
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${pages.map(page => ` <url>
<loc>${baseUrl}${page}</loc>
<lastmod>${new Date().toISOString().split('T')[0]}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>`).join('\n')}
</urlset>`;
fs.writeFileSync('./docs/.vitepress/dist/sitemap.xml', sitemap);
}
function findMarkdownFiles(dir, basePath = '') {
const files = [];
const items = fs.readdirSync(dir);
for (const item of items) {
const fullPath = path.join(dir, item);
const relativePath = path.join(basePath, item);
if (fs.statSync(fullPath).isDirectory()) {
files.push(...findMarkdownFiles(fullPath, relativePath));
} else if (item.endsWith('.md') && item !== 'README.md') {
const urlPath = relativePath
.replace(/\.md$/, '.html')
.replace(/\\/g, '/');
files.push('/' + urlPath);
}
}
return files;
}
buildDocs();
도구 선택 가이드
필요에 따라 도구 선택
## 개인 블로그 작성
추천 조합:
- 에디터: Typora 또는 Mark Text
- 배포: GitHub Pages + Jekyll
- 이미지: PicGo + GitHub
- 버전: Git
## 팀 문서 협업
추천 조합:
- 플랫폼: Notion 또는 GitBook
- 에디터: VS Code + 플러그인
- 버전: Git + GitHub
- 자동화: GitHub Actions
## 기술 문서 웹사이트
추천 조합:
- 생성기: VitePress 또는 Docusaurus
- 에디터: VS Code
- 배포: Netlify 또는 Vercel
- 차트: Mermaid + draw.io
## API 문서
추천 조합:
- 도구: Swagger/OpenAPI
- 생성: Redoc 또는 SwaggerUI
- 통합: Postman
- 테스트: Newman
## 학술 논문
추천 조합:
- 에디터: Typora + Pandoc
- 수식: MathJax/KaTeX
- 인용: Zotero
- 변환: Pandoc LaTeX
비용 비교
도구 유형 | 무료 옵션 | 유료 옵션 | 기업 버전 |
---|---|---|---|
에디터 | VS Code, Mark Text | Typora (¥89) | - |
호스팅 | GitHub Pages | Netlify Pro (¥190/mo) | 기업 사용자 정의 |
협업 | GitHub | Notion (¥64/mo/user) | Confluence (¥42/mo/user) |
이미지 호스팅 | GitHub | Qiniu Cloud (¥0.1/GB) | 기업 사설 클라우드 |
도메인 | github.io | 사용자 정의 도메인 (¥60/year) | 기업 도메인 |
관련 문법
요약 추천
초보자 추천 설정
🚀 빠른 시작 키트:
1. 에디터: VS Code + Markdown All in One
2. 미리보기: 실시간 미리보기 플러그인
3. 버전: Git + GitHub
4. 배포: GitHub Pages
5. 이미지: 저장소에 직접 업로드
💰 비용: 완전 무료
⏱️ 학습 시간: 1-2시간
🎯 적합 대상: 개인 블로그, 작은 프로젝트 문서
고급 추천 설정
⚡ 전문가 키트:
1. 에디터: Typora + VS Code
2. 생성기: VitePress
3. 이미지 호스팅: PicGo + 클라우드 스토리지
4. 협업: GitHub + Issues
5. 자동화: GitHub Actions
6. 모니터링: Google Analytics
💰 비용: ¥200-500/year
⏱️ 학습 시간: 1-2일
🎯 적합 대상: 기술 팀, 오픈소스 프로젝트
기업 설정
🏢 기업 키트:
1. 플랫폼: Confluence 또는 GitBook
2. 편집: VS Code + 팀 플러그인
3. 버전: 기업 Git
4. 배포: 사설 클라우드 + CDN
5. 협업: 완전한 권한 관리
6. 통합: CI/CD + 모니터링 & 경고
💰 비용: ¥5000-20000/year
⏱️ 배포 시간: 1-2주
🎯 적합 대상: 대기업, 제품 문서
이러한 도구를 적절히 선택하고 구성하면 효율적이고 전문적인 마크다운 문서 워크플로우를 구축할 수 있으며, 문서 생성 및 유지보수의 효율성을 크게 향상시킬 수 있습니다.