본문 바로가기
DEV

[DEV] Notion2Chirpy 개발일지

by snwo 2022. 1. 6.

사이트 개요

Notion md+svg 으로 export 해야 사용할 수 있습니다.

python run.py (notion export zip file) (github blog repo folder) (CATEGORY..) (--tag tag) (--title "title")

ex : ( python3 run.py ./out.zip ../snwox.github.io CTF TEST --tag testtesg --title "(CTF) Codegate writeup"

 

저 형식으로 사용해야 에러가 나거나 엉뚱한 폴더들이 삭제되지 않습니다.

구현을 잘 못해서 폴더가 날라갈 수 있어요..

 

to move picture folder to /assets/img/notion-zip-name

move markdown file to _posts/ with format ( ex : 2021-01-06-title-in-space.md )

chirpy front matter automatically generated,

but you need to specify categories, tag, title

and all image path will be replaced with /assets/img/notion-zip-name/~.png

front matter

---
title: TITLE
date: YYYY-MM-DD HH:MM:SS +/-TTTT
categories: [TOP_CATEGORIE, SUB_CATEGORIE]
tags: [TAG]     # TAG names should always be lowercase and Only one tag allowed
author:
  name: Full Name
  link: https://example.com
toc: true
math: false
comments: true
mermaid: false
---

categories 는 최소 1개, 최대 2개 지정.

나머지는 선택적으로 명령행 인자를 통해 넣을 수 있습니다.

선택적으로 넣지 않은 것은 default 값으로 front matter 이 생성되고,

글의 제목은 중복되어 표시될 수 있기때문에 md 에 있는 title 은 제거됩니다.

! No Korean

글 제목에 한국어는 안됩니다.
글 제목에 !@#$()_+ 를 제외한 특수문자 안됨. (urlencode 되기떄문)