블로그는 티스토리로 처음해보는데 글 작성할 때 매우 화가 난다.
사진 붙여 넣기라던지 글 작성 시 좀 느려지는 경우도 있고 여러가지로 사용자 편의성이 매우 떨어진다.
그러던 중 에버노트 플러그인을 발견하고 사용해보니 신세계를 경험
사용 방법은 아래에 정리

[ 에버노트 플러그인 사용법 ]
- 티스토리 관리자 메뉴에서 플러그인 클릭

- 플러그인 메뉴 중 에버노트 플러그인 선택


- 계정 연결하고 적용 버튼 클릭 ( 나는 이미 연동 중이기 때문에 아래와 같이 뜬다 )


- 이제 에버노트에서 티스토리에 업로드 하고 싶은 노트의 태그에 "티스토리"라고 등록해주자


- 그리고 티스토리에서 글쓰기로 들어가보면 오른쪽 위에 에버노트 버튼이 생성되었음을 확인 가능


- 티스토리 글쓰기에서 에버노트 버튼을 클릭하고 좀 기다리면 에버노트에서 "티스토리" 태그가 달린 메모들을 불러온다.


- 여기서 원하는 메모를 선택하면 아래와 같이 주르륵 불러온다.



티스토리 시작 후 코드 블럭 지원을 하지 않는 것을 보고 찾아보니 Prism, SyntaxHighlighter, google-code-pretty를 많이 사용하는 것 같음

파일 업로드 없이 script tag 추가 만으로 사용 가능한 google-code-pretty를 적용하여 사용 중


[ 설치 방법 ]

  • 티스토리 관리자모드 -> 스킨 편집 -> html 편집 클릭
  • <head></head> tag 사이에 아래의 script tag 추가 후  저장
  • <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>

  • 나는 제공 스킨 중 desert 적용하여 사용 중
  • <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=desert"></script>

  • 아래는 스킨 테마 종류

[ 사용 방법 ]
  • 글 쓰기 후 html 코드 작성 클릭
  •  <pre class="prettyprint"></pre> 사이에 code 입력하면 끝
  • 개발 언어 지정 방법
  • <pre class="prettyprint lang-html">
      The lang-* class specifies the language file extensions
      File extensions supported by default include:
        "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java",
        "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml",
        "xsl".
    </pre>
  • linenum 설정  
# linenum default
<pre class="prettyprint linenums">
foo();
bar();
baz();
boo();
far();
faz();
</pre>
# lienum 4 부터 시작
<pre class="prettyprint linenums:4">// This is line 4.
foo();
bar();
baz(); 
boo();
far();
faz();
</pre>


[ 출처 ] 

https://github.com/google/code-prettify


+ Recent posts