반응형

 

블로그/웹에서 소스코드 하이라이트(highlight) / 구문강조

 

***** 참고 사이트 : https://github.com/idleberg/Paraiso-Google-Code-Prettify

 

-> 다른것 :  javascript 문구 테스트 - SyntaxHighlighter를 이용  , SyntaxHighlighter

 

아래 스크립트 태그를 삽입해주세요.

 

 

<SCRIPT src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></SCRIPT>


 

 

사용하기

<pre>, <code>, <xmp> 의 class 요소에 prettyprint 를 넣어주면 됩니다.

 

<pre class="prettyprint">
class Voila {
    public:
        // Voila
        static const string VOILA = "Voila";

        // will not interfere with embedded <a href="#voila2">tags</a>.
}
</pre>

class Voila {
    public:
        // Voila
        static const string VOILA = "Voila";

        // will not interfere with embedded tags.
}

 

SELECT * FROM table_name LIMIT 10;

 

Many
lines
of
code

 

 

Paraíso for Google Code Prettify

A color scheme inspired by the colorful illustrations by Brazilian artist Rubens LP.

Preview

This theme is also available for Atom, BBEdit, CodeMirror, Eclipse, Geany, Gedit, highlight.js, IntelliJ IDEA, iTerm2, Mou, Notepad++, Prism.js, Pygments, Rainbow, Sublime Text, Xcode and more!

Installation

  1. Setup Google Code Prettify
  2. Download a .css file of choice
  3. Replace prettify.js with the downloaded file

 

반응형
반응형

  javascript 문구 테스트 - SyntaxHighlighter를 이용 Highlight 

 

티스토리에 소스 코드 꾸며서 넣기.

 

http://alexgorbatchev.com/SyntaxHighlighter/ 에서 파일 다운로드 후 /script/, /style/ 폴더의 파일들을

티스토리 관리자 - 꾸미기 - HTML/CSS 편집 에서 "파일업로드"로 업로드 한다.

 

그 다음 스킨 수정에서 아래와 같이 입력해준다. body  태그까지 적용.

 

 

javascript 샘플

 

CPP 샘플

 

반응형

+ Recent posts