MarkDown 파일 Html로 변경하기

치치·2021년 4월 12일
0

주피터노트

목록 보기
2/2

파일명.md 로 작성된 파일을 html 파일로 컨버팅하는 방법이다.
Centos 환경에서 변경하는 과정을 설명한다.

1. pandoc 설치

```
# yum repolist
# rpm -qa epel-release
# yum list epel-release
# yum install epel-release
# rpm -qa epel-release
# yum list installed epel-release
# yum repolist
# yum install pandoc
```

2. 다른 종류의 파일로 떨구기

  • HTML로 변환
    # pandoc spring-boot.md -f markdown -t html -s -o test1.html

  • MS WORD(docx) 로 변환
    # pandoc test1.md -f markdown -t docx -s -o test1.docx

  • Asciidoc 변환
    # pandoc -o security-basic.asciidoc security-basic.md

3. html 파일로 떨굴 때 title 관련 에러 발생 시

  • 파일 상단에 아래 내용 붙여주기
---
    title: "타이틀"
    output:
      html_document:
        toc: yes
    pagetitle: 타이틀
---
profile
안녕하세요. 개발자입니다.

0개의 댓글