├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── archetypes └── post.md ├── config.toml ├── content ├── author │ ├── jhonghee-park.md │ ├── kucuny.md │ ├── mingrammer.md │ ├── sangbae-yun.md │ └── timo-boll.md └── post │ ├── go-start │ ├── concurrency.md │ ├── feature.md │ ├── getting-start.md │ └── object-oriented.md │ ├── go-walkthrough │ ├── bytes-strings-packages.md │ ├── encoding-json-package.md │ ├── encoding-package.md │ └── io-package.md │ ├── golang-internals │ ├── part1.md │ ├── part2.md │ ├── part3.md │ ├── part4.md │ ├── part5.md │ ├── part6.md │ └── resources.md │ ├── gopher-academy │ └── advent-2015 │ │ └── reducing-boilerplate-with-go-generate.md │ ├── hugo-advanced │ └── overview.md │ ├── hugo-intro │ ├── content-basic.md │ ├── getting-started.md │ ├── how-to-contribute-content.md │ ├── overview.md │ ├── taxonomy-basic.md │ └── theme-customizing.md │ ├── readme-first.md │ ├── structuring-applications-in-go.md │ ├── tdd-with-golang.md │ └── vim-go.md ├── deploy.sh ├── googlebeb514f8cbcb8c46.html ├── layouts ├── _default │ └── terms.html ├── author │ └── single.html ├── partials │ ├── header.custom.css.html │ ├── header.custom.javascript.html │ ├── header.html │ ├── navigation.html │ ├── post_footer.html │ ├── post_header.html │ └── sidebar.html └── taxonomy │ ├── author.html │ └── series.html └── static ├── .keepme ├── css ├── custom-font.css └── custom.css └── js ├── highlight ├── highlight.pack.js └── styles │ ├── agate.css │ ├── androidstudio.css │ ├── arduino-light.css │ ├── arta.css │ ├── ascetic.css │ ├── atelier-cave-dark.css │ ├── atelier-cave-light.css │ ├── atelier-dune-dark.css │ ├── atelier-dune-light.css │ ├── atelier-estuary-dark.css │ ├── atelier-estuary-light.css │ ├── atelier-forest-dark.css │ ├── atelier-forest-light.css │ ├── atelier-heath-dark.css │ ├── atelier-heath-light.css │ ├── atelier-lakeside-dark.css │ ├── atelier-lakeside-light.css │ ├── atelier-plateau-dark.css │ ├── atelier-plateau-light.css │ ├── atelier-savanna-dark.css │ ├── atelier-savanna-light.css │ ├── atelier-seaside-dark.css │ ├── atelier-seaside-light.css │ ├── atelier-sulphurpool-dark.css │ ├── atelier-sulphurpool-light.css │ ├── atom-one-dark.css │ ├── atom-one-light.css │ ├── brown-paper.css │ ├── brown-papersq.png │ ├── codepen-embed.css │ ├── color-brewer.css │ ├── darcula.css │ ├── dark.css │ ├── darkula.css │ ├── default.css │ ├── docco.css │ ├── dracula.css │ ├── far.css │ ├── foundation.css │ ├── github-gist.css │ ├── github.css │ ├── googlecode.css │ ├── grayscale.css │ ├── gruvbox-dark.css │ ├── gruvbox-light.css │ ├── hopscotch.css │ ├── hybrid.css │ ├── idea.css │ ├── ir-black.css │ ├── kimbie.dark.css │ ├── kimbie.light.css │ ├── magula.css │ ├── mono-blue.css │ ├── monokai-sublime.css │ ├── monokai.css │ ├── obsidian.css │ ├── ocean.css │ ├── paraiso-dark.css │ ├── paraiso-light.css │ ├── pojoaque.css │ ├── pojoaque.jpg │ ├── purebasic.css │ ├── qtcreator_dark.css │ ├── qtcreator_light.css │ ├── railscasts.css │ ├── rainbow.css │ ├── school-book.css │ ├── school-book.png │ ├── solarized-dark.css │ ├── solarized-light.css │ ├── sunburst.css │ ├── tomorrow-night-blue.css │ ├── tomorrow-night-bright.css │ ├── tomorrow-night-eighties.css │ ├── tomorrow-night.css │ ├── tomorrow.css │ ├── vs.css │ ├── xcode.css │ ├── xt256.css │ └── zenburn.css └── jqcloud ├── jqcloud.min.css └── jqcloud.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | hugo 2 | docs/public* 3 | /.idea 4 | hugo.exe 5 | *.test 6 | *.prof 7 | nohup.out 8 | cover.out 9 | *.swp 10 | *.swo 11 | .DS_Store 12 | *~ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "public"] 2 | path = public 3 | url = git@github.com:golangkorea/golangkorea.github.io.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # golangkorea-hugo 2 | 3 | [![Join the chat at https://gitter.im/golangkorea/golangkorea-hugo](https://badges.gitter.im/golangkorea/golangkorea-hugo.svg)](https://gitter.im/golangkorea/golangkorea-hugo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | # hugo 설치 6 | (https://github.com/spf13/hugo/releases) 7 | 8 | -------------------------------------------------------------------------------- /archetypes/post.md: -------------------------------------------------------------------------------- 1 | +++ 2 | tags = ["tag"] 3 | categories = ["category"] 4 | authors = ["Your Name"] 5 | draft = false 6 | toc = false 7 | +++ 8 | -------------------------------------------------------------------------------- /config.toml: -------------------------------------------------------------------------------- 1 | baseurl = "https://golangkorea.github.io/" 2 | languageCode = "en-us" 3 | title = "Golang Korean Community" 4 | builddrafts = false 5 | canonifyurls = true 6 | theme = "Hugo-Octopress" 7 | contentdir = "content" 8 | layoutdir = "layouts" 9 | publishdir = "public" 10 | 11 | [params] 12 | defaultKeywords = 'Go,Golang,GolangKorea,Gopher' 13 | defaultDescription = 'Golang 한국 사용자 모임입니다.' 14 | 15 | editInGithubUrlBase = "https://github.com/golangkorea/golangkorea-hugo/blob/master/content/" 16 | 17 | subtitle = "Go에 관련된 수다를 추구하는 개발자들의 세상" 18 | customCSS = ["css/custom.css", "css/custom-font.css"] 19 | 20 | # searchEngineURL = "https://www.google.com/search" 21 | disqusShortname = "UA-82835198-1" 22 | rss = true 23 | 24 | 25 | sidebarHeader = "못 먹어도 Go인 세상" 26 | sidebarText = "새로운 도전과 개발의 재미를 Go를 통해 만끽해 보세요. We love to talk, learn and share our experience. Come join us. Let's have some fun!" 27 | 28 | github = "https://github.com/golangkorea/golangkorea-hugo/" 29 | facebook = "https://www.facebook.com/groups/golangko/" 30 | googleplus = "https://plus.google.com/communities/115721275599816202991" 31 | 32 | sidebarRecentLimit = "5" 33 | 34 | sidebarMenuEnabled = true 35 | sidebarMenuHeader = "Join Us" 36 | sidebarNewWindow = true 37 | 38 | highlightTheme = "darcula" 39 | 40 | [[menu.sidebar]] 41 | Name = "GitHub Organization" 42 | URL = "https://github.com/golangkorea" 43 | weight = 0 44 | 45 | [[menu.sidebar]] 46 | Name = "Gitter Room" 47 | URL = "https://gitter.im/golang-korean-community/golangkorea.github.io?utm_source=share-link&utm_medium=link&utm_campaign=share-link" 48 | weight = 1 49 | 50 | [taxonomies] 51 | author = "authors" 52 | category = "categories" 53 | tag = "tags" 54 | series = "series" 55 | -------------------------------------------------------------------------------- /content/author/jhonghee-park.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-22T22:09:34-04:00" 3 | draft = false 4 | title = "Jhonghee Park" 5 | 6 | +++ 7 | 8 | This is a placeholder for personal profile of Jhonghee Park -------------------------------------------------------------------------------- /content/author/kucuny.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Kookheon Kwon" 3 | draft = false 4 | date = "2016-08-26T10:08:10+09:00" 5 | 6 | +++ 7 | 8 | This is a placeholder for personal profile of Kookheon Kwon -------------------------------------------------------------------------------- /content/author/mingrammer.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "mingrammer" 3 | draft = true 4 | date = "2016-10-10T21:08:46+09:00" 5 | 6 | +++ 7 | 8 | -------------------------------------------------------------------------------- /content/author/sangbae-yun.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-22T23:39:23-04:00" 3 | draft = false 4 | title = "Sangbae Yun" 5 | 6 | +++ 7 | 8 | This is a placehoder for personal profile of Sangbae Yun. -------------------------------------------------------------------------------- /content/author/timo-boll.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-10-16T00:59:41+09:00" 3 | title = "JongMin Kim" 4 | draft = false 5 | 6 | +++ 7 | 8 | This is a placehoder for personal profile of Timo Boll 9 | -------------------------------------------------------------------------------- /content/post/go-start/concurrency.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-10-11T16:36:39+08:30" 3 | draft = true 4 | title = "동시성(Concurrency) 프로그래밍" 5 | authors = ["Sangbae Yun"] 6 | categories = ["How-to"] 7 | tags = ["beginning"] 8 | series=["Go 시작하기"] 9 | toc = false 10 | +++ 11 | 12 | ## 동시성에 대해서 13 | Go 언어의 장점을 이야기 할 때 빠지지 않는 특징이 "동시성을 잘 지원한다"이다. 동시성 프로그래밍 ? 병렬 프로그래밍과 다른건가 ? 헷갈린다. 먼서 동시성과 병렬성에 대해서 살펴보자. 14 | 15 | 동시성은 **여러 코드가 동시에 실행 할 수 있게 설계되어 있는지**에 대한 것이다. 논리적인 실행 환경인 셈이다. 병렬성은 **물리적인 컴퓨터가 어떻게 코드를 동시에 실행 하게 할 것인지**에 대한 것이다. 물리적인 실행 환경이다. 아래 그림을 보자. 16 | 17 | ## 고루틴(goroutines) 18 | 커다란 프로그램들은 종종 여러 개의 작은 서브 프로그램들로 이루어지곤 한다. 예를 들어 웹 서버 프로그램의 경우 웹브라우저의 요청을 읽고 처리하기 위해서, **요청 별로** 여러 개의 핸들러를 운용하곤 한다. 핸들러는 각각의 요청을 처리하기 위한 조그마한 프로그램(코드)들이다. 19 | 20 | 이들 조그마한 프로그램들은 동시에 여러개가 실행될 수 있어야 한다. 예컨데, 웹 서버를 개발한다면 많은 유저의 요청을 처리 할 수 있도록 즉, 핸들러가 동시에 두 개 이상이 실행될 수 있도록 해야 한다. 이때 사용하는 프로그래밍 기법이 앞서 다루었던 **동시성**이다. Go언어에서는 고루틴(goroutines)와 채널(channels)를 이용해서 동시성 프로그램을 개발 할 수 있다. 21 | 22 | **go**키워드를 이용하면 코드 내에서 다른 코드(함수)를 실행 할 수 있다. 23 | ```go 24 | ``` 25 | ## 고루틴과 쓰레드 26 | C나 Java의 쓰레드와 매우 비슷하다는 느낌이 들 것이다. 고루틴과 스레드와의 차이점을 3가지 카테고리에서 살펴볼 것이다. 27 | 28 | ### 메모리 소비 29 | 쓰레드 하나를 만들기 위해서는 대략 1MB의 정도의 메모리가 필요하다. 고루틴은 2kB 정도의 스택공간으로 시작 할 수 있다. 30 | 31 | 거의 1/500 정도로 가볍기 때문에 요청 하나 당 하나의 고루틴을 만들어도 문제 없이 작동한다. 10000 개의 고루틴이 실행되도, 200M 정도의 메모리만 소비할 뿐이다. 허나 쓰레드는 만드는 데만 10G의 공간이 필요하며, 개발자는 **OutOfMemoryError**를 신경서야 한다. 32 | 33 | ### 생성 및 삭제 비용 34 | 쓰레드는 운영체제에서 관리하는 자원이므로, 생성과 삭제를 하려면 운영체제에 요청을 해야 한다. 35 | 36 | ## 참고 37 | * [An Introduction to Programming in Go](https://www.golang-book.com/books/intro/10) 38 | * [How Goroutines Work](http://blog.nindalf.com/how-goroutines-work/) 39 | -------------------------------------------------------------------------------- /content/post/golang-internals/part1.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Golang의 내부, 1부: 주요 컨셉트와 프로젝트 구조" 3 | draft = false 4 | date = "2016-09-13T13:18:28-04:00" 5 | 6 | tags = ["Golang", "Internals", "Compiler", "Structure"] 7 | categories = ["번역", "핵킹"] 8 | series = ["Golang Internals"] 9 | authors = ["Jhonghee Park"] 10 | 11 | toc = true 12 | +++ 13 | 14 | 이 블로그 시리즈는 기본적인 Go 언어특성에 이미 익숙하며 좀 더 심도있게 내부구조를 알고자 하는 독자들을 위해 쓰여졌다. 이 포스트는 Go언어의 소스코드의 구조와 Go 컴파일러의 내부를 어느 정도 상세히 살펴보겠다. 이 글을 읽고 난 후, 독자는 다음과 같은 질문에 답을 얻을 것이다. 15 | 16 | 1. Go의 소스코드는 어떤 구조를 가지고 있는가? 17 | 2. Go의 컴파일러는 어떻게 동작하는가? 18 | 3. Go의 노드 트리(node treee)의 기본 구조는 무엇인가? 19 | 20 | # 시작하며 21 | 22 | 새로운 프로그래밍 언어를 배우기 시작할 때, 보통은 "hello-world"와 같은 튜토리얼이나, 초보자 가이드, 그리고 언어의 주요한 컨셉트, 문법, 심지어 표준 라이브러리에 대한 상세한 정보들 많이 접하게 된다. 하지만, 언어가 런타임 도중에 할당하는 주요한 데이터 구조의 레이아웃이라던지, 내장 함수를 호출할 때 어떤 어셈블리 코드가 발생하는지와 같은 정보를 얻는 것은 쉽지 않다. 물론, 답은 소스코드내에 자리잡고 있지만, 저자의 경험에 비추어 보면, 이렇다 할 성과없이 수많은 시간을 허비하는 일도 가능하다. 23 | 24 | 이런 주제에 대해 전문가인 척 하지도 않을 거고, 모든 가능한 측면을 설명하려는 시도 또한 하지 않겠다. 대신, 목표하는 바는 독자들 스스로 Go 소스코드를 어떻게 해독해 나갈 수 있는 지를 보여주는 것이다. 25 | 26 | 시작하기 전에, 반드시 필요한 것은 각자의 Go 소스코드 복사본을 갖는 것이다. 소스코드를 다운 받는데 특별할 게 전혀 없다. 다음 명령을 실행해 보자. 27 | 28 | >``` 29 | git clone https://github.com/golang/go 30 | ``` 31 | 32 | 메인 브랜치의 코드는 상시 변하는 점을 주목하자. 그래서 저자는 이 블로그에서 release-branch.go1.4 브랜치를 사용한다. 33 | 34 | # 프로젝트 구조 이해하기 35 | 36 | Go 레포의 `/src` 폴더를 보게 되면, 많은 폴더를 발견하게 된다. 대부분은 Go의 표준 라이브러리 소스 파일을 갖고 있다. 여기에도 표준 이름짓기 관행이 항상 적용되는데, 각 패키지는 그 이름에 상응하는 이름의 폴더 아래 있다. 표준 라이브러리외에 다른 것들을 살펴보자. 저자의 견해로는, 아래 폴더들이 가장 중요하고 유용하다. 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
폴더
설명
/src/cmd/코멘드 라인 툴들을 보관한다.
/src/cmd/go/Go 툴의 소스 파일이 있는데, 이 툴들은 Go 소스코드를 다운받거나, 빌드하고, 설치하는데 사용된다. 툴이 실행되면서 전체 소스를 수집하고, Go 링커와 컴파일러 코멘드 라인 툴들을 호출한다.
/src/cmd/dist/ 다른 코멘트 라인 툴과 표준 라이브러리의 모든 패키지를 빌드하는 툴을 보관한다. 모든 특정한 툴이나 패키지에서 어떤 라이브러리가 사용되었는지를 알아 보려면 이 소스를 분석하고 싶을 것이다.
/src/cmd/gc/Go 컴파일러내 (프로세서) 아키텍쳐에 의존하지 않는 부분이다.
/src/cmd/ld/Go 링커내 (프로세서) 아키텍쳐에 의존하지 않는 부분이다. 아키텍쳐에 의존적인 부분들은 "l"로 끝나는 이름의 폴더에 위치하며 컴파일러와 같은 이름짓기 관행을 따른다.
/src/cmd/5a/, 6a, 8a, and 9a여러 아키텍쳐에 맞춘 Go 어셈블러 컴파일러들을 발견할 수 있다. Go 어셈블러는 일종의 어셈블리 언어로 하층 기계어와는 딱 맞아 떨어지는 것은 아니다. 대신 각 아키텍쳐마다 독특한 컴파일러들이 있어 Go의 어셈블러를 기계의 어셈블러도 번역한다. 더 자세한 내용은 다음 링크를 참조하라. 여기.
/src/lib9/, /src/libbio, /src/liblink컴파일러, 링커, 그리고 런타임 패키지에 사용된 각종 라이브러리들.
/src/runtime/가장 중요한 Go 패키지로 모든 프로그램에 간접적으로 포함된다. 메모리 관리, 가비지 콜렉션, Go 루틴 생산등, 런타임 기능 전체를 포함하고 있다.
82 | 83 | # 컴파일러 내부 84 | 85 | 위에서 언급한 것 처럼, 아키텍쳐에 무관한 Go 컴파일러는 `/src/cmd/gc` 폴더에 위치 한다. 시작 점은 `lex.c` 파일에 있다. 코멘드 라인 인수 파싱 같은 보편적인 기능들을 차치하고 들여다 보면, 컴파일러는 다음과 같은 일들을 한다. 86 | 87 | 1. 어떤 공통의 데이터 구조를 초기화 한다. 88 | 89 | 2. 주어진 모든 Go 파일을 차례로 읽어서 각 파일에 yyparse 메서드를 호출한다. 이때 실제로 파싱이 작동한다. Go 컴파일러는 `Bison`을 파서 발생기(parser generator)로 사용한다. 언어의 문법은 [go.y](https://github.com/golang/go/blob/release-branch.go1.4/src/cmd/gc/go.y)에 완전히 서술되어 있다. (자세한 내용은 나중에 더 제공될 예정이다) 결과로, 이 단계는 완전한 파스트리(parse tree)를 생성하는데, 이때 트리의 각 노드는 컴파일된 프로그램의 요소들을 대표한다. 90 | 91 | 3. 생성된 트리를 재귀적으로(Recursively) 방문하면서 약간의 수정을 가한다, 예를 들어, 암시적으로 타입이 주어진 노드에 타입 정보를 정의하거나, 타입 케스팅과 같은 언어요소들을 런타임 패키지내 어떤 함수을 호출하는 식으로 다시 재구성하기도 한다 그외 다른 일들도 실행한다. 92 | 93 | 4. 파스트리(parse tree)가 완성되고 난 뒤 실제 컴파일을 실행한다. 노드들은 어셈블리 코드로 번역된다. 94 | 95 | 5. 생성된 어셈블리 코드에 심볼 테이블과 같은 부수적인 데이터 구조를 함께 오브젝트 파일 (object file)에 담아 만들고 디스크에 저장한다. 96 | 97 | # Go 문법 들여다 보기 98 | 99 | 이제 두번째 단계를 좀 더 가까이 살펴보자. [go.y](https://github.com/golang/go/blob/release-branch.go1.4/src/cmd/gc/go.y) 파일은 언어 문법(grammar)을 가지고 있어 Go 컴파일러를 조사하고 언어의 구문론(syntax)을 이해하는 데 좋은 출발점이다. 파일의 주요한 부분은 선언문들로 구성되며, 다음과 유사하다. 100 | 101 | >``` 102 | xfndcl: 103 | LFUNC fndcl fnbody 104 | 105 | fndcl: 106 | sym '(' oarg_type_list_ocomma ')' fnres 107 | | '(' oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma ')' fnres 108 | ``` 109 | 110 | 111 | 이 선언에서는, *xfndcl* 와 *fundcl* 노드가 정의된다. *fundcl* 노드는 두가지 형식중에 하나이다. 첫번째는 다음의 언어 구성소(construct)에 상응하는 형식이다: 112 | 113 | >``` 114 | somefunction(x int, y int) int 115 | ``` 116 | 117 | 그리고 두번째는 다음의 언어 구성소에 상응한다: 118 | 119 | >``` 120 | (t *SomeType) somefunction(x int, y int) int. 121 | ``` 122 | 123 | *xfndcl* 노드는 상수인 *LFUNC* 에 저장된 키워드 *func* 를 뒤 따르는 *fndcl* 와 *fnbodynodes* 로 구성되어 있다. 124 | 125 | Bison(혹은 Yacc) 문법의 중요한 기능중에 하나는 무작위의 C 코드를 각 노드 정의옆에 갖다 붙일 수 있다는 것이다. 소스 코드안에 이런 노드의 정의가 매치될 때 마다 C 코드는 실행된다. 여기서, (실행된)결과의 노드는 $$ 사용해 표시하고 $1, $2 등등으로 자식 노드를 나타낸다. 126 | 127 | 예제를 통해 보면 다 쉽게 이해할 수 있다. 다음은 실제코드를 간소한 예다. 128 | 129 | >``` 130 | fndcl: 131 | sym '(' oarg_type_list_ocomma ')' fnres 132 | { 133 | t = nod(OTFUNC, N, N); 134 | t->list = $3; 135 | t->rlist = $5; 136 | 137 | $$ = nod(ODCLFUNC, N, N); 138 | $$->nname = newname($1); 139 | $$->nname->ntype = t; 140 | declare($$->nname, PFUNC); 141 | } 142 | | '(' oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma ')' fnres 143 | ``` 144 | 145 | 우선, 새로운 노드가 만들어 지고 함수 선언을 위한 타입 정보를 갖는다. $3는 인수 리스트로 $5는 결과 리스트로 이 노드에서 레퍼런스된다. 그런 다음, $$ 결과 노드가 만들어 져서, 함수 이름과, 타입 노드를 저장한다. 보다시피 [go.y](https://github.com/golang/go/blob/release-branch.go1.4/src/cmd/gc/go.y)내 정의된 것들과 노드 구조사이에 직접적인 연결이 있을 수 없다. 146 | 147 | # 노드 이해하기 148 | 149 | 이제 노드가 실제로 무엇인지 알아 볼 시간이다. 첫번째로, 노드는 struct이고, [여기](https://github.com/golang/go/blob/release-branch.go1.4/src/cmd/gc/go.h#L245)에 정의되어 있다. 이 struct는 굉장히 많은 특성들을 갖고 있는데 그 이유는 다른 종류의 노드를 지원해야 하고 노드종류마다 다른 속성들을 가지고 있기 때문이다. 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 |
노드 struct 필드
설명
op이 필드는 각 노드마다 존재하며 노드의 연산이 무엇이지를 나타낸다. 이 필드를 통해 노드의 종류를 분간할 수 있다. 이전 예제에서 본 OTFUNC (연산 타입 함수) 과 ODCLFUNC (연산 선언 함수)같은 것 들이다.
type노드가 타입정보를 보유할 때 (때로 타입이 없는 노드도 있다. 예를 들면, if, switch, 혹은 for와 같은 제어 흐름문들), 이 필드는 타입정보를 가지고 있는 또 다른 struct를 가리키는 레퍼런스이다.
val이 필드는 리터럴 노드의 실제 값을 갖는다.
171 | 172 | 독자는 이제 노드 트리의 기본적 구조를 이해했으므로, 그 지식을 실전에 투여할 수 있다. 다음 포스트에서는, Go 컴파일러가 과연 무엇을 생산하는지를 간단한 Go 애플리케이션을 통해 살펴보겠다. 173 | 174 | * 원문: [Golang Internals, Part 1: Main Concepts and Project Structure](http://blog.altoros.com/golang-part-1-main-concepts-and-project-structure.html) 175 | * 저자: Siarhei Matsiukevich 176 | * 번역자: Jhonghee Park 177 | -------------------------------------------------------------------------------- /content/post/golang-internals/part4.md: -------------------------------------------------------------------------------- 1 | +++ 2 | 3 | title = "Golang의 내부, 4부: 오브젝트 파일, 그리고 함수 메타데이터" 4 | draft = false 5 | date = "2016-09-18T16:20:29-04:00" 6 | 7 | tags = ["Golang", "Internals", "linker", "object file", "relocations", "metadata"] 8 | categories = ["번역", "핵킹"] 9 | series = ["Golang Internals"] 10 | authors = ["Jhonghee Park"] 11 | 12 | toc = true 13 | 14 | +++ 15 | 16 | 오늘은, Func 구조에 대해 좀 더 자세히 들여다 보고 어떻게 가비지 컬렉션이 작동하는지 몇가지 자세한 내용을 논하겠다. 17 | 18 | 이 포스트는 [Golang의 내부, 3부: 링커, 오브젝트 파일, 그리고 재배치](/post/golang-internals/part3/)의 연속이어서, 독자가 아직 읽지 않았다면 이 포스트를 소화하기 전에 읽기를 적극 권장한다. 19 | 20 | # 함수 메타데이터의 구조 21 | 22 | 재배치에 대한 주요한 아이디어는 3부를 통해 분명해 졌을 것이다. 이제 main 메서드의 Func 구조를 살펴보자: 23 | 24 | >``` 25 | 01 Func: &goobj.Func{ 26 | 02 Args: 0, 27 | 03 Frame: 8, 28 | 04 Leaf: false, 29 | 05 NoSplit: false, 30 | 06 Var: { 31 | 07 }, 32 | 08 PCSP: goobj.Data{Offset:255, Size:7}, 33 | 09 PCFile: goobj.Data{Offset:263, Size:3}, 34 | 10 PCLine: goobj.Data{Offset:267, Size:7}, 35 | 11 PCData: { 36 | 12 {Offset:276, Size:5}, 37 | 13 }, 38 | 14 FuncData: { 39 | 15 { 40 | 16 Sym: goobj.SymID{Name:"gclocals·3280bececceccd33cb74587feedb1f9f", Version:0}, 41 | 17 Offset: 0, 42 | 18 }, 43 | 19 { 44 | 20 Sym: goobj.SymID{Name:"gclocals·3280bececceccd33cb74587feedb1f9f", Version:0}, 45 | 21 Offset: 0, 46 | 22 }, 47 | 23 }, 48 | 24 File: {"/home/adminone/temp/test.go"}, 49 | 25 }, 50 | ``` 51 | 52 | 이 구조체는 Go언어의 런타임이 사용하는, 컴파일러가 오브젝트 파일에 방출한 함수 메타데이터로 생각해 볼 수 있다. [이 문서](https://docs.google.com/document/d/1lyPIbmsYbXnpNj57a261hgOYVpNRcgydurVQIyZOz_o/pub)를 통해 Func내 정확한 포맷과 여러 필드들의 의미에 대한 설명을 접할 수 있다. 이제, 런타임에서 이 메타데이터가 어떻게 사용되는지 보겠다. 53 | 54 | runtime 패키지 안에서 이 메타데이터는 다음 구조체에 매핑되어 있다. 55 | 56 | >``` 57 | 01 type _func struct { 58 | 02 entry uintptr // start pc 59 | 03 nameoff int32 // function name 60 | 04 61 | 05 args int32 // in/out args size 62 | 06 frame int32 // legacy frame size; use pcsp if possible 63 | 07 64 | 08 pcsp int32 65 | 09 pcfile int32 66 | 10 pcln int32 67 | 11 npcdata int32 68 | 12 nfuncdata int32 69 | 13 } 70 | ``` 71 | 72 | 오브젝트 파일 안에 있는 정보가 모두 다 직접적으로 매핑되어 있는 것은 아니다. 몇몇 필드들은 링커에만 사용된다. 그렇다 해도 여기에서 가장 흥미로운 필드들은 *pcsp*, *pcfile*, 그리고 *pcln* 이다. 이 필드들은 [프로그램 카운터](http://en.wikipedia.org/wiki/Program_counter)가 stack pointer, filename, 그리고 line으로 번역될 때 사용된다. 73 | 74 | 예를 들면, *panic* 이 발생할 경우 이 메타데이터 필드들이 필요할 것이다. 그 순간에 런타임이 알고 있는 바는 오직 *panic* 을 야기한 현재의 어셈블리 명령의 프로그램 카운터이다. 그래서 런타임은 그 카운터를 이용해 현재 파일과 라인 번호, 그리고 stack trace 전부를 얻는 것이다. 파일과 라인 번호는 *pcfile* 과 *pcln* 필드를 이용하면 바로 해결된다. stack trace는 *pcsp* 를 이용하여 재귀적으로 해결한다. 75 | 76 | 이제 프로그램 카운터를 가지고 어떻게 상응하는 라인 번호를 얻을 수 있는지에 대한 질문에 답을 하자. 답을 얻기 위해서는 어셈블리 코드를 들여다 보고 오브젝트 파일에 라인 번호가 어떻게 저장되어 있는 지를 이해해야 한다: 77 | 78 | >``` 79 | 1 0x001a 00026 (test.go:4) MOVQ $1,(SP) 80 | 2 0x0022 00034 (test.go:4) PCDATA $0,$0 81 | 3 0x0022 00034 (test.go:4) CALL ,runtime.printint(SB) 82 | 4 0x0027 00039 (test.go:5) ADDQ $8,SP 83 | 5 0x002b 00043 (test.go:5) RET , 84 | ``` 85 | 86 | 프로그램 카운터 26에서 38까지는 라인 번호 4에 상응하고 카운터 39에서 *next_function_program_counter - 1* 까지는 라인 번호 5에 해당된다. 효율적 공간사용을 생각하면 다음과 같은 맵을 저장하는 것으로 충분하다: 87 | 88 | >``` 89 | 1 26 - 4 90 | 2 39 - 5 91 | 3 … 92 | ``` 93 | 94 | 이것은 컴파일러가 하는 일과 거의 일치한다. *pcln* 필드는 현재 실행중인 함수의 첫번째 프로그램 카운터에 상응하는 특정한 오프셋을 맵안에서 가리키고 있다. 이 오프셋과 또 다음 함수의 첫번째 프로그램 카운터의 오프셋을 알고, 런타임은 바이너리 검색을 이용해 주어진 프로그램 카운터에 상응하는 라인 번호를 찾는다. 95 | 96 | Go 언어에서 이런 아이디어는 일반화 되어 있다. 라인 번호와 스택 포인터만 프로그램 카운터에 맵팅되어 있는게 아니라 어떤 정수 값도 매핑될 수 있다. *PCDATA* 명령을 통해서 가능한 것이다. 매번 링커는 다음 명령을 찾는다: 97 | 98 | >``` 99 | 1 0x0022 00034 (test.go:4) PCDATA $0,$0 100 | ``` 101 | 102 | 이 명령은 실제로 어셈블러 명령을 생산하지 않는다. 대신, 이 명령의 두번째 인수를 맵안에서 현재의 프로그램 카운터를 사용해 저장하고, 첫번째 인수는 어떤 맵이 사용되는 지를 나타낸다. 이 첫번째 인수를 통해, 새로운 맵을 쉽게 첨가할 수 있는데, 컴파일러와 런타임에는 그 의미가 알려지지만 링커에게는 보이지 않는다. 103 | 104 | # 가비지 컬렉터는 어떻게 함수 메타데이터를 사용하는가 105 | 106 | 마지막으로 아직 설명을 더 명확하게 해야할 함수 메타데이터의 내용은 FuncData 배열인데, 가비지 컬렉션에 필요한 정보를 담고 있다. Go 언어는 [mark-and-sweep](http://www.brpreiss.com/books/opus5/html/page424.html) 가비지 컬렉터 (GC)를 사용하는데 두 단계를 거쳐 동작한다. 첫번째 단계인 (mark)에서는, 모든 객체를 섭렵하면서 아직 사용중인 것들은 "reachable"로 표시한다. 표시되지 않은 모든 객체는 두번째 단계인 (sweep)에서 제거된다. 107 | 108 | 그래서, 가비지 컬렉터는 전역 변수, 프로세서 레지스터, 스택 프레임, 그리고 이미 위치가 알려진 객체내 포인터들과 같이 잘 알려진 위치들내 도달할 수 있는(reachable) 객체를 찾아보면서 시작한다. 하지만 곰곰히 생각해 보면, 스택 프레임안에서 포인터를 찾아내는 것이 그렇게 쉽지는 않는 일이다. 그렇다면 런타임이 가비지 컬렉션을 실행할때 스택안에서 어떻게 포인터와 포인터가 아닌 타입의 변수들을 알아 내는 것일까? 바로 여기에서 *FuncData* 가 등장하는 것이다. 109 | 110 | 각 함수마다 컴파일러는 두개의 변수를 만든다. 하나는 스택 프레임의 인수들을 위한 비트맵 벡터를 담고 있다. 다른 하나는 나머지 프레임을 위한 비트맵으로 함수에 정의된 포인터 타입의 모든 지역 변수들을 포함한다. 이 변수들은 각자 가비지 컬렉터에게 스택 프레임안에 포인터들이 어디에 위치하는지 정확하게 알려주고 이는 가비지 컬렉터가 일을 하는 데 충분한 정보이다. 111 | 112 | *PCDATA* 와 같이 *FUNCDATA* 역시 의사-Go 어셈블리 명령(pseudo-Go assembly instruction)에 의해 발생된 것임을 언급할 가치가 있겠다: 113 | 114 | >``` 115 | 1 0x001a 00026 (test.go:3) FUNCDATA $0,gclocals·3280bececceccd33cb74587feedb1f9f+0(SB) 116 | ``` 117 | 118 | 이 명령의 첫번째 인수는 이것이 인수들을 위한 함수 데이터인지 아니면 지역 변수 공간인지를 나타낸다. 두번째 인수는 실제로 GC 마스크를 담고 있는 숨겨진 변수에 대한 참조 값이다. 119 | 120 | # Golang에 대해 더 알아보기 121 | 122 | 앞으로 나올 포스트에서는 Go 언어의 부트 스트랩 과정을 얘기하겠다. 런타임이 어떻게 작동하는지를 이해하는데 중요한 단서이다. 일주일 뒤에 보자. 123 | 124 | * 원문: [Golang Internals, Part 4: Object Files and Function Metadata](http://blog.altoros.com/golang-part-4-object-files-and-function-metadata.html) 125 | * 저자: Siarhei Matsiukevich 126 | * 번역자: Jhonghee Park 127 | -------------------------------------------------------------------------------- /content/post/golang-internals/resources.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Golang의 내부, 0부: 부록" 3 | draft = false 4 | date = "2016-09-12T13:18:28-04:00" 5 | 6 | tags = ["Golang", "Internals", "Compiler", "Assembler", "linker"] 7 | categories = ["번역", "핵킹"] 8 | series = ["Golang Internals"] 9 | authors = ["Jhonghee Park"] 10 | 11 | toc = false 12 | +++ 13 | 14 | # Go 언어의 최신 컴파일러에 대한 내용 15 | 16 | * GopherCon 2016: Rob Pike - The Design of the Go Assembler 17 | * [Video](https://www.youtube.com/watch?v=KINIAgRpkDA) 18 | * [Slides](https://talks.golang.org/2016/asm.slide) 19 | * GopherCon 2014 Go from C to Go by Russ Cox 20 | * [Video](https://www.youtube.com/watch?v=QIE5nV5fDwA) 21 | * [Slides](https://talks.golang.org/2014/c2go.slide) 22 | * GopherFest 2015: Rob Pike on the move from C to Go in the toolchain 23 | * [Video](https://www.youtube.com/watch?v=cF1zJYkBW4A) 24 | * [Slides](https://talks.golang.org/2015/gogo.slide) 25 | 26 | # Go의 어셈블러 27 | * [A Quick Guide to Go's Assembler](https://golang.org/doc/asm) 28 | -------------------------------------------------------------------------------- /content/post/gopher-academy/advent-2015/reducing-boilerplate-with-go-generate.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-10-16T01:03:50+09:00" 3 | title = "Reducing boilerplate with go generate" 4 | tags = [ 5 | "golang", 6 | "read", 7 | "번역", 8 | ] 9 | categories = [ 10 | "번역", 11 | ] 12 | authors = [ 13 | "Timo Boll", 14 | ] 15 | series = [ 16 | "Advent 2015" 17 | ] 18 | draft = false 19 | toc = false 20 | +++ 21 | 22 | 23 | > [Reducing boilerplate with go generate][original-blog-url] 를 번역한 글입니다 24 | 25 | Go는 대단한 언어입니다. 단순하고, 파워풀하며, 훌륭한 도구들을 가지고 있고, 우리 중 많은 26 | 이들은 매일 사용하는 것을 즐깁니다. 하지만 강한 타입의 언어들에서 일상적으로 발생하게 되는, 이것저것을 연결하기 위해서 27 | 필수로 사용해야 하는 boilerplate를 쓰게 됩니다. 28 | 29 | 이 포스트에서 다음의 세가지 포인트를 다룰 것입니다: 30 | 31 | 1. 코드 생성(code generation)을 사용하여 boilerplate를 줄이도록 도와주는 Go 도구들을 만들 수 있어야 하는 이유는 무엇입니까. 32 | 2. Go 코드 생성을 위한 블록 구성 요소는 무엇입니까. 33 | 3. 코드 생성 도구를 배우기 위한 예제는 어디에서 찾을 수 있습니까. 34 | 35 | # boilerplate를 줄이기 위해 코드 생성을 사용하는 이유는 무엇입니까? 36 | 37 | 때때로 우리는 reflection을 쓰고 `interface{}`를 받아들이는 메서드들을 프로젝트에 채움으로 boilerplate를 줄이려고 노력합니다. 38 | 그러나 메서드가 `interface{}`를 받아들일 때마다, 우리는 type 안정성을 창밖으로 던져버립니다. 39 | type assertions와 reflection을 사용할 때, 컴파일러는 우리가 올바른 타입들을 패싱하는지 확인할 수 없으며, 런타임 panic에 더욱 노출됩니다. 40 | 41 | 우리가 만들어놓은 boilerplate 코드의 몇몇은 우리의 프로젝트에서 이미 가지고 있는 코드로 부터 추론될 수 있습니다. 42 | 그로 인해, 우리는 프로젝트의 코드를 읽어서 relevant 코드를 생성하는 도구들을 제작할 수 있습니다. 43 | 44 | # 코드 생성을 위한 building blocks 45 | 46 | ## 코드 읽어들이기 47 | 48 | 기본 라이브러리는 코드를 읽고 파싱할때 무거운 작업들을 들어올릴 준비가 되어 있는 훌륭한 패키지를 가지고 있습니다. 49 | 50 | * `go/build`: go 패키지에 대한 정보를 수집합니다. 패키지 이름이 주어지면, 소스코드를 포함하고 있는 디렉토리가 무엇인지, 51 | 디렉토리안의 코드와 테스트 파일이 무엇인지, 의존성이 있는 다른 패키지는 무엇인지 등등. 52 | * `go/scanner` `go/parser`: 소스코드를 읽고 파싱하여 [Abstract Syntax Tree][ast] (AST)를 생성합니다. 53 | * `go/ast`: AST를 표현하는데 사용되는 타입들을 선언하고 tree를 동작하고 변경하는데 도움을 주는 메서드들을 포함합니다. 54 | * `go/types`: 데이터 타입들을 선언하고 Go 패키지 타입 체킹을 위해 사용되는 알고리즘을 구현합니다. 55 | `go/ast` 가 raw tree를 포함하고 있는데 비해 이 패키지는 AST를 프로세싱하기 위한 모든 작업을 수행하여 타입들에 대한 정보를 바로 얻을 수 있습니다. 56 | 57 | ## 코드 생성하기 58 | 59 | 코드를 생성할 때, 대부분의 프로젝트들을 단지 좋은 옛 `text/template` 에 의존하여 코드를 생성합니다. 60 | 61 | 자동으로 생성되는 파일에는 코드가 자동으로 생성되었으며, 생성한 도구가 무엇인지, 수작업으로 편집되지 않아야 함을 코멘트로 시작하는 것을 권장합니다. 62 | 63 | ```go 64 | /* 65 | * CODE GENERATED AUTOMATICALLY WITH github.com/ernesto-jimenez/gogen/unmarshalmap 66 | * THIS FILE SHOULD NOT BE EDITED BY HAND 67 | */ 68 | ``` 69 | 70 | 역시 `go/format` 패키지를 이용하여 이를 쓰기 전에 코드를 format 할 수 있습니다. 71 | 이 패키지는 `go fmt`가 사용하는 로직을 포함하고 있습니다. 72 | 73 | ## go generate 74 | 75 | 프로그램을 위해 소스코드를 생성하는 도구를 작성하기 시작할 때, 두가지의 의문이 재빨리 나타납니다: 76 | 우리의 개발 과정에서 코드를 생성하는 시점은 어느 정도입니까? 77 | 생성된 코드를 최신 상태로 유지하려면 어떻게 해야 합니까? 78 | 79 | 1.4 때부터 go tool 은 `generate` 커맨드를 제공합니다. 80 | 이 도구를 사용하면 go tool 자체를 사용하여 코드 생성에 사용하는 도구들을 실행할 수 있습니다. 81 | 82 | 단지 아래의 포맷으로 코멘트를 작성해 주면 됩니다: 83 | 84 | ``` 85 | //go:generate shell command 86 | ``` 87 | 88 | 작성하고 나면, `go generate` 는 실행시마다 항상 자동으로 `command` 를 호출합니다. 89 | 90 | 기억해야할 중요한 두 포인트가 있습니다: 91 | 92 | * `go generate` 는 프로그램이나 패키지를 작성하는 개발자에 의해 실행하도록 의도되어집니다. 93 | 이것은 `go get`에 의해 결코 자동으로 호출되지 않습니다. 94 | * 당신은 `go generate`에 의해 실행되는 모든 도구들을 이미 설치하고 시스템 안에서 setup을 해두어야 합니다. 95 | 어떤 도구를 사용하려고 하고 어디에서 다운로드 받을 수 있는지 문서화해야 합니다. 96 | 97 | 또한, 만약 당신의 코드 생성 도구가 동일한 repository에 들어 있다면, `go:generate`로부터 98 | `go run`을 호출하도록 권장합니다. 그러면 도구를 변경하려는 때마다 매번 수동으로 빌드하고 설치하는 작업 없이 99 | `generate` 할 수 있습니다. 100 | 101 | # 자신만의 도구를 만들기 시작하는 방법은 무엇입니까? 102 | 103 | stdlib 패키지로 코드를 분석하고 생성하는 것은 훌륭하지만, 해당 문서는 거대하고, 패키지를 어떻게 사용해야 할지에 대한 104 | 노하우를 단지 문서로 부터 얻는 것은 꽤 벅찹니다. 105 | 106 | 코드 생성을 시작할 때 내가 했던 가장 좋은 방법은 이미 존재하는 몇 도구들을 배우는 것이었습니다. 107 | 108 | 1. 빌드할 수 있는 그러한 종류의 도구들로부터 몇몇 영감을 얻을 것입니다. 109 | 2. 그 도구들의 소스 코드로 부터 배울 수 있는 기회를 가질 것입니다. 110 | 3. 이러한 도구들 중에 스스로 유용한 도구들이 무엇인지 찾아낼 수 있습니다. 111 | 112 | # 배우기 위한 프로젝트들 113 | 114 | ## 인터페이스 구현을 위한 stubs 생성하기 115 | 116 | 구현하려는 인터페이스에 정의된 메서드 목록을 복사하고 붙여 넣은 자신을 발견한 적이 있습니까? 117 | 118 | stubs를 자동으로 생성하기 위해 [`impl`][impl]를 사용할 수 있습니다. 119 | 인터페이스를 위해 stdlib 의 패키지를 이용하여 구현해야할 메서드를 출력합니다. 120 | 121 | 122 | ```bash 123 | $ impl 'f *File' io.ReadWriteCloser 124 | func (f *File) Read(p []byte) (n int, err error) { 125 | panic("not implemented") 126 | } 127 | 128 | func (f *File) Write(p []byte) (n int, err error) { 129 | panic("not implemented") 130 | } 131 | 132 | func (f *File) Close() error { 133 | panic("not implemented") 134 | } 135 | ``` 136 | 137 | ## mockery로 mocks 자동 생성하기 138 | 139 | [testify][testify]는 유닛테스팅을 실행할 때 쉽게 의존성을 mock할 수 있는 [mock][testify-mock] 패키지를 가지고 있습니다. 140 | 141 | 인터페이스들이 암시적으로 만족하기 때문에, 의존성들을 인터페이스들을 이용하여 특정화 할 수 있으며, 유닛 테스팅 중에 외부 의존성보다는 mock을 사용할 수 있습니다. 142 | 143 | 이론적인 downcaser 인터페이스를 mock 하는 방법에 대한 매우 간단한 예제: 144 | 145 | ```go 146 | package main 147 | 148 | import ( 149 | "testing" 150 | 151 | "github.com/stretchr/testify/mock" 152 | ) 153 | 154 | type downcaser interface { 155 | Downcase(string) (string, error) 156 | } 157 | 158 | func TestMock(t *testing.T) { 159 | m := &mockDowncaser{} 160 | m.On("Downcase", "FOO").Return("foo", nil) 161 | m.Downcase("FOO") 162 | m.AssertNumberOfCalls(t, "Downcase", 1) 163 | } 164 | ``` 165 | 166 | mock 구현은 꽤 직관적입니다: 167 | 168 | ```go 169 | type mockDowncaser struct { 170 | mock.Mock 171 | } 172 | 173 | func (m *mockDowncaser) Downcase(a0 string) (string, error) { 174 | ret := m.Called(a0) 175 | return ret.Get(0).(string), ret.Error(1) 176 | } 177 | ``` 178 | 179 | 실제적으로, 구현체로부터 볼 수 있는 것은, 꽤 직관적이어서 인터페이스 정의 자체가 mock을 자동으로 생성하기 위한 모든 정보를 가지고 있습니다. 180 | 181 | [`mockery`][mockery] 이 하는 것: 182 | 183 | ``` 184 | $ mockery -inpkg -testonly -name=downcaser 185 | Generating mock for: downcaser 186 | ``` 187 | 188 | 나는 항상 `go generate` 를 사용하여 인터페이스들에 대한 mocks를 자동으로 생성합니다. 189 | 우리는 이전 예제에 mock up 과 실행을 위해 단지 한 라인만 추가해 주면 됩니다. 190 | 191 | ```go 192 | package main 193 | 194 | import ( 195 | "testing" 196 | ) 197 | 198 | type downcaser interface { 199 | Downcase(string) (string, error) 200 | } 201 | 202 | //go:generate mockery -inpkg -testonly -name=downcaser 203 | 204 | func TestMock(t *testing.T) { 205 | m := &mockDowncaser{} 206 | m.On("Downcase", "FOO").Return("foo", nil) 207 | m.Downcase("FOO") 208 | m.AssertNumberOfCalls(t, "Downcase", 1) 209 | } 210 | ``` 211 | 212 | go generatoe 를 실행했을 때 모든 것이 한번에 set up 되는 지 볼 수 있습니다: 213 | 214 | ``` 215 | $ go test 216 | # github.com/ernesto-jimenez/test 217 | ./main_test.go:14: undefined: mockDowncaser 218 | FAIL github.com/ernesto-jimenez/test [build failed] 219 | 220 | $ go generate 221 | Generating mock for: downcaser 222 | 223 | $ go test 224 | PASS 225 | ok github.com/ernesto-jimenez/test 0.011s 226 | ``` 227 | 228 | 인터페이스 변경을 할 때 마다 `go generate`를 실행하면 해당하는 mock이 업데이트 될 것입니다. 229 | 230 | [`mockery`][mockery] 는 내가 [`testify/mock`][testify-mock]에 contribute를 231 | 시작한 주된 이유이고 `testify`의 maintainer가 되었습니다. 232 | 그렇지만, `go/types` 가 1.5의 표준 라이브러리에 포함되기 이전에 개발되었기 때문에, 저 레벨 `go/ast`을 이용하여 구현되었고, 233 | 코드를 보기 어렵게 만들었으며 [failing to generate mocks from interfaces using 234 | composition][mockery-issue] 같은 버그가 나타났습니다. 235 | 236 | ## gegen 실험 237 | 238 | 나는 코드 생성에 대해 익히기 위해 [`gogen`][gogen] 패키지에서 만들었던 코드 생성 도구들을 오픈소스화 했습니다. 239 | 240 | 아래의 세가지 도구들을 포함합니다: 241 | 242 | * [goautomock][goautomock]: mockery 와 유사하지만 `go/ast`가 아닌 `go/types`를 이용해 구현되었습니다. 243 | 따라서 composed 인터페이스들에 대해서 역시 동작합니다. 역시 표준 라이브러리로부터 인터페이스를 mock 하기에 용이합니다. 244 | * [gounmarshalmap][gounmarshalmap]: 구조체를 가져 map을 구조체로 디코딩하는 `UnmarshalMap(map[string]interface{})` 함수를 생성합니다. 245 | reflection 보다는 [`mapstructure`][mapstructure] 의 대안으로 코드 생성에 동작하도록 작성되었습니다. 246 | * [gospecific][gospecific]: `interface{}` 에 의존하는 제네릭으로부터 특정한 패키지를 생성하는 작은 실험입니다. 247 | 제네릭의 패키지 소스코드를 읽어서 `interface{}` 를 사용하는 제네릭 패키지에서 특정한 타입을 사용하는 새로운 패키지를 생성합니다. 248 | 249 | # 랩핑 업 250 | 251 | 코드 생성은 대단합니다. 그것은 우리의 프로그램 타입을 안전하게 지키는 동시에 반복적인 코드를 쓸 수 있습니다. 252 | 우리는 [Slackline][slackline]을 만들 때 폭넓게 사용하였고 곧 [testify][testify-codegen] 에도 사용할 것입니다. 253 | 254 | 그럼에도 스스로에게 질문하기를 기억하십시오: 이러한 도구를 작성하는 것이 시간을 아낍니까? 255 | 256 | [xkcd][xkcd] 그 대답에 대답하는데 도움이 될 것입니다. 257 | [![](http://imgs.xkcd.com/comics/is_it_worth_the_time.png)][xkcd] 258 | 259 | [go-generate-post]: https://blog.golang.org/generate 260 | [xkcd]: https://xkcd.com/1205/ 261 | [slackline]: https://slackline.io 262 | [testify-codegen]: https://github.com/stretchr/testify/pull/241 263 | [impl]: https://github.com/josharian/impl 264 | [testify]: https://github.com/stretchr/testify 265 | [testify-mock]: https://godoc.org/github.com/stretchr/testify/mock 266 | [mockery]: https://github.com/vektra/mockery 267 | [mockery-issue]: https://github.com/vektra/mockery/issues/18 268 | [ast]: https://en.wikipedia.org/wiki/Abstract_syntax_tree 269 | [gogen]: https://github.com/ernesto-jimenez/gogen 270 | [mapstructure]: https://github.com/mitchellh/mapstructure 271 | [goautomock]: https://github.com/ernesto-jimenez/gogen/tree/master/cmd/goautomock/main.go 272 | [gounmarshalmap]: https://github.com/ernesto-jimenez/gogen/tree/master/cmd/gounmarshalmap 273 | [gospecific]: https://github.com/ernesto-jimenez/gogen/tree/master/cmd/gospecific 274 | [original-blog-url]: https://blog.gopheracademy.com/advent-2015/reducing-boilerplate-with-go-generate/ 275 | -------------------------------------------------------------------------------- /content/post/hugo-advanced/overview.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T23:49:14-04:00" 3 | draft = true 4 | title = "Hugo 고급반 - 개요" 5 | 6 | tags = ["Blog", "Hugo"] 7 | categories = ["How to"] 8 | series = ["Hugo 고급반"] 9 | authors = ["Jhonghee Park"] 10 | 11 | +++ 12 | 13 | Hugo 입문을 마치시고 본격적인 사이트 개발에 참여하실 분들을 위한 가이드입니다. 14 | -------------------------------------------------------------------------------- /content/post/hugo-intro/content-basic.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T23:25:04-04:00" 3 | draft = false 4 | title = "시리즈 #2 - 컨텐츠 제작 기초" 5 | description = "Hugo 입문 두번째 시리즈로 컨텐츠 제작과 관련해 꼭 알아야 할 개념들을 소개합니다" 6 | 7 | tags = ["Blog", "Hugo"] 8 | categories = ["How to"] 9 | series = ["Hugo Introduction"] 10 | authors = ["Jhonghee Park"] 11 | 12 | toc = true 13 | 14 | +++ 15 | 16 | # 컨텐츠 제작 기초 17 | 18 | 컨텐츠를 제작하면서 꼭 알아야 할 몇가지 개념을 정리하겠습니다. 19 | 20 | # 컨텐츠의 조직적인 관리 (Organization) 21 | 22 | 사이트가 많은 양의 컨텐츠를 보유하게 되면서 조직적인 관리가 필요할 때 Hugo가 어떻게 도와주는지 알아 봅시다. [시리즈 1](/post/hugo-intro/getting-started/)에서 보았 듯이 Hugo의 `configuration`1에 특별한 세팅이 없는 한 모든 컨텐츠는 `content` 폴더 안에 위치하게 됩니다. Hugo를 통해 만들어질 사이트의 URL은 `content`내의 폴더 구조와 매우 밀접한 관계가 있습니다. 우선 `content` 바로 아래 위치하는 폴더는 `section`이라고 부르는데 매우 중요한 역활을 합니다. 다음의 예는 `section`이 사이트 URL과 어떤 상관이 있는지 암시합니다. 만들어진 사이트의 URL경로는 거울을 보듯이 컨텐츠 소스의 경로을 반영합니다. 23 | ``` ascii 24 | . 25 | |- content 26 | |- post 27 | | |- firstpost.md // <- http://1.com/post/firstpost/ 28 | | |- happy 29 | | | |- ness.md // <- http://1.com/post/happy/ness/ 30 | | |- secondpost.md // <- http://1.com/post/secondpost/ 31 | |- quote 32 | |- first.md // <- http://1.com/quote/first/ 33 | |- second.md // <- http://1.com/quote/second/ 34 | 35 | ``` 36 | 그렇다면 컨텐트가 소스의 경로와 다른 URL 경로를 가질 수는 없는 걸까요? 예를 들어, 37 | 38 | * 파일 이름 보다 좀 더 의미있는 단어가 URL에 나타나게 할 수는 없는가? 39 | * `section`을 다른 이름으로 대체할 수는 없는가? 40 | * 다른 `section`에 속한 컨텐트를 서로 조합해서 일관된 URL로 나타나게 할 수는 없는가? 41 | 42 | 이런 질문들에 대한 답을 얻기 위해서 다음의 개념들을 이해할 필요가 있습니다. 43 | 44 | # 컨텐트 경로 (Destination) 45 | 46 | 이미 살펴본 바와 같이 특별한 변수가 없다면 Hugo를 통해 생성된 컨텐트의 경로는 소스파일의 경로에 의해 결정됩니다. 하지만 컨텐트의 경로는 앞으로 살펴볼 정면 변수들(Front Matter)을 통해 다양한 형태로 조정될 수 있습니다. 그럼 Hugo는 컨텐트의 경로를 어떻게 조립하는 것일까요? 우선 몇가지 경로의 부분을 지칭하는 이름을 소개하겠습니다. 47 | 48 | ``` ascii 49 | permalink 50 | ⊢--------------^-------------⊣ 51 | http://spf13.com/projects/hugo 52 | 53 | baseURL section slug 54 | ⊢-----^--------⊣ ⊢--^---⊣ ⊢-^⊣ 55 | http://spf13.com/projects/hugo 56 | 57 | baseURL section slug 58 | ⊢-----^--------⊣ ⊢--^--⊣ ⊢--^--⊣ 59 | http://spf13.com/extras/indexes/example 60 | 61 | baseURL path slug 62 | ⊢-----^--------⊣ ⊢------^-----⊣ ⊢--^--⊣ 63 | http://spf13.com/extras/indexes/example 64 | 65 | baseURL url 66 | ⊢-----^--------⊣ ⊢-----^-----⊣ 67 | http://spf13.com/projects/hugo 68 | 69 | baseURL url 70 | ⊢-----^--------⊣ ⊢--------^-----------⊣ 71 | http://spf13.com/extras/indexes/example 72 | ``` 73 | * **section** 컨텐트 타입의 기본값을 결정합니다. 74 | * 컨텐트 소스의 위치에 따라 값이 정해집니다. 75 | * `url` 정면변수의 값은 `section` 부분경로를 바꿀 수 있습니다. 76 | * **slug** 확장자를 제외한 컨텐트 소스의 파일 이름으로 정해집니다. 77 | * `slug` 정면변수의 값을 통해 바꿀 수 있습니다. 78 | * **path** `section`에서 시작하여 `slug`직전까지의 경로 79 | * 컨텐트 소스의 경로에 의해 결정됩니다. 80 | * **url** basicURL 다음부터 `slug`까지 포함된 상대적인 URL 81 | * 정면변수에 의해 결정될 수 있으며 컨텐트 경로를 결정하는 다른 정면변수의 영향을 무력화 합니다. 82 | 83 | `slug`나 `url` 정면변수들을 통해 컨텐트의 목적지 경로(Destination)를 부분적으로 수정하거나 전면적으로 교체할 수 있다는 걸 알 수 있습니다. 이제 목적지 경로 변경 기능외에 컨텐트 처리와 HTML변환시 정면 변수들이 어떤 역활을 하는지 알아봅시다. 84 | 85 | # 정면 변수들(Front Matter) 86 | `Front Matter`는 컨텐트의 메타 데이터라고 할 수 있습니다. 컨텐트보다 먼저 나타난다는 의미로 `front matter`라는 이름을 지었을 것으로 추측해 봅니다. 시작과 끝을 나타내는 문자열에 따라 여러가지 포맷이 지원됩니다. 87 | 88 | * `+++`로 시작과 끝이 표시되면 [TOML](https://github.com/toml-lang/toml)을 사용해 `Front Matter`를 정의할 수 있습니다. 89 | * `---`로 시작과 끝이 표시되면 [YAML](http://yaml.org)을 사용해 `Front Matter`를 정의할 수 있습니다. 90 | * `{`로 시작하고 `}`로 끝이 표시되면 [JSON](http://www.json.org)을 사용해 `Front Matter`를 정의할 수 있습니다. 91 | 92 | 이 글에서는 TOML의 예만을 살려보도록 하겠습니다. 93 | ``` 94 | +++ 95 | date = "2016-08-23T23:25:04-04:00" 96 | draft = true 97 | title = "시리즈 #2 - 컨텐츠 제작 기초" 98 | description = "Hugo 입문 두번째 시리즈로 컨텐츠 제작과 관련해 꼭 알아야 할 개념들을 소개합니다" 99 | 100 | tags = ["Blog", "Hugo"] 101 | categories = ["How-to"] 102 | series = ["Hugo Introduction"] 103 | authors = ["Jhonghee Park"] 104 | 105 | toc = true 106 | +++ 107 | ``` 108 | `Front Matter`로 정의될 수 있는 변수에 특별한 제약사항은 없습니다. 어떤 변수라도 템플렛안에서 `.Params.varname`형식으로 접근할 수 있습니다. 템플릿 안에서 변수이름은 항상 소문자로 표현됩니다. 예를 들어 `camelCase = true`라고 정의된 변수는 템플릿안에서는 `.Params.camelcase`2로 값을 출력할 수 있습니다. 다음은 컨텐트 제작에 필수적인 변수들입니다. 109 | 110 | * **title** 컨텐트의 제목 111 | * **description** 컨텐트에 대한 설명 112 | * **date** 컨텐츠를 정열할 때 사용할 날짜 113 | * **taxonomies** 항상 복수형으로 표현되는 분류변수로 위의 예제에 나와있는 `tags`, `categories`, `series`, 그리고 `authors` 114 | 115 | 이외에 다음과 같은 선택적으로 사용할 수 있는 변수들도 있습니다. 116 | 117 | * **aliases** 하나 이상의 이름들이 나열된 정렬(예를 들면 이름을 바꾼 컨텐트가 과거에 사용했던 URL)로 현재의 컨텐트 URL로 리디랙트 되는 별명들. 자세한 내용은 다음 링크를 참조, [Aliases](https://gohugo.io/extras/aliases/). 118 | * **draft** 만약 값이 true이면, 컨텐트는 HTML로 만들어 지지 않습니다. 하지만 --buildDrafts 플래크를 써서 강제할 수 있습니다. 119 | * **publishdate** 만약 날짜가 미래로 잡혀 있으면, 컨텐트는 HTML로 변환되지 않습니다. --buildFuture 플래그를 써서 강제할 수 있습니다. 120 | * **type** 컨텐트 타입 (없는 경우는 컨텐트가 속한 디렉토리를 통해 값이 정해집니다. 즉, `type`의 기본값은 `section`을 통해 정해집니다.) 121 | * **isCJKLanguage** 값이 true인 경우, 컨텐트를 한중일 언어로 작성된 것으로 간주하고, `.Summary`와 `WordCount`와 같은 값들이 한중일 언어에 맞게 생성됩니다. 122 | * **weight** 컨텐트의 차례를 정렬하는데 사용됩니다. 123 | * **markup** (실험적변수) `rst`는 reStructuredText (rst2html 툴을 사용합니다) or `md` (기본값) 은 Markdown 124 | * **slug** URL의 말단에 위치하는 토큰(token) 125 | * **url** 웹 루트에서 컨텐트까지의 전체 경로. 126 | 127 | 사이트 개발자의 입장에서 사이트의 기능을 확장하고 컨텐트 제작자에게 그 기능을 조종할 수 있는 인터페이스를 제공하려고 할 때 정면 변수를 유용하게 사용할 수 있습니다. 위에 정면변수 예를 보면, 렌더링된 컨텐트의 상단에 목차를 구현하고 그 기능을 컨텐트 제작시 `toc = true`를 이용해 나타나게 하는 예가 있습니다. 또 다른 예는 `authors`를 분류변수(taxonomies)로 등록하고 테마를 통해 구현한 뒤 정면변수의 하나로 컨텐트 제작자에게 자신의 이름을 입력할 수 있게 합니다. 컨텐츠 제작자는 항상 동일한 이름을 사용함으로서 사이트가 제공하는 컨텐츠 목록의 자동 발생을 사용할 수 있습니다. 128 | 129 | # 지원되는 컨텐트의 포맷 130 | 131 | 컨텐트 상단에 정면변수들의 정의되고 그 뒤로 컨텐트의 내용이 따라옵니다. Hugo의 컨텐트는 다양한 포맷으로 제작될 수 있습니다. [asciidoc](http://www.methods.co.nz/asciidoc/), [reStructuredText](http://docutils.sourceforge.net/rst.html)는 외부 프로그램의 도움을 얻어 지원되는 포맷들입니다. 외부 툴에 의존하지 않고 Hugo 자체적으로 컨텐트를 제작할 수 있는 포맷은 [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)입니다. Markdown을 이용해 새로운 컨텐트를 제작하고 싶으면 `hugo new`명령에 `md`확장자를 가지는 파일이름을 사용해 시작할 수 있습니다. 132 | 133 | ``` 134 | $ hugo new post/my-first-blog.md 135 | ``` 136 | 이 명령이 실행되면 Markdown 파일이 만들어 지고 기본적인 정면변수들의 셑업이 이루어 집니다. 이 Scaffolding 과정에서 Hugo는 post라는 archetype을 찾기 위해 테마의 archetypes 폴더나 프로젝트 내 archetypes 폴더안을 검색하고 정면변수들의 기본 셑업을 진행합니다. 만약에 post archetype이 정의되어 있지 않을 때는 Hugo의 기본 값들을 사용합니다. 137 | 138 | # 컨텐트 타입과 전형 (Content Types and archetypes) 139 | 컨텐트 타입은 기본적으로 소스의 위치가 어디에 있느냐에 따라 결정 됩니다. `post/my-first-blog.md`에 작성된 컨텐트는 정면변수 `type`이 존재하지 않는 한 post 컨텐트 타입으로 간주되어 타입에 맞는 렌더링이 이루어 집니다. 만약에 전혀 새로운 컨텐트 타입을 도입하고자 하면 어떻게 해야 할까요? 예를 들어 musician이라는 컨텐트 타입을 통해 유명한 음악가들의 소개를 하고자 하는 가정을 합시다. `hugo new musician/bach.md`로 컨텐트를 초기화 했을때 Hugo의 입장에서는 musician이라는 컨텐트 타입으로 bach.md의 HTML을 렌더링하려고 할 것입니다. musician 컨텐트에 특화된 렌더링을 제공하려면 다음과 같이 새로운 탬플릿을 layouts에 추가해야 합니다. 140 | 141 | * 우선 컨텐트 자체의 렌더링을 위해 `layouts/musician/single.html`을 추가합니다. 142 | * `section` 리스트 페이지의 렌더링을 지원하기 위해서는 `layouts/section/musician.html`을 추가합니다. 143 | * 음악가의 시대에 따라 조금씩 다른 페이지 뷰(View)를 제공하려면 `layouts/musician`안에 변형된 템플릿을 추가하고 컨텐트의 정면변수로 `layout`을 사용해 지정해 줍니다. 144 | 145 | 템플릿을 준비하면서 musician 컨텐트 타입에 필요한 새로운 정면변수들이 생길 수 있습니다. 저자의 입장에서는 새로운 musician 컨텐트를 `hugo new`명령으로 발생 시킨 후 첨가된 정면변수들을 일일이 **기억**해서 입력해야 하는 불편함이 생깁니다. 이런 불편함을 해소하기 위해 musician 컨텐트 타입의 전형(archetype)을 정의해 줄 필요가 있습니다. musician archetype은 `archetypes/musician.md`를 사용해 정의되고 이 archetype 문서에 필요한 기본값들을 지정해 줄 수 있습니다. 146 | 147 | **archetypes/musician.md** 148 | ``` 149 | +++ 150 | name = "" 151 | bio = "" 152 | genre = "" 153 | +++ 154 | ``` 155 | 이 archetype을 사용해 새 musician 컨텐트를 만들어 봅시다. 156 | ``` 157 | $ hugo new musician/mozart.md 158 | ``` 159 | Hugo는 musician 타입을 인지하고 준비된 archetype을 이용하여 정면변수들을 자동으로 입력해 줍니다. 160 | **content/musician/mozart.md** 161 | ``` 162 | +++ 163 | title = "mozart" 164 | date = "2015-08-24T13:04:37+02:00" 165 | name = "" 166 | bio = "" 167 | genre = "" 168 | +++ 169 | ``` 170 | 171 | 컨텐츠 저자의 관점에서 보면 이제 어느 정도 Hugo를 이용해 정적사이트를 건설할 준비가 끝난 셈입니다. 이어지는 시리즈에서는 사이트 개발자의 관점에서 어떻게 새로운 테마를 만들 수 있는지, 정면변수들과 사이트 구성변수(configuration)들이 템플릿안에서 어떻게 접근할 수 있는지를 알아보겠습니다. 172 | 173 |
174 | 175 |
176 |
177 |
    178 |
  1. Hugo의 configuration은 특별한 조치가 없는 경우 프로젝트 폴더내 config.toml에 정의됩니다. TOML외 YAML과 JSON 포맷이 지원됩니다.
  2. 179 |
  3. Hugo는 여러 템플릿 엔진을 지원합니다. 이 글에서는 Go언어의 자체적 `text/template`을 사용하는 것을 전제합니다.
  4. 180 |
181 |
182 |
183 | -------------------------------------------------------------------------------- /content/post/hugo-intro/getting-started.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T23:24:55-04:00" 3 | draft = false 4 | title = "시리즈 #1 - Hugo 시작하기" 5 | 6 | tags = ["Blog", "Hugo"] 7 | categories = ["How to"] 8 | series = ["Hugo Introduction"] 9 | authors = ["Jhonghee Park"] 10 | 11 | toc = true 12 | +++ 13 | 14 | # Hugo 시작하기 15 | 16 | [Hugo](https://gohugo.io)는 Go로 제작되고 하나의 실행파일로 배포됩니다. 다양한 설치 방법이 있지만 우선 Package Manager를 쓰시는 분들을 중심으로 살펴보겠습니다. 17 | 18 | ## Package Manager로 설치하기 19 | 20 | MacOS를 쓰시는 분들은 Homebrew를 이용해 쉽게 설치하실 수 있습니다. 21 | 22 | ``` 23 | brew update && brew install hugo 24 | ``` 25 | 26 | Windows에서 Chocolatey를 쓰시는 분들도 비슷한 방법으로 설치가 가능합니다. 27 | ``` 28 | C:\> choco install hugo 29 | ``` 30 | 31 | Linux에서는 조금 복잡해 집니다. 우분트를 쓰시는 분들은 우선 [Hugo 릴리즈 페이지](https://github.com/spf13/hugo/releases)로 가서 최신 deb 버전을 다운로드한 후에 다음 명령을 실행 시키면 됩니다. 32 | ``` 33 | sudo dpkg -i hugo*.deb 34 | ``` 35 | 36 | ## 소스로 직접 빌드해 쓰는 방법 37 | 이미 Go로 개발 환경을 갖추고 계신 분들은 직접 소스를 빌드해 쓰시는 방법이 가장 편합니다. 간단히 `go get`툴을 이용해 설치하실 수 있습니다. 38 | ``` 39 | go get -v github.com/spf13/hugo 40 | ``` 41 | 42 | Hugo가 설치되었는지를 `version` 보조 명령어를 사용해 확인하십시요. 43 | ``` 44 | $ hugo version 45 | Hugo Static Site Generator v0.17-DEV BuildDate: 2016-08-21T19:44:40-04:00 46 | ``` 47 | 48 | # 프로젝트 폴더 만들기 49 | 50 | 정적 사이트 제너레이터를 처음 접하시는 분들을 위해 Hugo를 간단하게 설명하자면, Hugo는 소스 폴더 아래 존재하는 파일과 컨텐츠 템플릿을 입력으로 사용해서 웹사이트 전체를 출력하는 시스템입니다. 보통 소스는 [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)을 이용한 컨텐츠이거나 템플릿 언어로 작성된 HTML에 자바스크립과 CSS스타일로 구성되어 웹 개발자에게 매우 친숙한 환경이라 할 수 있습니다. 51 | 52 | ``` ascii 53 | +------------------+ 54 | | Content +--------+ 55 | | (Markdown) | | 56 | +------------------+ | +------------+ 57 | +------------------+ +--v---+ |Full Website| 58 | |Template | | | +-------+----+ 59 | |(text/template) | | Hugo | | | | 60 | |(Ace) +-----> +-------> | | 61 | |(Amber) | | | | | | 62 | +------------------+ +--^--^+ | | | 63 | +------------------+ | | | | | 64 | |Configuraton | | | +-------+----+ 65 | |(toml, yaml, json)+--------+ | 66 | +------------------+ | 67 | +------------------+ | 68 | | Static | | 69 | | (image) | | 70 | | (javascript) +-----------+ 71 | | (css) | 72 | +------------------+ 73 | ``` 74 | 75 | Hugo는 커맨드라인 명령어 체계는 각종 보조 명령어와 POSIX를 준수하는 플래그로 구성되어 빌드와 유틸리티 기능을 제공합니다. 우선 Hugo가 제공하는 Scaffolding 명령어를 가지고 프로젝트 폴더를 만들어 보도록 합니다. 76 | 77 | ``` 78 | $ hugo new site golangkorea-hugo 79 | ``` 80 | Hugo의 모든 명령1은 `hugo`로 시작하고 보조 명령어가 뒤를 따릅니다. 여기서 `new`는 보조 명령어로서 `site` 보조 명령어와 함께 프로젝트를 초기화합니다. 초기화된 프로젝트의 폴더 구조는 다음과 같습니다. 81 | ``` 82 | $ cd golangkorea-hugo 83 | $ tree -a 84 | . 85 | ├── archetypes 86 | ├── config.toml 87 | ├── content 88 | ├── data 89 | ├── layouts 90 | ├── static 91 | └── themes 92 | 93 | 6 directories, 1 file 94 | ``` 95 | 초기화된 프로젝트에는 텅빈 폴더 6개와 `config.toml` 파일 하나가 만들어 집니다. 각 폴더의 용도를 간단히 나열하면 다음과 같습니다. 96 | 97 | * archetypes: `hugo new`명령으로 컨텐트 생성시 [Front Matter](https://gohugo.io/content/front-matter/)2 에 컨텐트 타입에 따른 기본 값들을 어떻게 정해줄 것인가를 결정하는 파일들을 저장합니다. 98 | * content: 컨텐츠가 저장됩니다. 99 | * data: 템플랫으로 불러쓸 수 있는 데이터 파일을 저장하는 공간입니다. 데이터의 타입은 toml, yaml, 과 json이 지원됩니다. 100 | * layouts: 테마를 커스터마이징할 때 기존의 테마내 탬플릿의 내용을 수정하거나 덧씌우기를 하는 템플릿을 저장하는 공간입니다. 101 | * static: 이미지, 자바스크립, CSS등을 저장하는 공간 102 | * themes: 사이트의 테마를 저장하는 공간. 103 | 104 | config.toml의 내용을 보면 다음과 같습니다. 105 | ``` 106 | baseurl = "http://replace-this-with-your-hugo-site.com/" 107 | languageCode = "en-us" 108 | title = "My New Hugo Site" 109 | ``` 110 | `baseurl`은 말 그대로 사이트내 모든 리소스의 URL의 베이스를 형성합니다. 예를 들어 `content/post/my-first-blog.md`라는 컨텐트가 있으면 Full URL은 `http://replace-this-with-your-hugo-site.com/post/my-first-blog`이 됩니다. 111 | 112 | # 첫번째 컨텐트 만들기 113 | 114 | 그럼, 다음 Scaffolding 명령을 써서 첫번째 블로그 포스트를 만들어 보도록 합니다. 115 | ``` 116 | $ hugo new post/my-first-blog.md 117 | ``` 118 | `content/post/my-first-blog.md`가 만들어 지면 아래와 같이 편집을 하고 저장하십시요. 119 | ``` 120 | +++ 121 | date = "2016-08-24T21:51:10-04:00" 122 | draft = true 123 | title = "my first blog" 124 | 125 | +++ 126 | 127 | # Hello, Hugo! <- 편집 부분 128 | ``` 129 | `hugo server`명령을 써서 Hugo가 제공하는 웹서버를 구동한 다음 `http://localhost:1313`을 브라우저로 열어 보십시요. 텅빈 페이지로 나타날 겁니다. 왜 그럴까요? 답 부터 말씀드리면 Hugo의 입장에서는 무엇으로 페이지를 렌더링할 지 아무런 정보가 없는 경우인 것입니다. `layouts` 폴더안에 `index.html`이라는 파일을 만들고 다음과 같이 편집해 저장하신 다음 다시 `http://localhost:1313`을 열어 보십시요. 130 | ``` 131 |

Hello, Hugo!

132 | ``` 133 | **Hello, Hugo!**라고 크게 나타나는 것을 보게 될 것입니다. 134 | 135 | 이제 `http://localhost:1313/post/my-first-blog`를 열어 보십시요. 심지어 `404 page not found`라고 나옵니다. 텅빈 페이지가 아니고 왜 404일까요? 이유는 포스트의 Front Matter에 `draft = true`라고 명시되어 있어서 Hugo의 입장에서는 렌더링을 할 이유가 없는 것이죠. `Ctrl-C`로 Hugo 웹서버를 중단시킨 다음 `hugo server -D=true`명령을 써서 다시 웹서버를 가동시키시고 `http://localhost:1313/post/my-first-blog`를 열어 보십시요. 이번에는 404가 아니고 텅빈 페이지가 보일 겁니다. Hugo를 의인화해서 다시 설명을 드리면, `-D=true` 플래그를 보고 드래프트 포스트도 렌더링을 해야 하는데 어떻게 해야 할 지 몰라 백지를 낸 상황인 겁니다. 이건 어떻게 고쳐야 할까요? 136 | 137 | `layouts/post/single.html`라는 파일을 만드시고 다음의 내용을 저장하신 다음, `http://localhost:1313/post/my-first-blog`을 열어 보세요. 138 | ``` 139 |

Before content

140 | {{ .Content }} 141 |

After content

142 | ``` 143 | 첫번째 포스트가 이제 보이십니까? 144 | 145 | # 이렇게 힘들게 만들어야 하나? 146 | 이런 질문이 당연히 생기실 겁니다. 사이트의 구조와 컨텐츠의 템플릿을 하나씩 만들어 나가야 한다면 사이트 발생기라고 부를 이유가 없겠죠. 누군가 그런 힘든 노동을 통해 `layouts`의 구조와 템플랫을 모두 작성했다면 공유할 수 있는 메카니즘이 필요합니다. 그런 공유의 매카니즘을 `테마(theme)`이라고 부릅니다. 147 | 148 | 이제 `layouts/index.html`과 `layouts/post/single.html`을 제거하시고 테마를 사용하는 방법을 배워 봅시다. 다음과 같이 `hugo-octopress` 테마를 설치하십시요. 149 | ``` 150 | $ rm layouts/index.html 151 | $ rm layouts/post/single.html 152 | $ cd themes 153 | $ git clone https://github.com/parsiya/Hugo-Octopress.git 154 | $ cd .. 155 | ``` 156 | 테마가 설치된 후에는 Hugo의 웹서버를 다음과 같이 시작해 보십시요. 157 | ``` 158 | $ hugo server -D=true -t=hugo-octopress 159 | ``` 160 | Hugo로 만든 당신의 첫번째 포스트가 보일 겁니다. 161 | 162 | ![image](https://cloud.githubusercontent.com/assets/211484/17955233/9990f3c8-6a4e-11e6-8d3e-0c824453ba1f.png) 163 | 164 | 165 |
166 | 167 |
168 |
    169 |
  1. [Hugo의 모든 명령](https://gohugo.io/commands/)
  2. 170 |
  3. 컨텐트 인스턴스의 메타데이터로 템플릿에서 호출해 쓸 수 있습니다.
  4. 171 |
172 |
173 |
174 |
175 | -------------------------------------------------------------------------------- /content/post/hugo-intro/how-to-contribute-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T23:25:55-04:00" 3 | draft = false 4 | title = "시리즈 #5 - 사이트에 블로그 올리는 방법" 5 | 6 | tags = ["Blog", "Hugo"] 7 | categories = ["How to"] 8 | series = ["Hugo Introduction"] 9 | authors = ["Jhonghee Park"] 10 | 11 | +++ 12 | 13 | # 사이트에 블로그 올리는 방법 14 | 15 | [Golang Korean Community 사이트](https://golangkorea.github.io)는 깃헙의 [golangkorea](https://github.com/golangkorea) Organization의 웹사이트로 [GitHub Pages](https://pages.github.com/)를 이용해 제작되고 있습니다. 현존하는 Static Site Generator중 가장 빠른 Hugo를 엔진으로 사용하고 주로 Go언어에 관련된 포스트와 글로벌 기술 동향및 최신의 개발 기법등을 소개하는 포스트를 다루고 있습니다. 16 | 17 | # 참여자격 18 | 19 | 깃헙에 계정이 있는 개발자라면 누구나 제작에 참여하실 수 있습니다. 20 | 21 | # Fork it! 22 | [Golang Korean Community 사이트](https://golangkorea.github.io)는 다음과 같이 두개의 Repo를 가지고 개발됩니다. 23 | 24 | * **[golangkorea-hugo](https://github.com/golangkorea/golangkorea-hugo)** Hugo로 제작하는 golangkorea.github.io의 소스 프로젝트입니다. 25 | * **[golangkorea.github.io](https://github.com/golangkorea/golangkorea.github.io)** golangkorea-hugo의 submodule로 Hugo로 빌드된 웹사이트입니다. 직접 이 repo에서 작업하지는 않습니다. 26 | 27 | 포스트를 하기 위해서 우선 githubkorea-hugo를 fork하신다음 본인의 repo를 clone하십시요. 28 | 29 | ``` 30 | $ git clone https://github.com/myaccount/golangkorea-hugo.git 31 | ``` 32 | 33 | # clone hugo-octopress 34 | 미래에는 어떻게 바뀔지 모르겠지만 현재 golangkorea.github.io는 [hugo-octopress](https://github.com/parsiya/Hugo-Octopress) 테마를 사용하고 있습니다. `themes` 폴더에 clone하십시요. 35 | 36 | ``` 37 | $ cd themes 38 | $ git clone https://github.com/parsiya/Hugo-Octopress.git 39 | $ cd .. 40 | ``` 41 | 42 | # Start Hugo 43 | 이제 로컬에서 사이트를 열어볼 차례입니다. 다음 명령을 사용해서 Hugo의 웹서버를 시작하십시요. 44 | ``` 45 | $ hugo server 46 | ``` 47 | [http://localhost:1313](http://localhost:1313)를 브라우저에 열어서 사이트가 뜨는 걸 확인하십시요. 48 | 49 | # 첫번째 포스트 50 | `hugo new`명령을 사용해서 포스트의 작성을 시작하십시요. 51 | 52 | ``` 53 | $ hugo new post/my-frist-blog.md 54 | ``` 55 | golangkorea.github.io는 `authors` taxonomy를 지원합니다. 포스트의 Front Matter에 다름과 같이 저자의 영어 이름을 입력해 주십시요. 56 | 57 | ``` 58 | +++ 59 | date = "2016-08-28T23:01:25-04:00" 60 | draft = true 61 | title = "my first post" 62 | 63 | authors = ["Your Name"] 64 | +++ 65 | ``` 66 | golangkorea.github.io는 저자의 소개 페이지를 지원합니다. 다름과 같이 본인의 이름을 hyphenated, lower-cased된 형태로 만들어 주십시요. 67 | 68 | ``` 69 | $ hugo new author/your-name.md 70 | ``` 71 | 72 | # Pull Request하기 73 | 포스트의 작성이 끝나면 다음 과정을 거쳐 Pull Request해 주십시요. 74 | 75 | ``` 76 | $ git add -A 77 | ... 78 | $ git commit -m"My first post" 79 | ... 80 | $ git push 81 | ``` 82 | Pull Request에 대한 자세한 내용은 [GitHub의 도움말](https://help.github.com/articles/about-pull-requests/)을 참조 하세요. 83 | 84 | # 최신의 golankorea-hugo repo와 싱크하기 85 | 86 | 포스트를 한 지 좀 시간이 지나다 보면 그 사이에 사이트에 많은 변화가 있을 수 있습니다. 그때는 본인의 로컬 repo를 최신의 golangkorea-hugo와 싱크 시킬 필요가 생깁니다. 새로운 포스트를 시작하기 전에 우선 로컬의 repo에 golangkorea-hugo를 upstream remote repo로 만드시고 나머지 단계를 따라 싱크 시키십시요. 87 | 88 | ``` 89 | # Add the remote, call it "upstream": 90 | 91 | git remote add upstream https://github.com/golangkorea/golangkorea-hugo.git 92 | 93 | # Fetch all the branches of that remote into remote-tracking branches, 94 | # such as upstream/master: 95 | 96 | git fetch upstream 97 | 98 | # Make sure that you're on your master branch: 99 | 100 | git checkout master 101 | 102 | # Rewrite your master branch so that any commits of yours that 103 | # aren't already in upstream/master are replayed on top of that 104 | # other branch: 105 | 106 | git rebase upstream/master 107 | ``` 108 | 109 | Merge를 하는 경우에는 `rebase`를 `merge`로 바꿔주시면 됩니다. [깃헙의 공식 도움말](https://help.github.com/articles/syncing-a-fork/)을 참조하십시요 110 | 111 | 일단 싱크되면 본인의 forked repo에 다시 푸쉬하십시요. 112 | ``` 113 | git push -f origin master 114 | ``` 115 | 116 | 117 | 118 | 이제 새로운 포스트를 작성하십시요. 119 | 120 |
121 |
122 | -------------------------------------------------------------------------------- /content/post/hugo-intro/overview.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T22:35:57-04:00" 3 | draft = false 4 | title = "Hugo 입문 - 개요" 5 | 6 | tags = ["Blog", "Hugo"] 7 | categories = ["How to"] 8 | series = ["Hugo Introduction"] 9 | authors = ["Jhonghee Park"] 10 | 11 | +++ 12 | 13 | Hugo는 현존하는 가장 빠른 정적 사이트 제너레이터(Static Site Generator)로 알려져 있습니다. 기능적인 측면에서도 여타 동적 사이트 제너레이터(Static Site Generator)에 비해 손색이 없을 뿐더러 설치가 간편하고 Go언어에 친숙한 개발자들에게는 최고의 컨텐츠 제작 환경을 제공한다고 생각합니다. [Golang Korean Community](https://golangkorea.github.io) 사이트도 Hugo로 제작되고 있습니다. **Hugo 입문** 시리즈를 통해 이 사이트에 기여하시고자 하는 분들에게 가이드라인을 제공할 뿐만 아니라 자신만의 블로그 사이트를 쉽게 제작하고자 하는 분들에게도 도움이 되길 기원하는 마음으로 시리즈를 준비했습니다. 14 | 15 | * [Hugo 시작하기](/post/hugo-intro/getting-started/) 16 | * [컨텐츠 제작 기초](/post/hugo-intro/content-basic/) 17 | * [사이트 테마 커스터마이징 하기](/post/hugo-intro/theme-customizing/) 18 | * [분류(Taxonomy)기능 사용하기](/post/hugo-intro/taxonomy-basic/) 19 | * [사이트에 블로그 올리는 방법](/post/hugo-intro/how-to-contribute-content/) 20 | -------------------------------------------------------------------------------- /content/post/hugo-intro/taxonomy-basic.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T23:25:44-04:00" 3 | draft = false 4 | title = "시리즈 #4 - 분류(Taxonomy)기능 사용하기" 5 | 6 | tags = ["Blog", "Hugo"] 7 | categories = ["How to"] 8 | series = ["Hugo Introduction"] 9 | authors = ["Jhonghee Park"] 10 | 11 | toc = true 12 | +++ 13 | 14 | # 분류(Taxonomy)기능 사용하기 15 | 16 | 사이트에 컨텐트가 많아 질 수록 고민이 생깁니다. 비숫한 주제의 컨텐트를 한 곳에 나열해 주는 페이지를 만들수는 없는가? 순진한 저자는 자기가 포스트한 내용을 모두 한 포스트에 링크할 지도 모릅니다. 주제 별로 나열해 주는 포스트를 만들어 새로운 포스트가 올라올 때 마다 링크를 걸어 줄 수도 있겠죠. 손이 많이 가고 더군다나 다른 저자들의 비슷한 포스트는 포함되지 못하는 일도 허다할 겁니다. 17 | 18 | Hugo는 이런 문제를 분류(taxonomy)라는 기능으로 간단히 햬결해 드립니다.1 기본적으로 Hugo에는 `tags`와 `categories`라는 분류변수를 지원합니다. 컨텐트 저자가 할 일은 단지 Front Matter에 명시해 주기만 하면 됩니다. 19 | 20 | ``` 21 | +++ 22 | date = "2016-08-23T23:25:44-04:00" 23 | draft = false 24 | title = "시리즈 #4 - 분류(Taxonomy)기능 사용하기" 25 | 26 | tags = ["Blog", "Hugo"] 27 | categories = ["How-to"] 28 | series = ["Hugo Introduction"] 29 | authors = ["Jhonghee Park"] 30 | 31 | toc = true 32 | +++ 33 | ``` 34 | 예를 들어 `How-to` category의 경우 Hugo는 모든 컨텐트를 스캔하면서 해당 컨텐트들을 `/categories/how-to/index.html`로 나열해 줍니다. 다시 말하면 taxonomy기능이 컨텐트내에 사용되면 taxonomy에 지정된 template을 이용해 Hugo는 모든 taxonomy페이지를 자동으로 만들고 사용된 term과 각 term을 사용한 컨텐트를 나열합니다. 35 | 36 | # Taxonomy 용어 정리 37 | 38 | * **Taxonomy** 같은 카테고리의 컨텐트를 분류하는 방식 (예: tag, category, author 등) 39 | * **Term** taxonomy에 속하는 키워드 (author의 예를 들면 `Jhonghee Park`, `Sangbae Yun`, `Kookheon Kwon`) 40 | * **Value** term이 사용된 컨텐트의 내용 41 | 42 | # Taxonomy Organization 43 | Taxonomy의 관점에서 본 Organization은 다음과 같습니다. 44 | ``` ascii 45 | author <-- Taxonomy 46 | Jhonghee Park <-- Term 47 | ReadMe First <-- Content 48 | 시리즈 #1 - Hugo 시작하기 <-- Content 49 | 시리즈 #2 - 컨텐츠 제작 기초 <-- Content 50 | ... 51 | Sangbae Yun <-- Term 52 | Go언어 시작하기 <-- Content 53 | Golang 프로젝트에 TDD 도입하기 <-- Content 54 | vim-go를 이용한 go 개발 환경 구축 <-- Content 55 | ... 56 | ``` 57 | 58 | 컨텐트의 관점에서 본 Organization은 다음과 같습니다. 59 | ``` ascii 60 | 시리즈 #1 - Hugo 시작하기 <-- Content 61 | author <-- Taxonomy 62 | Jhonghee Park <-- Term 63 | series <-- Taxonomy 64 | Hugo 입문 <-- Term 65 | Go언어 시작하기 <-- Content 66 | author <-- Taxonomy 67 | Sangbae Yun <-- Term 68 | series <-- Taxonomy 69 | Go 시작하기 <-- Term 70 | ``` 71 | 72 | # 분류변수(taxonomies)의 정의 73 | 74 | 분류변수는 사용하기 전에 사이트 configuration에 정의되어야 만 합니다. 단수형과 복수형을 사용해 다음과 같이 정의합니다. 75 | 76 | ``` 77 | [taxonomies] 78 | author = "authors" 79 | category = "categories" 80 | tag = "tags" 81 | series = "series" 82 | ``` 83 | 84 | # 컨텐트에 분류변수 지정하기 85 | 86 | 일단 분류변수가 사이트 레벨에 정의된 후에는 컨텐트 타입과 `section`을 막론하고 어떤 컨텐트에도 사용 가능합니다. Front Matter에 복수형의 taxonomies를 써서 원하는 모든 Term을 나열하면 됩니다. 87 | 88 | # Taxonomy 템플릿 89 | 90 | Hugo는 일정한 규칙에 따라 Taxonomy 리스트 페이지를 만들어 냅니다. 주어진 Term의 모든 Taxonomy Value 리스트는 다음과 같은 URL 형식을 따릅니다. 91 | 92 | ``` 93 | /{{복수형 Taxonomy 이름}}/{{Term}}/ 94 | ``` 95 | 96 | 이때 Term은 다음과 같은 변환을 거칩니다 97 | 98 | * **hyphenated** `How to`는 `/categories/how-to` 99 | * **lower-cased** `Jhonghee Park`는 `/authors/jhonghee-park` 100 | * **normalized** `Gérard Depardieu`는 `/actors/gerard-depardieu`2 101 | 102 | Taxonomy 페이지를 렌더링하기 위해서는 해당 Taxonomy의 템플릿이 필요합니다. 템프릿의 위치는 다음의 규칙을 따릅니다. 103 | 104 | ``` 105 | /layouts/taxonomy/{{단수형 Taxonomy 이름}} 106 | ``` 107 | 108 | Taxonomy, `authors`의 경우, 템플릿은 `/layouts/taxonomy/author.html`에 위치하게 합니다. 109 | 110 | 111 | 112 |
113 |
114 |
115 |
    116 |
  1. Hugo v0.11이전에는 taxonomies를 indexes로 불렀습니다. 그런 이유로 만들어 진지 오래된 테마의 taxonomies 템플릿들은 `layouts/indexes`에 위치 할 수도 있습니다.
  2. 117 |
  3. Special Character를 보존하고자 하면 사이트 Configuraton에 `preserveTaxonomyNames = true`를 지정해야 합니다.
  4. 118 |
119 |
120 |
121 | -------------------------------------------------------------------------------- /content/post/hugo-intro/theme-customizing.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-23T23:25:30-04:00" 3 | draft = false 4 | title = "시리즈 #3 - 사이트 테마 개발하기" 5 | 6 | tags = ["Blog", "Hugo"] 7 | categories = ["How to"] 8 | series = ["Hugo Introduction"] 9 | authors = ["Jhonghee Park"] 10 | 11 | toc = true 12 | +++ 13 | 14 | # 사이트 테마 개발하기 15 | 16 | [시리즈 1](/post/hugo-intro/getting-started) 마지막에 [hugo-octopress](http://themes.gohugo.io/hugo-octopress/) 테마를 사용하여 처음으로 사이트를 구축한 기억을 하실 겁니다. 사이트를 구축하기 전에 Hugo에서 사용할 수 있는 테마가 어떤것 있는지 한번 살펴보고 생각하고 있는 사이트와 잘 맞는 테마를 선택하는 일도 중요합니다. Hugo의 테마 쇼케이스에서 한번 감상하시길 바랍니다. 17 | 18 | * [Hugo 테마 쇼케이스](http://themes.gohugo.io/) 19 | 20 | 자신만의 테마를 개발하기 위한 첫걸음은 남이 개발해 놓은 테마를 사용하는 것에서 부터 시작합니다. 21 | 22 | # 테마 설치하는 법 23 | 테마의 사용법은 대단히 간단합니다. `hugo new site`명령으로 사이트 프로젝트를 초기화하면 `themes` 폴더가 생기는 것을 이미 아실 것입니다. 사용하고자 하는 테마를 선택하고 난 뒤 `themes` 폴더 밑에 다운로드 받은 테마 패키지를 설치해 주면 됩니다. 24 | 25 | **테마의 깃헙주소를 아는 경우** 26 | ``` 27 | $ cd themes 28 | $ git clone https://github.com/parsiya/Hugo-Octopress.git 29 | ``` 30 | 31 | **테마 쇼케이스의 모든 테마를 설치하는 경우** 32 | ``` 33 | $ git clone --recursive https://github.com/spf13/hugoThemes.git themes 34 | ``` 35 | 36 | # 테마 사용법 37 | 테마를 `themes`에 설치하고 난 뒤 다음과 같이 선택한 테마로 사이트를 구축할 수 있습니다. 38 | ``` 39 | $ hugo -t ThemeName 40 | ``` 41 | ThemeName은 `themes` 폴더내 설치된 테마의 디렉토리 이름과 일치하여야 합니다. 42 | 43 | # 테마 커스터마이징 44 | 설치된 테마를 사용하다 보면 맘에 들지 않는 부분이 생기거나 부족한 부분을 발견할 지도 모릅니다. **_어떤 경우가 생기더라도 `themes`밑에 설치된 테마에 속한 파일들을 직접 편집하지 마십시요_**. Hugo는 이러한 경우가 생길때 보충하거나 기존의 템플릿을 오버라이드할 수 있도록 허락합니다. 설치된 테마의 구조를 살펴보시면 힌트를 얻을 수 있습니다. 45 | 46 | ``` 47 | . 48 | └── Hugo-Octopress 49 | ├── LICENSE.md 50 | ├── README.md 51 | ├── images 52 | │   ├── Thumbs.db 53 | │   ├── codecaption1.png 54 | │   ├── screenshot.png 55 | │   └── tn.png 56 | ├── layouts 57 | │   ├── 404.html 58 | │   ├── _default 59 | │   │   ├── list.html 60 | │   │   ├── single.html 61 | │   │   └── terms.html 62 | │   ├── index.html 63 | │   ├── indexes 64 | │   │   ├── category.html 65 | │   │   └── tag.html 66 | │   ├── license 67 | │   │   └── single.html 68 | │   ├── partials 69 | │   │   ├── disqus.html 70 | │   │   ├── footer.html 71 | │   │   ├── header.html 72 | │   │   ├── navigation.html 73 | │   │   ├── octo-header.html 74 | │   │   ├── pagination.html 75 | │   │   ├── post_footer.html 76 | │   │   ├── post_header.html 77 | │   │   └── sidebar.html 78 | │   ├── post 79 | │   │   └── single.html 80 | │   └── shortcodes 81 | │   ├── codecaption.html 82 | │   └── imgcap.html 83 | ├── sample-config.toml 84 | ├── static 85 | │   ├── css 86 | │   │   └── hugo-octopress.css 87 | │   └── favicon.png 88 | └── theme.toml 89 | ``` 90 | 91 | 지금 개발하고 있는 사이트 프로젝트 폴더 밑으로 `layouts`, `static`, `archetypes`가 있듯이 테마도 같은 구조를 가지고 있습니다. 92 | 93 | ## 정적 리소스를 교체하는 법 94 | 테마에 따라온 jQuery버전이 맘에 안 드시나요? 교체하는 법은 기존의 것은 그대로 두고 새로운 jQuery버전을 다운로드 받아 테마에 위치한 장소와 같은 상대적 경로에 배치하면 Hugo는 테마의 jQuery를 사용하지 않고 프로젝트에 배치된 것을 사용해서 사이트를 구축합니다. 95 | 96 | **테마 밑** 97 | ``` 98 | /themes/themename/static/js/jquery.min.js 99 | ``` 100 | 101 | **프로젝트 Root** 102 | ``` 103 | /static/js/jquery.min.js 104 | ``` 105 | 106 | ## 템플릿 교체하는 법 107 | Hugo는 탬플릿을 찾을 때 항상 프로젝트 밑 `layouts`폴더를 먼저 검색하고 없으면 테마의 `layouts`을 찾아봅니다. 이런 Hugo의 특성을 이용하여 테마의 템프렛을 수정해야 할 필요가 생길 때 `layouts`폴더 밑으로 같은 경로와 이름의 템플릿으로 교체하면 됩니다. 108 | 109 | **테마 밑** 110 | ``` 111 | /themes/themename/layouts/_default/single.html 112 | ``` 113 | 114 | **프로젝트 Root** 115 | ``` 116 | /layouts/_default/single.html 117 | ``` 118 | 특히 부분 템플릿(partial template)을 잘 활용한 테마의 경우 이런 교체법은 사이트의 보수유지를 최소화하고 미래에도 호환성을 보장하게 해 주는 장점을 가지고 있습니다. 119 | 120 | ## archetype 교체하는 법 121 | Archetype을 제공하는 테마의 경우 `archetypes`폴더로 교체하고자 하는 archetype 파일을 복사한 다음 필요에 맞게 수정하면 됩니다. 122 | 123 | ## Default 템플릿 사용 주의 124 | `layouts/_default`폴더내의 템플릿들은 테마에 비슷한 파일들을 가리지 않고 교체하는 효과가 있어 사용을 자제해야 합니다. 항상 default 템플릿을 사용하기 보다는 특정한 템플릿 교체가 더 낫다는 사실을 명심하십시요. 125 | 126 | # 새 테마 만들기 127 | 새로 테마를 만들기 위한 명령어는 다음과 같습니다. 128 | ``` 129 | $ hugo new theme golangkorea 130 | ``` 131 | 이 명령은 `themes`폴더 안에 다음과 같이 테마구조를 발생시킵니다. 132 | ``` 133 | golangkorea 134 | ├── LICENSE.md 135 | ├── archetypes 136 | │   └── default.md 137 | ├── layouts 138 | │   ├── 404.html 139 | │   ├── _default 140 | │   │   ├── list.html 141 | │   │   └── single.html 142 | │   ├── index.html 143 | │   └── partials 144 | │   ├── footer.html 145 | │   └── header.html 146 | ├── static 147 | │   ├── css 148 | │   └── js 149 | └── theme.toml 150 | ``` 151 | 템플릿은 Go의 템플릿 언어로 만들어 집니다. [Go template primer](https://gohugo.io/layout/go-templates/)은 Go 템플릿 언어를 숙지하기 위한 좋은 출발점입니다. 152 | 153 | ## 테마 콤퍼넌트 154 | 155 | * **Layouts** 근본적으로 웹사이트는 두가지 형식의 페이지를 통해 컨텐트를 제공합니다: 컨텐트 자체가 하나의 페이지인 경우와 여러 항목을 나열해 놓은 페이지. Hugo의 테마는 이 두가지 페이지를 처리하는 기본(default) 템플릿에서 시작해서 컨텐트 타입(type)과 section을 통해 추가로 layout을 제공하는 템플릿을 준비합니다. 156 | * **Single Content** 기본 템플릿은 `layouts/_default/single.html`에 위치합니다. 157 | * **List of Contents** 기본 템플릿은 `layouts/_default/list.html`에 위치합니다. 158 | * **Partial Templates** 부분 템플릿은 테마 제작에 있어 매우 중요한 요소입니다. 부분 템플릿을 통해 코드 재사용이 가능하고 아주 작은 부분만 교체하거나 삽입할 수 있게 해 주는 메카니즘이어서 테마의 유지보수가 간단해 지고 미래의 호환성을 보장해 줍니다. 159 | * **Static** 테마내 정정 리소스의 구조는 전적으로 개발자에게 달려 있습니다. 보통은 `/css`, `js`, `img`와 같은 폴더를 이용해 정적 자원을 관리합니다. 160 | * **Archetypes** 특정한 컨텐트 타입의 정면 변수를 정의하는 archetype을 테마에 포함시킬 수 있습니다. 자세한 내용은 [Archetype Guideline](https://gohugo.io/content/archetypes/)을 확인할 수 있습니다. 161 | * **Generator meta tag** 테마 개발자들에게 HTML의 ``에 Generator meta tag, `.Hugo.Generator`을 포함시킬 것을 권유합니다. Hugo의 사용과 인기도를 가늠하는데 도움을 줍니다. 162 | 163 |
164 |
165 | -------------------------------------------------------------------------------- /content/post/readme-first.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-19T23:35:49-04:00" 3 | draft = false 4 | title = "ReadMe First" 5 | 6 | tags = ["Community", "Blog", "Hugo"] 7 | categories = ["How to"] 8 | authors = ["Jhonghee Park"] 9 | 10 | +++ 11 | 12 | # The Slow Hunch 13 | 14 | [Where Good Ideas Come From: The Natural History of Innovation](https://www.amazon.com/Where-Good-Ideas-Come-Innovation/dp/1594487715)의 저자 Steven B. Johnson에 따르면 인류의 역사를 바꾼 혁신들은 번뜩이는 아이디어에서 시작된 경우가 매우 드물다고 합니다. 대개는 개개인의 작은 아이디어들이 오랜 시간에 걸쳐 다른 사람이 갖고 있는 비슷하거나 전혀 다른 아이디어들과 충돌하고 결합하면서 커뮤니티의 지능으로 진화하고 어느 순간 돌이킬 수 없는 변화의 모멘텀을 형성하며 세상을 바꿉니다. 커뮤니티내에 공유되고 있는 지능이 다시 역으로 개개인에게 영감과 비젼을 제시하는 상호작용을 일으키게 되는데 그런 과정은 통해 아이디어의 생산을 가능케하는 현상을 slow hunch라고 부릅니다. 15 | 16 | 새로 시작하는 Golang Korean 커뮤니티 웹사이트(이하 GoSudaWeb)은 프로그래밍 언어인 Go와 퉅들, 글로벌 개발자 커뮤니티내의 트랜드와 최선의 개발방식에 대한 소개를 블로그와 뉴스레터의 형식을 통해 공유하고자 첫발을 내딛었습니다. 지속적인 지식의 축적과 폭 넗은 공유가 이루어지는 웹사이트로 성장하여 미래의 킬러앱과 킬러 아이디어를 만들어내는 slow hunch에 기여할 수 있기를 기대해 봅니다. 많은 성원 부탁드립니다. 17 | 18 | # 콘텐트 제작 및 웹사이트 개발 참여 신청 19 | 20 | GosudaWeb은 [Github Page](https://pages.github.com/)로 제작되고 모든 소스와 제작과정이 공개로 이루어 집니다: [https://github.com/golangkorea](https://github.com/golangkorea). 21 | 22 | 사이트에 포스트하기를 원하시는 분들은 [사이트에 블로그 올리는 방법](/post/hugo-intro/how-to-contribute-content/)을 참조하시길 바랍니다. 23 | 24 | Hugo를 이용해 사이트 개발에 참여하거나 golangkorea Organization에 오픈소스 프로젝트를 시작하시고 싶으신 분들은 멤버 신청을 하실 수 있습니다. 멤버 신청은 [golanginkorea@gmail.com](mailto:golanginkorea@gmail.com) 이나 [Golang Korean Community / Lobby](https://gitter.im/golang-korean-community/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)로 해 주시면 됩니다. 일단 멤버로 등록되면 [golangkorea-website team](https://github.com/orgs/golangkorea/teams/golangkorea-website)을 통해 개발에 참여하실 수 있습니다. 25 | 26 | # 토론방 27 | [golangkorea.github.io](https://golangkorea.github.io) 개발, 유지 보수 및 지원에 대한 토론은 [Gitter Room](https://gitter.im/golang-korean-community/golangkorea.github.io?utm_source=share-link&utm_medium=link&utm_campaign=share-link)을 통해 하고 있으니 많은 동참 바라겠습니다. 28 | 29 |
30 |
31 | -------------------------------------------------------------------------------- /content/post/structuring-applications-in-go.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Go에서 애플리케이션 설계하기" 3 | tags = [ 4 | "번역", "아키텍쳐", 5 | ] 6 | categories = [ 7 | "번역", "아키텍처", 8 | ] 9 | authors = [ 10 | "mingrammer", 11 | ] 12 | draft = false 13 | toc = false 14 | date = "2016-10-10T21:11:16+09:00" 15 | 16 | +++ 17 | 18 | > [Structuring Applications in Go](https://medium.com/@benbjohnson/structuring-applications-in-go-3b04be4ff091#.rannpkamk)을 번역한 글입니다. 19 | 20 | ## 개요 21 | 22 | Go를 배울 때 가장 어려웠던 부분은 애플리케이션을 어떻게 설계하는가였다. Go 이전에, 나는 Rails 애플리케이션을 만들었었는데 Rails는 애플리케이션을 특정한 방식으로 설계하도록 한다. "설정보다는 컨벤션"이라는게 그들의 모토였다. 그러나 Go는 그 어떤 프로젝트 구조나 애플리케이션 설계방식을 규정짓고 있지 않으며 Go의 컨벤션은 대개 제각각이다. 23 | 24 | 나는 Go 애플리케이션의 아키텍쳐를 구성하면서 발견한 정말 많은 도움이 되었던 4가지 패턴을 여러분에게 알려주려고한다. 이들은 공식적인 규칙은 아니며 누군가는 다른 의견을 가질 수 있다고 생각한다. 나는 그런 의견들을 듣고싶다! 제안할만한게 있다면 댓글로 달아줬으면 좋겠다. 25 | 26 | ## 1. 전역 변수를 사용하지 말라 27 | 28 | 내가 읽었던 Go의 net/http 예시들은 다음과 같이 항상 함수들을 [http.HandleFunc](https://golang.org/pkg/net/http/#HandleFunc)를 사용하여 등록한다. 29 | 30 | ```go 31 | package main 32 | 33 | import ( 34 | "fmt" 35 | "net/http" 36 | ) 37 | 38 | func main() { 39 | http.HandleFunc("/hello", hello) 40 | http.ListenAndServe(":8080", nil) 41 | } 42 | 43 | func hello(w http.ResponseWriter, r *http.Request) { 44 | fmt.Fprintf(w, "hi!") 45 | } 46 | ``` 47 | 48 | 이 예제는 net/http를 사용하기 위한 쉬운 방법을 제공하지만 이는 나쁜 습관을 가르친다. 함수 핸들러를 사용하게되면, 애플리케이션 상태에 접근하는 유일한 방법은 전역 변수를 사용하는 것이다. 이 때문에, 우리는 전역 데이터베이스 커넥션 또는 전역 설정 변수를 추가할수도 있다. 그러나 유닛 테스트를 작성할 때 이 글로벌 변수들을 사용한다는건 악몽이다. 49 | 50 | 더 나은 방법은 핸들러에 대해 특정한 타입을 만들어 필요한 변수들을 가질 수 있게 만드는 것이다. 51 | 52 | ```go 53 | type HelloHandler struct { 54 | db *sql.DB 55 | } 56 | 57 | func (h *HelloHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 58 | var name string 59 | 60 | // 쿼리 실행. 61 | row := h.db.QueryRow("SELECT myname FROM mytable") 62 | if err := row.Scan(&name); err != nil { 63 | http.Error(w, err.Error(), 500) 64 | return 65 | } 66 | 67 | // 클라이언트에 전송. 68 | fmt.Fprintf(w, "hi %s\n", name) 69 | } 70 | ``` 71 | 72 | 이제 우리는 데이터베이스를 초기화할 수 있으며 글로벌 변수 없이 핸들러를 등록할 수 있다. 73 | 74 | ```go 75 | func main() { 76 | // 데이터베이스 커넥션을 연다. 77 | db, err := sql.Open("postgres", "...") 78 | if err != nil { 79 | log.Fatal(err) 80 | } 81 | 82 | // 핸들러 등록. 83 | http.Handle("/hello", &HelloHandler{db: db} 84 | http.ListenAndServe(":8080", nil) 85 | } 86 | ``` 87 | 이 접근법은 또한 핸들러 유닛 테스팅을 자체적으로 할 수 있다는 이점을 가지며 심지어 HTTP 서버도 필요하지않다. 88 | 89 | ```go 90 | func TestHelloHandler_ServeHTTP(t *testing.T) { 91 | // 커넥션을 열고 핸들러를 설정한다. 92 | db, _ := sql.Open("postgres", "...") 93 | defer db.Close() 94 | h := HelloHandler{db: db} 95 | 96 | // 간단한 버퍼를 가지고 핸들러를 실행. 97 | rec := httptest.NewRecorder() 98 | rec.Body = bytes.NewBuffer() 99 | 100 | } 101 | ``` 102 | 103 | ***UPDATE:*** Tomás Senart와 Peter Bourgon의 [트위터 멘션](https://twitter.com/tsenart/status/485920561391239168)에서 언급된 [클로저를 사용한 핸들러 래핑](https://gist.github.com/tsenart/5fc18c659814c078378d)으로 이를 좀 더 간단히 할 수 있다. 이는 핸들러를 쉽게 구성할 수 있게 해준다. 104 | 105 |
106 | 107 | ## 2. 애플리케이션에서 바이너리를 분리하라 108 | 109 | 나는 누군가 "go get"을 실행하면 내 애플리케이션이 자동으로 설치될 수 있도록 *main.go* 파일을 프로젝트 루트에 넣어 사용한다. 그러나, *main.go* 파일과 애플리케이션 로직을 같은 패키지로 합치게되면 다음의 두 가지 결과를 갖게된다. 110 | 111 | 1. 애플리케이션을 라이브러리로써 재사용할 수가 없다. 112 | 2. 오직 하나의 애플리케이션 바이너리만을 가질 수 있다. 113 | 114 | 이 문제를 해결하기위해 발견한 가장 좋은 방법은 단순히 프로젝트내에서 각 서브 디렉토리가 하나의 애플리케이션 바이너리인 *"cmd"* 디렉토리를 사용하는 것이다. 나는 이 접근법을 여러 개의 애플리케이션 바이너리를 사용하는 Brad Fitzpatrick의 [Camilstore](https://camlistore.org/) 프로젝트에서 처음으로 발견했다. 115 | 116 | ``` 117 | camlistore/ 118 | cmd/ 119 | camget/ 120 | main.go 121 | cammount/ 122 | main.go 123 | camput/ 124 | main.go 125 | camtool/ 126 | main.go 127 | ``` 128 | 129 | Camilstore가 설치될 때 빌드되는 4개의 분리된 애플리케이션 바이너리(camget, cammount, camput, camtool)가 있다. 130 | 131 | ### 라이브러리 주도 개발 (Library driven development) 132 | 133 | *main.go* 파일을 루트 밖으로 옮기는 것은 애플리케이션을 라이브러리의 관점에서 구현할 수 있게 해준다. 애플리케이션 바이너리는 단순히 애플리케이션 라이브러리의 클라이언트이다. 나는 이것이 나의 핵심 로직 코드(라이브러리)가 무엇이고 애플리케이션 실행 코드(애플리케이션 바이너리)가 무엇인지에 대한 추상화를 명확히 하도록 도와준다는걸 알 수 있다. 134 | 135 | 애플리케이션 바이너리는 정말 단순히 사용자가 로직과 상호작용하는 방식에 대한 인터페이스이다. 때때로 당신은 유저가 여러 방법으로 상호작용할 수 있도록 여러개의 바이너리를 생성한다. 예를 들어, 두 수를 더하는 "adder"라는 패키지가 있을 때, 커맨드 라인 버전뿐만 아니라 웹 버전을 배포하고 싶을 수도 있다. 프로젝트를 다음과 같이 구성하면 이를 쉽게 만들 수 있다. 136 | 137 | ``` 138 | adder/ 139 | adder.go 140 | cmd/ 141 | adder/ 142 | main.go 143 | adder-server/ 144 | main.go 145 | ``` 146 | 147 | 유저는 생략 부호("...")를 사용하여 "go get"으로 "adder" 애플리케이션 바이너리를 설치할 수 있다. 148 | 149 | ``` 150 | $ go get github.com/benbjohnson/adder/... 151 | ``` 152 | 짜잔, 사용자는 설치된 *"adder"* 와 *"adder-server"* 를 갖게되었다! 153 | 154 |
155 | 156 | ## 3. 애플리케이션별 컨텍스트를 위한 타입 래핑 157 | 158 | 내가 발견한 특히 유용한 한 트릭은 애플리케이션 수준의 컨텍스트를 제공하기위해 몇가지 제너릭 타입을 래핑하는 것이다. 한 가지 훌륭한 예는 DB와 Tx (transaction) 타입을 래핑하는것이다. 이 타입들은 database/sql 패키지나 [Bolt](https://github.com/boltdb/bolt)같은 다른 데이터베이스 라이브러리에서 찾을 수 있다. 159 | 160 | 우리는 이 타입들을 다음과 같이 래핑하면서 시작할 수 있다: 161 | 162 | ```go 163 | package myapp 164 | 165 | import ( 166 | "database/sql" 167 | ) 168 | 169 | type DB struct { 170 | *sql.DB 171 | } 172 | 173 | type Tx struct { 174 | *sql.Tx 175 | } 176 | ``` 177 | 이제 우리의 데이터베이스와 트랜젝션을 위해 초기화 함수를 래핑하자: 178 | 179 | ```go 180 | // Open은 데이터 소스를 위한 DB 레퍼런스를 반환한다. 181 | func Open(dataSourceName string) (*DB, error) { 182 | db, err := sql.Open("postgres", dataSourceName) 183 | if err != nil { 184 | return nil, err 185 | } 186 | return &DB{db}, nil 187 | } 188 | 189 | // Begin은 새로운 트랜젝션을 반환하기 시작한다. 190 | func (db *DB) Begin() (*Tx, error) { 191 | tx, err := db.DB.Begin() 192 | if err != nil { 193 | reutnr nil, err 194 | } 195 | return &Tx{tx}, nil 196 | } 197 | ``` 198 | 199 | 예를 들어, 만약 사용자가 생성하기 전에 다른 시스템에 대한 검증이 필요하다거나 다른 테이블들의 업데이트가 필요할 때 이 함수는 더 복잡한 일을 할 수 있다. 200 | 201 | ### 트랜잭션 구성 202 | 203 | 이 함수들을 *Tx* 에 추가하는 것의 또 다른 이점은 하나의 트랜잭션에서 여러개의 액션을 구성할 수있다는 것이다. 사용자를 추가해야 하는가? 그냥 *Tx.CreateUser()* 를 한 번 호출하면 된다: 204 | 205 | ```go 206 | tx, _ := db.Begin() 207 | tx.CreateUser(&User{Name:"susy"}) 208 | tx.Commit() 209 | ``` 210 | 기본 데이터 스토어를 추상화 하는것은 새 데이터베이스로 교환하거나 다수의 데이터베이스의 사용을 쉽게 만들어준다. 그들은 애플리케이션의 *DB & Tx* 타입을 호출하는 코드로부터 모두 감춰져있다. 211 | 212 |
213 | 214 | ## 4. 서브패키지로 골머리를 앓지 말라 215 | 216 | 대다수의 언어는 패키지 구조를 원하는대로 구성할 수 있도록 한다. 나는 모든 클래스들이 다른 패키지에 채워지고 이 패키지들은 서로를 모두 포함하고 있는 Java 코드베이스를 가지고 근무했던적이 있다. 정말 엉망이었다! 217 | 218 | Go는 패키지를 위한 요구조건이 딱 한가지 있는데, 순환 의존(cyclic dependencies)을 가질 수 없다는 것이다. 처음엔 이 순환 의존 규칙이 조금 이상하게 느껴졌다. 나는 원래 프로젝트를 각 파일은 하나의 타입을 가지고 패키지에는 파일들이 여러개 있도록 구성하며 새로운 서브패키지를 만들려고 했었다. 그러나 이 서브패키지들은 패키지 "A"를 포함하는 패키지 "C"를 포함하는 패키지 "B"를 포함하는 패키지 "A"를 찾을 수 없었기에 점점 관리하기가 어려워졌다. 이는 순환 의존이 될 것이다. 나는 "너무 많은 파일들"을 갖게 되는것에 대해서는 제외하고 패키지들을 분리시킬만한 이유가 없다는 걸 깨달았다. 219 | 220 | 최근 나는 오직 하나의 루트 패키지를 사용하는 방법을 택했다. 보통 내 프로젝트의 타입들은 모두 매우 연관이 많기 때문에 이는 사용성이나 API 관점에서 더 잘 맞았다. 이 타입들은 또한 API를 작고 명확하게 유지하는 사이에 노출되지 않은것들을 호출하는 장점을 가질 수 있다. 221 | 222 | 223 | 여기에 내가 찾아낸 큰 패키지를 만드는데 도움이 되는 몇가지 팁이 있다. 224 | 225 | 1. 각 파일에 관련있는 타입과 코드를 함께 그룹핑하라. 타입과 함수들이 잘 구성되어 있다면 그 파일은 200에서 500줄의 소스코드를 가지는 경향이 있다는걸 발견했다. 이는 많은 것처럼 들릴 수도 있지만 이는 탐색하기가 쉽다는걸 알아냈다. 나의 경우 보통 한 파일의 대한 상한은 1000줄이다. 226 | 2. 가장 중요한 타입은 파일의 맨 위에 놓고 밑으로 갈수록 중요성이 낮아지는 순서대로 타입을 추가하라. 227 | 3. 애플리케이션이 10,000라인을 넘어가기 시작하면 이 프로젝트를 더 작은 프로젝트들로 나눌 순 없는지를 심각하게 고민해보라. 228 | 229 | [Bolt](https://github.com/boltdb/bolt)는 이에 대한 좋은 예제이다. 각 파일은 하나의 Bolt 구조체와 관련 있는 타입들로 그룹핑된다: 230 | 231 | ``` 232 | bucket.go 233 | cursor.go 234 | db.go 235 | freelist.go 236 | node.go 237 | page.go 238 | tx.go 239 | ``` 240 | 241 |
242 | 243 | ## 결론 244 | 245 | 코드 구성은 소프트웨어 개발에 있어 가장 어려운 주제중 하나이며 이것이 가져오는 가치에 초점을 맞추는 일은 드물다. 전역 변수를 적게 사용하고, 애플리케이션 바이너리 코드를 패키지로 옮기고, 애플리케이션별 컨텍스트를 위해 타입을 래핑하고, 서브패키지는 제한하라. 이들은 단지 Go 코드를 쉽게 작성하고 더 나은 유지보수가 가능하도록 도와주는 몇가지 트릭들이다. 246 | 247 | Go 프로젝트를 Ruby, Java 또는 Node.js 프로젝트와 같은 방식으로 작성하게되면 아마 언어와 싸우게 될 것이다. 248 | -------------------------------------------------------------------------------- /content/post/vim-go.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-08-22T22:57:14+09:00" 3 | draft = false 4 | title = "vim-go를 이용한 go 개발 환경 구축" 5 | tags = ["Development", "vim"] 6 | categories = ["Development", "vim"] 7 | authors = ["Sangbae Yun"] 8 | +++ 9 | ## Vim 10 | **Vim**은 Emacs와 함께 (적어도 리눅스에서는) 가장 널리 사용하는 에디터일 것이다. 가볍고 빠르며, 어디에서나 실행되기 때문에 그 단순함에도 불구하고 여전히 사랑받고 있다. GUI 환경에서 사용하는 IDE에 익숙한 개발자라면 "요즘 같은 시대에 왠 구닥다리 터미널 기반 에디터냐"라고 생각할 지도 모르겠다. 아래 그래프를 보자. 11 | 12 | ![Go 에디터 사용율](https://i.redditmedia.com/Zemj1bdTRcBwW8bF_UFEVSNZ9S1VrS4tsD4HC1b9jeI.jpg?w=844&s=1fbbaa5fe7f8ba1ba0942191327ffd70) 13 | 14 | Go언어를 대상으로 조사한 결과인데, Vim이 거의 40% 정도를 차지하고 있다. Emacs까지 하면 터미널 기반 에디터를 사용하는 개발자가 절반이 넘는다. 물론 Go 언어가 시스템과 네트워크 분야의 백앤드 프로그램의 개발에 특화된 측면을 고려해야 겠지만 말이다. 15 | 16 | ## Vim-go 17 | Vim은 다양한 플러그인을 제공한다. **Vim-go**는 Go 개발환경을 지원하는 플러그인이다. 지원하는 기능은 아래와 같다. 18 | 19 | * 함수, 오퍼레이터, 메서드들에 대한 Syntax highlighting 20 | * **gocode**를 이용한 자동완성 21 | * **:GoDef**를 이용해서 메서드, 변수들의 선언 위치를 네비게이션 할 수 있다. 22 | * **:GoImport**를 이용한 패키지 임포트 23 | * **:GoTest**와 **:GoTestFunc**를 이용한 유닛 테스트 24 | * 테스트 커버리지를 위한 **:GoCoverage** 25 | * **:GoBuild**, **:GoInstall**을 이용한 패키지 컴파일과 설치 26 | * **:GoRun**을 이용한 빠른 실행 27 | * 소스 분석을 위한 **:GoImplements**, **:GoCallee**, **:GoReferrer** 28 | * Lint툴 **:GoLint** 29 | * **:GoPlay**로 코드를 [play.golang.org](https://play.golang.org) 로 공유 30 | 등 개발 환경을 만들기 위한 거의 모든 기능들을 제공한다. 여기에 파일 네비게이션 플러그인, 자동완성 플러그인들을 추가로 설치하면, IDE 부럽지 않은 개발 환경을 만들 수 있다. 31 | 32 | ## Vim-go 설치 33 | Vim의 플러그인들을 편리하게 관리하기 위해서 몇 가지 패키지 매니저들이 있다. 보통 Vundle 이나 **pathogen**을 사용한다. 나는 pathogen을 사용하고 있다. 아래와 같이 설치하자. 34 | ```sh 35 | # mkdir -p ~/.vim/autoload ~ 36 | /.vim/bundle 37 | # cd ~/.vim/autoload 38 | # curl -LSso pathogen.vim https://tpo.pe/pathogen.vim 39 | ``` 40 | 41 | .vimrc 파일을 수정한다. 42 | ```sh 43 | cat ~/.vimrc 44 | execute pathogen#infect() 45 | syntax on 46 | filetype plugin indent on 47 | ``` 48 | 49 | 이제 vim-go를 설치하자. 50 | ```sh 51 | # cd ~/.vim/bundle 52 | # git clone https://github.com/fatih/vim-go.git 53 | ``` 54 | 55 | Go 개발을 위한 환경 설정은 다음과 같다. 56 | ```sh 57 | # export GOPATH=$HOME/golang 58 | # export PATH=$PATH:$GOPATH/bin 59 | # mkdir $HOME/golang 60 | # echo $GOPATH 61 | /home/yundream/golang 62 | # echo $PATH 63 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/yundream/golang/bin.... 64 | ``` 65 | 66 | vim-go 프로젝트는 구글의 mercurial에서 관리하고 있다. mercurial도 설치해야 vim-go를 빌드 할 수 있다. 67 | ``` 68 | # apt-get install mercurial 69 | ``` 70 | 71 | vim을 실행 한후 명령모드에서 **:GoInstallBinaries**를 수행하면, 자동으로 vim-go를 빌드해서 설치해준다. 72 | ``` 73 | # vim 74 | ~ 75 | ~ 76 | :GoInstallBinaries 77 | vim-go: gocode not found. Installing github.com/nsf/gocode to folder /home/yundream/.vim-go/ 78 | vim-go: goimports not found. Installing code.google.com/p/go.tools/cmd/goimports to folder /home/yundream/.vim-go/ 79 | vim-go: godef not found. Installing code.google.com/p/rog-go/exp/cmd/godef to folder /home/yundream/.vim-go/ 80 | vim-go: oracle not found. Installing code.google.com/p/go.tools/cmd/oracle to folder /home/yundream/.vim-go/ 81 | vim-go: golint not found. Installing github.com/golang/lint/golint to folder /home/yundream/.vim-go/ 82 | vim-go: errcheck not found. Installing github.com/kisielk/errcheck to folder /home/yundream/.vim-go/ 83 | vim-go: gotags not found. Installing github.com/jstemmer/gotags to folder /home/yundream/.vim-go/ 84 | 계속하려면 엔터 혹은 명령을 입력하십시오 85 | ``` 86 | ## Vim-go 기능 빠르게 살펴보기 87 | Go 코드의 실행 88 | ``` 89 | :GoRun 90 | ``` 91 | 92 | 빌드 93 | ``` 94 | :make 95 | :GoBuild 96 | ``` 97 | 98 | 에러체크 99 | ``` 100 | :GoErrCheck 101 | ``` 102 | 103 | 패키지 임포트 104 | ``` 105 | :GoImport fmt 106 | ``` 107 | 108 | 심볼에 대한 정의로 이동. 해동 심볼에서 :GoDef 109 | ``` 110 | :GoDef 111 | ``` 112 | 113 | 대략 이런 식이다. 나머지 명령들은 직접 실행해 보자. 114 | 115 | ## 자동완성 116 | 자동완성은 IDE의 가장 쓸만한 기능 중 하나일 것이다. vim의 **YCM(YouCompleteMe)**를 이용해서 자동완성 기능을 추가 할 수 있다. 컴파일을 하기 때문에 python-dev와 cmake 패키지를 미리 설치해야 한다. 117 | ```sh 118 | # cd ~/.vim/bundle 119 | # git clone https://github.com/Valloric/YouCompleteMe.git 120 | # cd YouCompleteMe 121 | # ./install.sh 122 | ``` 123 | 124 | 이제 자동완성 기능을 사용 할 수 있다. 아래 화면을 보자. 125 | 126 | ![YCM 자동완성](https://lh5.googleusercontent.com/-n9eUbylZw50/U_C_wglq1aI/AAAAAAAAEQI/IsIWi6MYrdc/s640/golang-2.png) 127 | 128 | YCM은 C, C++, Python, Java 등에도 사용 할 수 있다. 129 | ## TagBar 설치 130 | ctags는 코드에 포함된 패키지, struct, 메서드의 목록을 한눈에 보여주는 애플리케이션이다. ctags를 설치하자. tagbar는 ctags를 기반으로 작동하는 플러그인이다. 131 | ```sh 132 | # apt-get install ctags 133 | ``` 134 | 135 | tagbar 플러그인을 설치한다. 136 | ```sh 137 | # cd ~/.vim/bundle 138 | # git clone https://github.com/majutsushi/tagbar.git 139 | ``` 140 | 이제 **:TagbarToggle** 명령으로 tagbar 네비게이션 창을 열고 닫을 수 있다. 141 | 142 | ![TagBar 적용](https://lh5.googleusercontent.com/-xO-ZcWBjqfQ/U_NybrcP-FI/AAAAAAAAEQ8/VjcKCUsrIE0/s640/golang-3.png) 143 | 144 | 명령어를 입력하기 귀찮다면, 단축 키를 만들자. 145 | ```sh 146 | # cat .vimrc 147 | ...... 148 | map :TagbarToggle 149 | ``` 150 | 151 | ## NerdTree 설치 152 | NerdTree는 파일 네비게이션을 만들어주는 플러그인다. 153 | ```sh 154 | # cd ~/.vim/bundle 155 | # git clone https://github.com/scrooloose/nerdtree.git 156 | ``` 157 | 158 | NerdTree와 TagBar를 적용한 화면이다. 159 | 160 | ![NerdTree와 TagBar 적용](https://lh6.googleusercontent.com/-yfhTJc0-xMc/U_N0PxZXmEI/AAAAAAAAERE/2n5LUOmtQGw/s640/golang-4.png) 161 | 162 | 명령을 일일이 입력하기가 귀찮아서 단축키를 등록했다. 163 | ```sh 164 | # cat ~/.vimrc 165 | set ts=4 166 | 167 | map :NERDTreeToggle 168 | map :GoDef 169 | map :TagbarToggle 170 | ``` 171 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo -e "\033[0;32mDeploying updates to GitHub...\033[0m" 4 | 5 | # Build the project. 6 | hugo -t Hugo-Octopress # if using a theme, replace by `hugo -t ` 7 | 8 | # Go To Public folder 9 | cd public 10 | # Add changes to git. 11 | git add -A 12 | 13 | # Commit changes. 14 | msg="rebuilding site `date`" 15 | if [ $# -eq 1 ] 16 | then msg="$1" 17 | fi 18 | git commit -m "$msg" 19 | 20 | # Push source and build repos. 21 | git push origin master 22 | 23 | # Come Back 24 | cd .. 25 | -------------------------------------------------------------------------------- /googlebeb514f8cbcb8c46.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googlebeb514f8cbcb8c46.html -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "header.html" . }} 5 | 6 |
7 |
8 |
9 |
10 |
11 |

{{ .Title }}

12 | 13 |
14 | 15 |
16 |
17 |
18 | 19 | {{ partial "sidebar.html" . }} 20 |
21 |
22 | 23 | 39 | 40 | 41 | {{ partial "footer.html" . }} 42 | -------------------------------------------------------------------------------- /layouts/author/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 |
4 |
5 |
6 |
7 | 8 | {{ .Scratch.Set "isHome" false }} 9 | {{ partial "post_header.html" . }} 10 | 11 |
12 | 13 | {{ $.Scratch.Set "pagetoc" .TableOfContents }} 14 | {{ if or (and (isset .Params "toc") (eq .Params.toc true)) (and (not (isset .Params "toc")) (eq .Site.Params.tableOfContents true)) }} 15 | {{ $.Scratch.Get "pagetoc" }} 16 | {{ end }} 17 | {{ .Content }} 18 |
19 | {{ partial "post_footer.html" . }} 20 |
21 |
22 | {{ partial "sidebar.html" . }} 23 |
24 |
25 | 26 | {{ partial "footer.html" . }} 27 | -------------------------------------------------------------------------------- /layouts/partials/header.custom.css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /layouts/partials/header.custom.javascript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ if not .Site.Params.disableGoogleFonts }} 13 | 14 | 15 | 16 | {{ end }} 17 | 18 | 19 | {{ .Title }} 20 | 21 | 22 | 23 | 24 | 25 | 26 | {{ range .Site.Params.customCSS }} 27 | 28 | {{ end }} 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {{ $siteTitle := .Site.Title }} 38 | {{ $authorName := .Site.Author.name }} 39 | 40 | {{ with .RSSLink }}{{ end }} 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | {{ .Hugo.Generator }} 49 | 50 | 51 | {{ template "_internal/google_analytics_async.html" . }} 52 | 53 | 54 | {{ partial "header.custom.css.html" . }} 55 | {{ partial "header.custom.javascript.html" . }} 56 | 57 | 58 | 59 | 60 | 61 | 62 |
{{ partial "octo-header.html" . }}
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /layouts/partials/navigation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 |
    16 | {{ if or .Site.Params.rss .Site.Params.textrss }} 17 | {{ if .Site.Params.rss }} 18 | 19 | {{ else }} 20 |
  • RSS
  • 21 | {{ end }} 22 | {{ end }} 23 | 24 |
25 | 26 | {{ if isset .Site.Params "searchEngineURL" }} 27 |
28 |
29 | 30 | 31 |
32 |
33 | {{end}} 34 | 35 | 46 |
47 |
48 | 49 |
50 |
51 | -------------------------------------------------------------------------------- /layouts/partials/post_footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

5 | 10 | 11 | 12 | {{ if isset .Params "tags" }} 13 | 14 | Tags: 15 | 16 | {{ range .Params.tags }}{{ . }} {{ end }} 17 | {{ end }} 18 | 19 | {{ if .IsPage }} 20 | 21 | Edit in GitHub 22 | 23 | {{ end }} 24 |

25 | 26 | 27 | 28 | 29 | 35 | 36 |

37 | {{ with .PrevInSection }} 38 | {{ .LinkTitle }} 39 | {{ end }} 40 | 41 | {{ with .NextInSection }} 42 | {{ .LinkTitle }} 43 | {{ end }} 44 |

45 | {{ if isset .Site.Params "disqusShortname" }} 46 | {{ if not (eq .Params.comments false) }} 47 | {{ partial "disqus.html" . }} 48 | {{ end }} 49 | {{ end }} 50 |
51 | -------------------------------------------------------------------------------- /layouts/partials/post_header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

5 | {{ if ($.Scratch.Get "isHome") }}{{ .Title }}{{ else }} {{ .Title }} {{ end }} 6 |

7 |

{{ .Date.Format "Jan 2, 2006" }} 8 | {{ if not .Site.Params.disableReadingTime }} - {{ .ReadingTime }} minute read {{ end }} 9 | {{ if .Site.Params.disqusShortname }} - Comments{{ end }} 10 | 11 | {{ if isset .Params "categories" }} 12 | 13 | 15 | - {{ range .Params.categories }}{{ . }}{{ end }} 16 | {{ end }} 17 |

18 |

{{ with .Params.authors }}Posted by {{ end }} 19 | {{ range .Params.authors }} 20 | {{ . }} 21 | {{ end }} 22 |

23 |

24 |

    25 | {{ range .Params.series }} 26 |
  • Series: {{ . }}
  • 27 | {{ end }} 28 |
29 |

30 |
31 | -------------------------------------------------------------------------------- /layouts/partials/sidebar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 86 | 87 | 102 | -------------------------------------------------------------------------------- /layouts/taxonomy/author.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "header.html" . }} 5 | 6 |
7 |
8 |
9 |
10 |
11 |

12 | Author: {{ .Title }} 13 |

14 |
15 |
16 | {{ range .Data.Pages }} 17 |

18 | {{ .Date | dateFormat "2006"}} 19 |

20 |
21 |

22 | {{ .Title }} 23 |

24 | 28 |
29 | 30 | tags: 31 | {{ if isset .Params "categories" }} 32 | {{ range .Params.tags }} {{ . }}{{ end }} 33 | {{ end }} 34 | 35 |
36 |
37 | {{ end }} 38 |
39 |
40 |
41 | 42 | {{ partial "sidebar.html" . }} 43 |
44 |
45 | 46 | {{ partial "footer.html" . }} -------------------------------------------------------------------------------- /layouts/taxonomy/series.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "header.html" . }} 5 | 6 |
7 |
8 |
9 |
10 |
11 |

12 | {{ .Data.Singular | title }}: {{ .Title }} 13 |

14 |
15 |
16 | {{ range .Data.Pages }} 17 |

18 | {{ .Date | dateFormat "2006"}} 19 |

20 |
21 |

22 | {{ .Title }} 23 |

24 | 28 |
29 | 30 | tags: 31 | {{ if isset .Params "categories" }} 32 | {{ range .Params.tags }} {{ . }}{{ end }} 33 | {{ end }} 34 | 35 |
36 |
37 | {{ end }} 38 |
39 |
40 |
41 | 42 | {{ partial "sidebar.html" . }} 43 |
44 |
45 | 46 | {{ partial "footer.html" . }} -------------------------------------------------------------------------------- /static/.keepme: -------------------------------------------------------------------------------- 1 | keepme -------------------------------------------------------------------------------- /static/css/custom-font.css: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | div, 4 | span, 5 | applet, 6 | object, 7 | iframe, 8 | h1, 9 | h2, 10 | h3, 11 | h4, 12 | h5, 13 | h6, 14 | p, 15 | blockquote, 16 | pre, 17 | a, 18 | abbr, 19 | acronym, 20 | address, 21 | big, 22 | cite, 23 | code, 24 | del, 25 | dfn, 26 | em, 27 | img, 28 | ins, 29 | kbd, 30 | q, 31 | s, 32 | samp, 33 | small, 34 | strike, 35 | strong, 36 | sub, 37 | sup, 38 | tt, 39 | var, 40 | b, 41 | u, 42 | i, 43 | center, 44 | dl, 45 | dt, 46 | dd, 47 | ol, 48 | ul, 49 | li, 50 | fieldset, 51 | form, 52 | label, 53 | legend, 54 | table, 55 | caption, 56 | tbody, 57 | tfoot, 58 | thead, 59 | tr, 60 | th, 61 | td, 62 | article, 63 | aside, 64 | canvas, 65 | details, 66 | embed, 67 | figure, 68 | figcaption, 69 | footer, 70 | header, 71 | hgroup, 72 | menu, 73 | nav, 74 | output, 75 | ruby, 76 | section, 77 | summary, 78 | time, 79 | mark, 80 | audio, 81 | video { 82 | font-family: "Nanum Gothic","PT Serif",Georgia,Times,"Times New Roman",serif; 83 | } 84 | 85 | code { 86 | font-family: "Nanum Gothic Coding"; 87 | } -------------------------------------------------------------------------------- /static/css/custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS overrides 3 | */ 4 | 5 | article header { 6 | padding-top: 4em; /* mobile fix 2em -> 4em */ 7 | } 8 | 9 | @media only screen and (min-width: 992px) { 10 | body>nav form { 11 | width: 250px; /* search fix */ 12 | } 13 | } 14 | 15 | .gsc-search-box td { 16 | border-left: 0px !important; 17 | } 18 | 19 | form.gsc-search-box { 20 | padding: 0px 0px 0px 0px !important; 21 | margin-bottom: 0px !important; 22 | } 23 | 24 | .gsc-control-cse { 25 | padding: 0px !important; 26 | background: inherit !important; 27 | border: 0px !important; 28 | } 29 | 30 | .gsc-results-wrapper-overlay table, th, td { 31 | border-left: 0px !important; 32 | } 33 | 34 | /** 35 | * Series 36 | */ 37 | header ul#series { 38 | padding-top: 20px; 39 | } 40 | 41 | /** 42 | * ascii 43 | */ 44 | .language-ascii { 45 | font-family: monospace; 46 | } 47 | 48 | /** 49 | * jQcloud 50 | */ 51 | 52 | .jqcloud { 53 | margin: 0 auto; 54 | } 55 | 56 | 57 | /** 58 | * edit-in-github 59 | */ 60 | .separator, 61 | article>footer .edit-in-github:before { 62 | content: "\2022 "; 63 | padding: 0 .4em 0 .2em; 64 | display: inline-block 65 | } 66 | -------------------------------------------------------------------------------- /static/js/highlight/styles/agate.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Agate by Taufik Nurrohman 3 | * ---------------------------------------------------- 4 | * 5 | * #ade5fc 6 | * #a2fca2 7 | * #c6b4f0 8 | * #d36363 9 | * #fcc28c 10 | * #fc9b9b 11 | * #ffa 12 | * #fff 13 | * #333 14 | * #62c8f3 15 | * #888 16 | * 17 | */ 18 | 19 | .hljs { 20 | display: block; 21 | overflow-x: auto; 22 | padding: 0.5em; 23 | background: #333; 24 | color: white; 25 | } 26 | 27 | .hljs-name, 28 | .hljs-strong { 29 | font-weight: bold; 30 | } 31 | 32 | .hljs-code, 33 | .hljs-emphasis { 34 | font-style: italic; 35 | } 36 | 37 | .hljs-tag { 38 | color: #62c8f3; 39 | } 40 | 41 | .hljs-variable, 42 | .hljs-template-variable, 43 | .hljs-selector-id, 44 | .hljs-selector-class { 45 | color: #ade5fc; 46 | } 47 | 48 | .hljs-string, 49 | .hljs-bullet { 50 | color: #a2fca2; 51 | } 52 | 53 | .hljs-type, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-attribute, 57 | .hljs-quote, 58 | .hljs-built_in, 59 | .hljs-builtin-name { 60 | color: #ffa; 61 | } 62 | 63 | .hljs-number, 64 | .hljs-symbol, 65 | .hljs-bullet { 66 | color: #d36363; 67 | } 68 | 69 | .hljs-keyword, 70 | .hljs-selector-tag, 71 | .hljs-literal { 72 | color: #fcc28c; 73 | } 74 | 75 | .hljs-comment, 76 | .hljs-deletion, 77 | .hljs-code { 78 | color: #888; 79 | } 80 | 81 | .hljs-regexp, 82 | .hljs-link { 83 | color: #c6b4f0; 84 | } 85 | 86 | .hljs-meta { 87 | color: #fc9b9b; 88 | } 89 | 90 | .hljs-deletion { 91 | background-color: #fc9b9b; 92 | color: #333; 93 | } 94 | 95 | .hljs-addition { 96 | background-color: #a2fca2; 97 | color: #333; 98 | } 99 | 100 | .hljs a { 101 | color: inherit; 102 | } 103 | 104 | .hljs a:focus, 105 | .hljs a:hover { 106 | color: inherit; 107 | text-decoration: underline; 108 | } 109 | -------------------------------------------------------------------------------- /static/js/highlight/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | } 13 | 14 | .hljs-number, 15 | .hljs-literal, 16 | .hljs-symbol, 17 | .hljs-bullet { 18 | color: #6897BB; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-deletion { 24 | color: #cc7832; 25 | } 26 | 27 | .hljs-variable, 28 | .hljs-template-variable, 29 | .hljs-link { 30 | color: #629755; 31 | } 32 | 33 | .hljs-comment, 34 | .hljs-quote { 35 | color: #808080; 36 | } 37 | 38 | .hljs-meta { 39 | color: #bbb529; 40 | } 41 | 42 | .hljs-string, 43 | .hljs-attribute, 44 | .hljs-addition { 45 | color: #6A8759; 46 | } 47 | 48 | .hljs-section, 49 | .hljs-title, 50 | .hljs-type { 51 | color: #ffc66d; 52 | } 53 | 54 | .hljs-name, 55 | .hljs-selector-id, 56 | .hljs-selector-class { 57 | color: #e8bf6a; 58 | } 59 | 60 | .hljs-emphasis { 61 | font-style: italic; 62 | } 63 | 64 | .hljs-strong { 65 | font-weight: bold; 66 | } 67 | -------------------------------------------------------------------------------- /static/js/highlight/styles/arduino-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Arduino® Light Theme - Stefania Mellai 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #FFFFFF; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #434f54; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-attribute, 21 | .hljs-selector-tag, 22 | .hljs-doctag, 23 | .hljs-name { 24 | color: #00979D; 25 | } 26 | 27 | .hljs-built_in, 28 | .hljs-literal, 29 | .hljs-bullet, 30 | .hljs-code, 31 | .hljs-addition { 32 | color: #D35400; 33 | } 34 | 35 | .hljs-regexp, 36 | .hljs-symbol, 37 | .hljs-variable, 38 | .hljs-template-variable, 39 | .hljs-link, 40 | .hljs-selector-attr, 41 | .hljs-selector-pseudo { 42 | color: #00979D; 43 | } 44 | 45 | .hljs-type, 46 | .hljs-string, 47 | .hljs-selector-id, 48 | .hljs-selector-class, 49 | .hljs-quote, 50 | .hljs-template-tag, 51 | .hljs-deletion { 52 | color: #005C5F; 53 | } 54 | 55 | .hljs-title, 56 | .hljs-section { 57 | color: #880000; 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-comment { 62 | color: rgba(149,165,166,.8); 63 | } 64 | 65 | .hljs-meta-keyword { 66 | color: #728E00; 67 | } 68 | 69 | .hljs-meta { 70 | color: #728E00; 71 | color: #434f54; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-function { 83 | color: #728E00; 84 | } 85 | 86 | .hljs-number { 87 | color: #8A7B52; 88 | } 89 | -------------------------------------------------------------------------------- /static/js/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #222; 11 | } 12 | 13 | .hljs, 14 | .hljs-subst { 15 | color: #aaa; 16 | } 17 | 18 | .hljs-section { 19 | color: #fff; 20 | } 21 | 22 | .hljs-comment, 23 | .hljs-quote, 24 | .hljs-meta { 25 | color: #444; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-symbol, 30 | .hljs-bullet, 31 | .hljs-regexp { 32 | color: #ffcc33; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-addition { 37 | color: #00cc66; 38 | } 39 | 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-literal, 43 | .hljs-type, 44 | .hljs-template-variable, 45 | .hljs-attribute, 46 | .hljs-link { 47 | color: #32aaee; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-name, 53 | .hljs-selector-id, 54 | .hljs-selector-class { 55 | color: #6644aa; 56 | } 57 | 58 | .hljs-title, 59 | .hljs-variable, 60 | .hljs-deletion, 61 | .hljs-template-tag { 62 | color: #bb1166; 63 | } 64 | 65 | .hljs-section, 66 | .hljs-doctag, 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | 71 | .hljs-emphasis { 72 | font-style: italic; 73 | } 74 | -------------------------------------------------------------------------------- /static/js/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-string, 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-symbol, 19 | .hljs-bullet, 20 | .hljs-section, 21 | .hljs-addition, 22 | .hljs-attribute, 23 | .hljs-link { 24 | color: #888; 25 | } 26 | 27 | .hljs-comment, 28 | .hljs-quote, 29 | .hljs-meta, 30 | .hljs-deletion { 31 | color: #ccc; 32 | } 33 | 34 | .hljs-keyword, 35 | .hljs-selector-tag, 36 | .hljs-section, 37 | .hljs-name, 38 | .hljs-type, 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-emphasis { 44 | font-style: italic; 45 | } 46 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-cave-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7e7887; 9 | } 10 | 11 | /* Atelier-Cave Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-regexp, 16 | .hljs-link, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class { 21 | color: #be4678; 22 | } 23 | 24 | /* Atelier-Cave Orange */ 25 | .hljs-number, 26 | .hljs-meta, 27 | .hljs-built_in, 28 | .hljs-builtin-name, 29 | .hljs-literal, 30 | .hljs-type, 31 | .hljs-params { 32 | color: #aa573c; 33 | } 34 | 35 | /* Atelier-Cave Green */ 36 | .hljs-string, 37 | .hljs-symbol, 38 | .hljs-bullet { 39 | color: #2a9292; 40 | } 41 | 42 | /* Atelier-Cave Blue */ 43 | .hljs-title, 44 | .hljs-section { 45 | color: #576ddb; 46 | } 47 | 48 | /* Atelier-Cave Purple */ 49 | .hljs-keyword, 50 | .hljs-selector-tag { 51 | color: #955ae7; 52 | } 53 | 54 | .hljs-deletion, 55 | .hljs-addition { 56 | color: #19171c; 57 | display: inline-block; 58 | width: 100%; 59 | } 60 | 61 | .hljs-deletion { 62 | background-color: #be4678; 63 | } 64 | 65 | .hljs-addition { 66 | background-color: #2a9292; 67 | } 68 | 69 | .hljs { 70 | display: block; 71 | overflow-x: auto; 72 | background: #19171c; 73 | color: #8b8792; 74 | padding: 0.5em; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-cave-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #655f6d; 9 | } 10 | 11 | /* Atelier-Cave Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-name, 21 | .hljs-selector-id, 22 | .hljs-selector-class { 23 | color: #be4678; 24 | } 25 | 26 | /* Atelier-Cave Orange */ 27 | .hljs-number, 28 | .hljs-meta, 29 | .hljs-built_in, 30 | .hljs-builtin-name, 31 | .hljs-literal, 32 | .hljs-type, 33 | .hljs-params { 34 | color: #aa573c; 35 | } 36 | 37 | /* Atelier-Cave Green */ 38 | .hljs-string, 39 | .hljs-symbol, 40 | .hljs-bullet { 41 | color: #2a9292; 42 | } 43 | 44 | /* Atelier-Cave Blue */ 45 | .hljs-title, 46 | .hljs-section { 47 | color: #576ddb; 48 | } 49 | 50 | /* Atelier-Cave Purple */ 51 | .hljs-keyword, 52 | .hljs-selector-tag { 53 | color: #955ae7; 54 | } 55 | 56 | .hljs-deletion, 57 | .hljs-addition { 58 | color: #19171c; 59 | display: inline-block; 60 | width: 100%; 61 | } 62 | 63 | .hljs-deletion { 64 | background-color: #be4678; 65 | } 66 | 67 | .hljs-addition { 68 | background-color: #2a9292; 69 | } 70 | 71 | .hljs { 72 | display: block; 73 | overflow-x: auto; 74 | background: #efecf4; 75 | color: #585260; 76 | padding: 0.5em; 77 | } 78 | 79 | .hljs-emphasis { 80 | font-style: italic; 81 | } 82 | 83 | .hljs-strong { 84 | font-weight: bold; 85 | } 86 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-dune-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #999580; 9 | } 10 | 11 | /* Atelier-Dune Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d73737; 23 | } 24 | 25 | /* Atelier-Dune Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b65611; 34 | } 35 | 36 | /* Atelier-Dune Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #60ac39; 41 | } 42 | 43 | /* Atelier-Dune Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #6684e1; 47 | } 48 | 49 | /* Atelier-Dune Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #b854d4; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #20201d; 59 | color: #a6a28c; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-dune-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7d7a68; 9 | } 10 | 11 | /* Atelier-Dune Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d73737; 23 | } 24 | 25 | /* Atelier-Dune Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b65611; 34 | } 35 | 36 | /* Atelier-Dune Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #60ac39; 41 | } 42 | 43 | /* Atelier-Dune Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #6684e1; 47 | } 48 | 49 | /* Atelier-Dune Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #b854d4; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #fefbec; 59 | color: #6e6b5e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-estuary-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Estuary Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Estuary Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #878573; 9 | } 10 | 11 | /* Atelier-Estuary Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ba6236; 23 | } 24 | 25 | /* Atelier-Estuary Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #ae7313; 34 | } 35 | 36 | /* Atelier-Estuary Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7d9726; 41 | } 42 | 43 | /* Atelier-Estuary Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #36a166; 47 | } 48 | 49 | /* Atelier-Estuary Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #5f9182; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #22221b; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ba6236; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #7d9726; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #22221b; 74 | color: #929181; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-estuary-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Estuary Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Estuary Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #6c6b5a; 9 | } 10 | 11 | /* Atelier-Estuary Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ba6236; 23 | } 24 | 25 | /* Atelier-Estuary Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #ae7313; 34 | } 35 | 36 | /* Atelier-Estuary Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7d9726; 41 | } 42 | 43 | /* Atelier-Estuary Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #36a166; 47 | } 48 | 49 | /* Atelier-Estuary Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #5f9182; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #22221b; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ba6236; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #7d9726; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #f4f3ec; 74 | color: #5f5e4e; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-forest-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #9c9491; 9 | } 10 | 11 | /* Atelier-Forest Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #f22c40; 23 | } 24 | 25 | /* Atelier-Forest Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #df5320; 34 | } 35 | 36 | /* Atelier-Forest Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7b9726; 41 | } 42 | 43 | /* Atelier-Forest Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #407ee7; 47 | } 48 | 49 | /* Atelier-Forest Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6666ea; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #1b1918; 59 | color: #a8a19f; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-forest-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #766e6b; 9 | } 10 | 11 | /* Atelier-Forest Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #f22c40; 23 | } 24 | 25 | /* Atelier-Forest Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #df5320; 34 | } 35 | 36 | /* Atelier-Forest Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7b9726; 41 | } 42 | 43 | /* Atelier-Forest Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #407ee7; 47 | } 48 | 49 | /* Atelier-Forest Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6666ea; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f1efee; 59 | color: #68615e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-heath-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #9e8f9e; 9 | } 10 | 11 | /* Atelier-Heath Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca402b; 23 | } 24 | 25 | /* Atelier-Heath Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #a65926; 34 | } 35 | 36 | /* Atelier-Heath Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #918b3b; 41 | } 42 | 43 | /* Atelier-Heath Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #516aec; 47 | } 48 | 49 | /* Atelier-Heath Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #7b59c0; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #1b181b; 59 | color: #ab9bab; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-heath-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #776977; 9 | } 10 | 11 | /* Atelier-Heath Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca402b; 23 | } 24 | 25 | /* Atelier-Heath Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #a65926; 34 | } 35 | 36 | /* Atelier-Heath Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #918b3b; 41 | } 42 | 43 | /* Atelier-Heath Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #516aec; 47 | } 48 | 49 | /* Atelier-Heath Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #7b59c0; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f7f3f7; 59 | color: #695d69; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-lakeside-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7195a8; 9 | } 10 | 11 | /* Atelier-Lakeside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d22d72; 23 | } 24 | 25 | /* Atelier-Lakeside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #935c25; 34 | } 35 | 36 | /* Atelier-Lakeside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #568c3b; 41 | } 42 | 43 | /* Atelier-Lakeside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #257fad; 47 | } 48 | 49 | /* Atelier-Lakeside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6b6bb8; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #161b1d; 59 | color: #7ea2b4; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-lakeside-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #5a7b8c; 9 | } 10 | 11 | /* Atelier-Lakeside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d22d72; 23 | } 24 | 25 | /* Atelier-Lakeside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #935c25; 34 | } 35 | 36 | /* Atelier-Lakeside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #568c3b; 41 | } 42 | 43 | /* Atelier-Lakeside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #257fad; 47 | } 48 | 49 | /* Atelier-Lakeside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6b6bb8; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #ebf8ff; 59 | color: #516d7b; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-plateau-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Plateau Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Plateau Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7e7777; 9 | } 10 | 11 | /* Atelier-Plateau Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca4949; 23 | } 24 | 25 | /* Atelier-Plateau Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b45a3c; 34 | } 35 | 36 | /* Atelier-Plateau Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #4b8b8b; 41 | } 42 | 43 | /* Atelier-Plateau Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #7272ca; 47 | } 48 | 49 | /* Atelier-Plateau Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #8464c4; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #1b1818; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ca4949; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #4b8b8b; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #1b1818; 74 | color: #8a8585; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-plateau-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Plateau Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Plateau Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #655d5d; 9 | } 10 | 11 | /* Atelier-Plateau Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca4949; 23 | } 24 | 25 | /* Atelier-Plateau Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b45a3c; 34 | } 35 | 36 | /* Atelier-Plateau Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #4b8b8b; 41 | } 42 | 43 | /* Atelier-Plateau Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #7272ca; 47 | } 48 | 49 | /* Atelier-Plateau Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #8464c4; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #1b1818; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ca4949; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #4b8b8b; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #f4ecec; 74 | color: #585050; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-savanna-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Savanna Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Savanna Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #78877d; 9 | } 10 | 11 | /* Atelier-Savanna Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #b16139; 23 | } 24 | 25 | /* Atelier-Savanna Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #9f713c; 34 | } 35 | 36 | /* Atelier-Savanna Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #489963; 41 | } 42 | 43 | /* Atelier-Savanna Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #478c90; 47 | } 48 | 49 | /* Atelier-Savanna Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #55859b; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #171c19; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #b16139; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #489963; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #171c19; 74 | color: #87928a; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-savanna-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Savanna Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Savanna Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #5f6d64; 9 | } 10 | 11 | /* Atelier-Savanna Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #b16139; 23 | } 24 | 25 | /* Atelier-Savanna Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #9f713c; 34 | } 35 | 36 | /* Atelier-Savanna Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #489963; 41 | } 42 | 43 | /* Atelier-Savanna Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #478c90; 47 | } 48 | 49 | /* Atelier-Savanna Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #55859b; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #171c19; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #b16139; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #489963; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #ecf4ee; 74 | color: #526057; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-seaside-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #809980; 9 | } 10 | 11 | /* Atelier-Seaside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #e6193c; 23 | } 24 | 25 | /* Atelier-Seaside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #87711d; 34 | } 35 | 36 | /* Atelier-Seaside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #29a329; 41 | } 42 | 43 | /* Atelier-Seaside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d62f5; 47 | } 48 | 49 | /* Atelier-Seaside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #ad2bee; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #131513; 59 | color: #8ca68c; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-seaside-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #687d68; 9 | } 10 | 11 | /* Atelier-Seaside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #e6193c; 23 | } 24 | 25 | /* Atelier-Seaside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #87711d; 34 | } 35 | 36 | /* Atelier-Seaside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #29a329; 41 | } 42 | 43 | /* Atelier-Seaside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d62f5; 47 | } 48 | 49 | /* Atelier-Seaside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #ad2bee; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f4fbf4; 59 | color: #5e6e5e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-sulphurpool-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #898ea4; 9 | } 10 | 11 | /* Atelier-Sulphurpool Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #c94922; 23 | } 24 | 25 | /* Atelier-Sulphurpool Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #c76b29; 34 | } 35 | 36 | /* Atelier-Sulphurpool Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #ac9739; 41 | } 42 | 43 | /* Atelier-Sulphurpool Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d8fd1; 47 | } 48 | 49 | /* Atelier-Sulphurpool Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6679cc; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #202746; 59 | color: #979db4; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atelier-sulphurpool-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #6b7394; 9 | } 10 | 11 | /* Atelier-Sulphurpool Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #c94922; 23 | } 24 | 25 | /* Atelier-Sulphurpool Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #c76b29; 34 | } 35 | 36 | /* Atelier-Sulphurpool Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #ac9739; 41 | } 42 | 43 | /* Atelier-Sulphurpool Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d8fd1; 47 | } 48 | 49 | /* Atelier-Sulphurpool Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6679cc; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f5f7ff; 59 | color: #5e6687; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atom-one-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Dark by Daniel Gamage 4 | Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax 5 | 6 | base: #282c34 7 | mono-1: #abb2bf 8 | mono-2: #818896 9 | mono-3: #5c6370 10 | hue-1: #56b6c2 11 | hue-2: #61aeee 12 | hue-3: #c678dd 13 | hue-4: #98c379 14 | hue-5: #e06c75 15 | hue-5-2: #be5046 16 | hue-6: #d19a66 17 | hue-6-2: #e6c07b 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #abb2bf; 26 | background: #282c34; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #5c6370; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #c678dd; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e06c75; 47 | } 48 | 49 | .hljs-literal { 50 | color: #56b6c2; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #98c379; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #e6c07b; 64 | } 65 | 66 | .hljs-variable, 67 | .hljs-template-variable, 68 | .hljs-type, 69 | .hljs-selector-class, 70 | .hljs-selector-attr, 71 | .hljs-selector-pseudo, 72 | .hljs-number { 73 | color: #d19a66; 74 | } 75 | 76 | .hljs-symbol, 77 | .hljs-bullet, 78 | .hljs-link, 79 | .hljs-meta, 80 | .hljs-selector-id, 81 | .hljs-title { 82 | color: #61aeee; 83 | } 84 | 85 | .hljs-emphasis { 86 | font-style: italic; 87 | } 88 | 89 | .hljs-strong { 90 | font-weight: bold; 91 | } 92 | 93 | .hljs-link { 94 | text-decoration: underline; 95 | } 96 | -------------------------------------------------------------------------------- /static/js/highlight/styles/atom-one-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Light by Daniel Gamage 4 | Original One Light Syntax theme from https://github.com/atom/one-light-syntax 5 | 6 | base: #fafafa 7 | mono-1: #383a42 8 | mono-2: #686b77 9 | mono-3: #a0a1a7 10 | hue-1: #0184bb 11 | hue-2: #4078f2 12 | hue-3: #a626a4 13 | hue-4: #50a14f 14 | hue-5: #e45649 15 | hue-5-2: #c91243 16 | hue-6: #986801 17 | hue-6-2: #c18401 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #383a42; 26 | background: #fafafa; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #a0a1a7; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #a626a4; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e45649; 47 | } 48 | 49 | .hljs-literal { 50 | color: #0184bb; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #50a14f; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #c18401; 64 | } 65 | 66 | .hljs-variable, 67 | .hljs-template-variable, 68 | .hljs-type, 69 | .hljs-selector-class, 70 | .hljs-selector-attr, 71 | .hljs-selector-pseudo, 72 | .hljs-number { 73 | color: #986801; 74 | } 75 | 76 | .hljs-symbol, 77 | .hljs-bullet, 78 | .hljs-link, 79 | .hljs-meta, 80 | .hljs-selector-id, 81 | .hljs-title { 82 | color: #4078f2; 83 | } 84 | 85 | .hljs-emphasis { 86 | font-style: italic; 87 | } 88 | 89 | .hljs-strong { 90 | font-weight: bold; 91 | } 92 | 93 | .hljs-link { 94 | text-decoration: underline; 95 | } 96 | -------------------------------------------------------------------------------- /static/js/highlight/styles/brown-paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background:#b7a68e url(./brown-papersq.png); 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal { 17 | color:#005599; 18 | font-weight:bold; 19 | } 20 | 21 | .hljs, 22 | .hljs-subst { 23 | color: #363c69; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-title, 28 | .hljs-section, 29 | .hljs-type, 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-bullet, 33 | .hljs-built_in, 34 | .hljs-addition, 35 | .hljs-variable, 36 | .hljs-template-tag, 37 | .hljs-template-variable, 38 | .hljs-link, 39 | .hljs-name { 40 | color: #2c009f; 41 | } 42 | 43 | .hljs-comment, 44 | .hljs-quote, 45 | .hljs-meta, 46 | .hljs-deletion { 47 | color: #802022; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-literal, 53 | .hljs-doctag, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-type, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | -------------------------------------------------------------------------------- /static/js/highlight/styles/brown-papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golangkorea/golangkorea-hugo/3d0a42737ecb42962d021c3cc7536c5a1126a8cf/static/js/highlight/styles/brown-papersq.png -------------------------------------------------------------------------------- /static/js/highlight/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | } 19 | 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-tag, 23 | .hljs-regexp, 24 | .hljs-meta, 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-params, 30 | .hljs-symbol, 31 | .hljs-bullet, 32 | .hljs-link, 33 | .hljs-deletion { 34 | color: #ab875d; 35 | } 36 | 37 | .hljs-section, 38 | .hljs-title, 39 | .hljs-name, 40 | .hljs-selector-id, 41 | .hljs-selector-class, 42 | .hljs-type, 43 | .hljs-attribute { 44 | color: #9b869b; 45 | } 46 | 47 | .hljs-string, 48 | .hljs-keyword, 49 | .hljs-selector-tag, 50 | .hljs-addition { 51 | color: #8f9c6c; 52 | } 53 | 54 | .hljs-emphasis { 55 | font-style: italic; 56 | } 57 | 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | -------------------------------------------------------------------------------- /static/js/highlight/styles/color-brewer.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colorbrewer theme 4 | Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock 5 | Ported by Fabrício Tavares de Oliveira 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #fff; 14 | } 15 | 16 | .hljs, 17 | .hljs-subst { 18 | color: #000; 19 | } 20 | 21 | .hljs-string, 22 | .hljs-meta, 23 | .hljs-symbol, 24 | .hljs-template-tag, 25 | .hljs-template-variable, 26 | .hljs-addition { 27 | color: #756bb1; 28 | } 29 | 30 | .hljs-comment, 31 | .hljs-quote { 32 | color: #636363; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-regexp, 37 | .hljs-literal, 38 | .hljs-bullet, 39 | .hljs-link { 40 | color: #31a354; 41 | } 42 | 43 | .hljs-deletion, 44 | .hljs-variable { 45 | color: #88f; 46 | } 47 | 48 | 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-built_in, 55 | .hljs-doctag, 56 | .hljs-type, 57 | .hljs-tag, 58 | .hljs-name, 59 | .hljs-selector-id, 60 | .hljs-selector-class, 61 | .hljs-strong { 62 | color: #3182bd; 63 | } 64 | 65 | .hljs-emphasis { 66 | font-style: italic; 67 | } 68 | 69 | .hljs-attribute { 70 | color: #e6550d; 71 | } 72 | -------------------------------------------------------------------------------- /static/js/highlight/styles/darcula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Darcula color scheme from the JetBrains family of IDEs 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #2b2b2b; 13 | } 14 | 15 | .hljs { 16 | color: #bababa; 17 | } 18 | 19 | .hljs-strong, 20 | .hljs-emphasis { 21 | color: #a8a8a2; 22 | } 23 | 24 | .hljs-bullet, 25 | .hljs-quote, 26 | .hljs-link, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal { 30 | color: #6896ba; 31 | } 32 | 33 | .hljs-code, 34 | .hljs-selector-class { 35 | color: #a6e22e; 36 | } 37 | 38 | .hljs-emphasis { 39 | font-style: italic; 40 | } 41 | 42 | .hljs-keyword, 43 | .hljs-selector-tag, 44 | .hljs-section, 45 | .hljs-attribute, 46 | .hljs-name, 47 | .hljs-variable { 48 | color: #cb7832; 49 | } 50 | 51 | .hljs-params { 52 | color: #b9b9b9; 53 | } 54 | 55 | .hljs-string { 56 | color: #6a8759; 57 | } 58 | 59 | .hljs-subst, 60 | .hljs-type, 61 | .hljs-built_in, 62 | .hljs-builtin-name, 63 | .hljs-symbol, 64 | .hljs-selector-id, 65 | .hljs-selector-attr, 66 | .hljs-selector-pseudo, 67 | .hljs-template-tag, 68 | .hljs-template-variable, 69 | .hljs-addition { 70 | color: #e0c46c; 71 | } 72 | 73 | .hljs-comment, 74 | .hljs-deletion, 75 | .hljs-meta { 76 | color: #7f7f7f; 77 | } 78 | -------------------------------------------------------------------------------- /static/js/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #444; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-section, 18 | .hljs-link { 19 | color: white; 20 | } 21 | 22 | .hljs, 23 | .hljs-subst { 24 | color: #ddd; 25 | } 26 | 27 | .hljs-string, 28 | .hljs-title, 29 | .hljs-name, 30 | .hljs-type, 31 | .hljs-attribute, 32 | .hljs-symbol, 33 | .hljs-bullet, 34 | .hljs-built_in, 35 | .hljs-addition, 36 | .hljs-variable, 37 | .hljs-template-tag, 38 | .hljs-template-variable { 39 | color: #d88; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-deletion, 45 | .hljs-meta { 46 | color: #777; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-literal, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-doctag, 55 | .hljs-type, 56 | .hljs-name, 57 | .hljs-strong { 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-emphasis { 62 | font-style: italic; 63 | } 64 | -------------------------------------------------------------------------------- /static/js/highlight/styles/darkula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Deprecated due to a typo in the name and left here for compatibility purpose only. 3 | Please use darcula.css instead. 4 | */ 5 | 6 | @import url('darcula.css'); 7 | -------------------------------------------------------------------------------- /static/js/highlight/styles/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original highlight.js style (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #F0F0F0; 12 | } 13 | 14 | 15 | /* Base color: saturation 0; */ 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: #444; 20 | } 21 | 22 | .hljs-comment { 23 | color: #888888; 24 | } 25 | 26 | .hljs-keyword, 27 | .hljs-attribute, 28 | .hljs-selector-tag, 29 | .hljs-meta-keyword, 30 | .hljs-doctag, 31 | .hljs-name { 32 | font-weight: bold; 33 | } 34 | 35 | 36 | /* User color: hue: 0 */ 37 | 38 | .hljs-type, 39 | .hljs-string, 40 | .hljs-number, 41 | .hljs-selector-id, 42 | .hljs-selector-class, 43 | .hljs-quote, 44 | .hljs-template-tag, 45 | .hljs-deletion { 46 | color: #880000; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-section { 51 | color: #880000; 52 | font-weight: bold; 53 | } 54 | 55 | .hljs-regexp, 56 | .hljs-symbol, 57 | .hljs-variable, 58 | .hljs-template-variable, 59 | .hljs-link, 60 | .hljs-selector-attr, 61 | .hljs-selector-pseudo { 62 | color: #BC6060; 63 | } 64 | 65 | 66 | /* Language color: hue: 90; */ 67 | 68 | .hljs-literal { 69 | color: #78A960; 70 | } 71 | 72 | .hljs-built_in, 73 | .hljs-bullet, 74 | .hljs-code, 75 | .hljs-addition { 76 | color: #397300; 77 | } 78 | 79 | 80 | /* Meta color: hue: 200 */ 81 | 82 | .hljs-meta { 83 | color: #1f7199; 84 | } 85 | 86 | .hljs-meta-string { 87 | color: #4d99bf; 88 | } 89 | 90 | 91 | /* Misc effects */ 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /static/js/highlight/styles/docco.css: -------------------------------------------------------------------------------- 1 | /* 2 | Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | color: #000; 10 | background: #f8f8ff; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote { 15 | color: #408080; 16 | font-style: italic; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-literal, 22 | .hljs-subst { 23 | color: #954121; 24 | } 25 | 26 | .hljs-number { 27 | color: #40a070; 28 | } 29 | 30 | .hljs-string, 31 | .hljs-doctag { 32 | color: #219161; 33 | } 34 | 35 | .hljs-selector-id, 36 | .hljs-selector-class, 37 | .hljs-section, 38 | .hljs-type { 39 | color: #19469d; 40 | } 41 | 42 | .hljs-params { 43 | color: #00f; 44 | } 45 | 46 | .hljs-title { 47 | color: #458; 48 | font-weight: bold; 49 | } 50 | 51 | .hljs-tag, 52 | .hljs-name, 53 | .hljs-attribute { 54 | color: #000080; 55 | font-weight: normal; 56 | } 57 | 58 | .hljs-variable, 59 | .hljs-template-variable { 60 | color: #008080; 61 | } 62 | 63 | .hljs-regexp, 64 | .hljs-link { 65 | color: #b68; 66 | } 67 | 68 | .hljs-symbol, 69 | .hljs-bullet { 70 | color: #990073; 71 | } 72 | 73 | .hljs-built_in, 74 | .hljs-builtin-name { 75 | color: #0086b3; 76 | } 77 | 78 | .hljs-meta { 79 | color: #999; 80 | font-weight: bold; 81 | } 82 | 83 | .hljs-deletion { 84 | background: #fdd; 85 | } 86 | 87 | .hljs-addition { 88 | background: #dfd; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: bold; 97 | } 98 | -------------------------------------------------------------------------------- /static/js/highlight/styles/dracula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dracula Theme v1.2.0 4 | 5 | https://github.com/zenorocha/dracula-theme 6 | 7 | Copyright 2015, All rights reserved 8 | 9 | Code licensed under the MIT license 10 | http://zenorocha.mit-license.org 11 | 12 | @author Éverton Ribeiro 13 | @author Zeno Rocha 14 | 15 | */ 16 | 17 | .hljs { 18 | display: block; 19 | overflow-x: auto; 20 | padding: 0.5em; 21 | background: #282a36; 22 | } 23 | 24 | .hljs-keyword, 25 | .hljs-selector-tag, 26 | .hljs-literal, 27 | .hljs-section, 28 | .hljs-link { 29 | color: #8be9fd; 30 | } 31 | 32 | .hljs-function .hljs-keyword { 33 | color: #ff79c6; 34 | } 35 | 36 | .hljs, 37 | .hljs-subst { 38 | color: #f8f8f2; 39 | } 40 | 41 | .hljs-string, 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-type, 45 | .hljs-attribute, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #f1fa8c; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #6272a4; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-doctag, 68 | .hljs-type, 69 | .hljs-name, 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | -------------------------------------------------------------------------------- /static/js/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000080; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #0ff; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-attribute, 21 | .hljs-symbol, 22 | .hljs-bullet, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-template-tag, 26 | .hljs-template-variable, 27 | .hljs-addition { 28 | color: #ff0; 29 | } 30 | 31 | .hljs-keyword, 32 | .hljs-selector-tag, 33 | .hljs-section, 34 | .hljs-type, 35 | .hljs-name, 36 | .hljs-selector-id, 37 | .hljs-selector-class, 38 | .hljs-variable { 39 | color: #fff; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-doctag, 45 | .hljs-deletion { 46 | color: #888; 47 | } 48 | 49 | .hljs-number, 50 | .hljs-regexp, 51 | .hljs-literal, 52 | .hljs-link { 53 | color: #0f0; 54 | } 55 | 56 | .hljs-meta { 57 | color: #008080; 58 | } 59 | 60 | .hljs-keyword, 61 | .hljs-selector-tag, 62 | .hljs-title, 63 | .hljs-section, 64 | .hljs-name, 65 | .hljs-strong { 66 | font-weight: bold; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | -------------------------------------------------------------------------------- /static/js/highlight/styles/foundation.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Foundation 4 docs style for highlight.js 3 | Author: Dan Allen 4 | Website: http://foundation.zurb.com/docs/ 5 | Version: 1.0 6 | Date: 2013-04-02 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #eee; color: black; 14 | } 15 | 16 | .hljs-link, 17 | .hljs-emphasis, 18 | .hljs-attribute, 19 | .hljs-addition { 20 | color: #070; 21 | } 22 | 23 | .hljs-emphasis { 24 | font-style: italic; 25 | } 26 | 27 | .hljs-strong, 28 | .hljs-string, 29 | .hljs-deletion { 30 | color: #d14; 31 | } 32 | 33 | .hljs-strong { 34 | font-weight: bold; 35 | } 36 | 37 | .hljs-quote, 38 | .hljs-comment { 39 | color: #998; 40 | font-style: italic; 41 | } 42 | 43 | .hljs-section, 44 | .hljs-title { 45 | color: #900; 46 | } 47 | 48 | .hljs-class .hljs-title, 49 | .hljs-type { 50 | color: #458; 51 | } 52 | 53 | .hljs-variable, 54 | .hljs-template-variable { 55 | color: #336699; 56 | } 57 | 58 | .hljs-bullet { 59 | color: #997700; 60 | } 61 | 62 | .hljs-meta { 63 | color: #3344bb; 64 | } 65 | 66 | .hljs-code, 67 | .hljs-number, 68 | .hljs-literal, 69 | .hljs-keyword, 70 | .hljs-selector-tag { 71 | color: #099; 72 | } 73 | 74 | .hljs-regexp { 75 | background-color: #fff0ff; 76 | color: #880088; 77 | } 78 | 79 | .hljs-symbol { 80 | color: #990073; 81 | } 82 | 83 | .hljs-tag, 84 | .hljs-name, 85 | .hljs-selector-id, 86 | .hljs-selector-class { 87 | color: #007700; 88 | } 89 | -------------------------------------------------------------------------------- /static/js/highlight/styles/github-gist.css: -------------------------------------------------------------------------------- 1 | /** 2 | * GitHub Gist Theme 3 | * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | background: white; 9 | padding: 0.5em; 10 | color: #333333; 11 | overflow-x: auto; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-meta { 16 | color: #969896; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-strong, 23 | .hljs-emphasis, 24 | .hljs-quote { 25 | color: #df5000; 26 | } 27 | 28 | .hljs-keyword, 29 | .hljs-selector-tag, 30 | .hljs-type { 31 | color: #a71d5d; 32 | } 33 | 34 | .hljs-literal, 35 | .hljs-symbol, 36 | .hljs-bullet, 37 | .hljs-attribute { 38 | color: #0086b3; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name { 43 | color: #63a35c; 44 | } 45 | 46 | .hljs-tag { 47 | color: #333333; 48 | } 49 | 50 | .hljs-title, 51 | .hljs-attr, 52 | .hljs-selector-id, 53 | .hljs-selector-class, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo { 56 | color: #795da3; 57 | } 58 | 59 | .hljs-addition { 60 | color: #55a532; 61 | background-color: #eaffea; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #bd2c00; 66 | background-color: #ffecec; 67 | } 68 | 69 | .hljs-link { 70 | text-decoration: underline; 71 | } 72 | -------------------------------------------------------------------------------- /static/js/highlight/styles/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #998; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal, 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-tag .hljs-attr { 33 | color: #008080; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag { 38 | color: #d14; 39 | } 40 | 41 | .hljs-title, 42 | .hljs-section, 43 | .hljs-selector-id { 44 | color: #900; 45 | font-weight: bold; 46 | } 47 | 48 | .hljs-subst { 49 | font-weight: normal; 50 | } 51 | 52 | .hljs-type, 53 | .hljs-class .hljs-title { 54 | color: #458; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag, 59 | .hljs-name, 60 | .hljs-attribute { 61 | color: #000080; 62 | font-weight: normal; 63 | } 64 | 65 | .hljs-regexp, 66 | .hljs-link { 67 | color: #009926; 68 | } 69 | 70 | .hljs-symbol, 71 | .hljs-bullet { 72 | color: #990073; 73 | } 74 | 75 | .hljs-built_in, 76 | .hljs-builtin-name { 77 | color: #0086b3; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | background: #fdd; 87 | } 88 | 89 | .hljs-addition { 90 | background: #dfd; 91 | } 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /static/js/highlight/styles/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #800; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-section, 23 | .hljs-title, 24 | .hljs-name { 25 | color: #008; 26 | } 27 | 28 | .hljs-variable, 29 | .hljs-template-variable { 30 | color: #660; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-selector-attr, 35 | .hljs-selector-pseudo, 36 | .hljs-regexp { 37 | color: #080; 38 | } 39 | 40 | .hljs-literal, 41 | .hljs-symbol, 42 | .hljs-bullet, 43 | .hljs-meta, 44 | .hljs-number, 45 | .hljs-link { 46 | color: #066; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-doctag, 51 | .hljs-type, 52 | .hljs-attr, 53 | .hljs-built_in, 54 | .hljs-builtin-name, 55 | .hljs-params { 56 | color: #606; 57 | } 58 | 59 | .hljs-attribute, 60 | .hljs-subst { 61 | color: #000; 62 | } 63 | 64 | .hljs-formula { 65 | background-color: #eee; 66 | font-style: italic; 67 | } 68 | 69 | .hljs-selector-id, 70 | .hljs-selector-class { 71 | color: #9B703F 72 | } 73 | 74 | .hljs-addition { 75 | background-color: #baeeba; 76 | } 77 | 78 | .hljs-deletion { 79 | background-color: #ffc8bd; 80 | } 81 | 82 | .hljs-doctag, 83 | .hljs-strong { 84 | font-weight: bold; 85 | } 86 | 87 | .hljs-emphasis { 88 | font-style: italic; 89 | } 90 | -------------------------------------------------------------------------------- /static/js/highlight/styles/grayscale.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | grayscale style (c) MY Sun 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal { 30 | color: #777; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-doctag, 35 | .hljs-formula { 36 | color: #333; 37 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat; 38 | } 39 | 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-selector-id { 43 | color: #000; 44 | font-weight: bold; 45 | } 46 | 47 | .hljs-subst { 48 | font-weight: normal; 49 | } 50 | 51 | .hljs-class .hljs-title, 52 | .hljs-type, 53 | .hljs-name { 54 | color: #333; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag { 59 | color: #333; 60 | } 61 | 62 | .hljs-regexp { 63 | color: #333; 64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat; 65 | } 66 | 67 | .hljs-symbol, 68 | .hljs-bullet, 69 | .hljs-link { 70 | color: #000; 71 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat; 72 | } 73 | 74 | .hljs-built_in, 75 | .hljs-builtin-name { 76 | color: #000; 77 | text-decoration: underline; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | color: #fff; 87 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat; 88 | } 89 | 90 | .hljs-addition { 91 | color: #000; 92 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat; 93 | } 94 | 95 | .hljs-emphasis { 96 | font-style: italic; 97 | } 98 | 99 | .hljs-strong { 100 | font-weight: bold; 101 | } 102 | -------------------------------------------------------------------------------- /static/js/highlight/styles/gruvbox-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #282828; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #ebdbb2; 17 | } 18 | 19 | /* Gruvbox Red */ 20 | .hljs-deletion, 21 | .hljs-formula, 22 | .hljs-keyword, 23 | .hljs-link, 24 | .hljs-selector-tag { 25 | color: #fb4934; 26 | } 27 | 28 | /* Gruvbox Blue */ 29 | .hljs-built_in, 30 | .hljs-emphasis, 31 | .hljs-name, 32 | .hljs-quote, 33 | .hljs-strong, 34 | .hljs-title, 35 | .hljs-variable { 36 | color: #83a598; 37 | } 38 | 39 | /* Gruvbox Yellow */ 40 | .hljs-attr, 41 | .hljs-params, 42 | .hljs-template-tag, 43 | .hljs-type { 44 | color: #fabd2f; 45 | } 46 | 47 | /* Gruvbox Purple */ 48 | .hljs-builtin-name, 49 | .hljs-doctag, 50 | .hljs-literal, 51 | .hljs-number { 52 | color: #8f3f71; 53 | } 54 | 55 | /* Gruvbox Orange */ 56 | .hljs-code, 57 | .hljs-meta, 58 | .hljs-regexp, 59 | .hljs-selector-id, 60 | .hljs-template-variable { 61 | color: #fe8019; 62 | } 63 | 64 | /* Gruvbox Green */ 65 | .hljs-addition, 66 | .hljs-meta-string, 67 | .hljs-section, 68 | .hljs-selector-attr, 69 | .hljs-selector-class, 70 | .hljs-string, 71 | .hljs-symbol { 72 | color: #b8bb26; 73 | } 74 | 75 | /* Gruvbox Aqua */ 76 | .hljs-attribute, 77 | .hljs-bullet, 78 | .hljs-class, 79 | .hljs-function, 80 | .hljs-function .hljs-keyword, 81 | .hljs-meta-keyword, 82 | .hljs-selector-pseudo, 83 | .hljs-tag { 84 | color: #8ec07c; 85 | } 86 | 87 | /* Gruvbox Gray */ 88 | .hljs-comment { 89 | color: #928374; 90 | } 91 | 92 | /* Gruvbox Purple */ 93 | .hljs-link_label, 94 | .hljs-literal, 95 | .hljs-number { 96 | color: #d3869b; 97 | } 98 | 99 | .hljs-comment, 100 | .hljs-emphasis { 101 | font-style: italic; 102 | } 103 | 104 | .hljs-section, 105 | .hljs-strong, 106 | .hljs-tag { 107 | font-weight: bold; 108 | } 109 | -------------------------------------------------------------------------------- /static/js/highlight/styles/gruvbox-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fbf1c7; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #3c3836; 17 | } 18 | 19 | /* Gruvbox Red */ 20 | .hljs-deletion, 21 | .hljs-formula, 22 | .hljs-keyword, 23 | .hljs-link, 24 | .hljs-selector-tag { 25 | color: #9d0006; 26 | } 27 | 28 | /* Gruvbox Blue */ 29 | .hljs-built_in, 30 | .hljs-emphasis, 31 | .hljs-name, 32 | .hljs-quote, 33 | .hljs-strong, 34 | .hljs-title, 35 | .hljs-variable { 36 | color: #076678; 37 | } 38 | 39 | /* Gruvbox Yellow */ 40 | .hljs-attr, 41 | .hljs-params, 42 | .hljs-template-tag, 43 | .hljs-type { 44 | color: #b57614; 45 | } 46 | 47 | /* Gruvbox Purple */ 48 | .hljs-builtin-name, 49 | .hljs-doctag, 50 | .hljs-literal, 51 | .hljs-number { 52 | color: #8f3f71; 53 | } 54 | 55 | /* Gruvbox Orange */ 56 | .hljs-code, 57 | .hljs-meta, 58 | .hljs-regexp, 59 | .hljs-selector-id, 60 | .hljs-template-variable { 61 | color: #af3a03; 62 | } 63 | 64 | /* Gruvbox Green */ 65 | .hljs-addition, 66 | .hljs-meta-string, 67 | .hljs-section, 68 | .hljs-selector-attr, 69 | .hljs-selector-class, 70 | .hljs-string, 71 | .hljs-symbol { 72 | color: #79740e; 73 | } 74 | 75 | /* Gruvbox Aqua */ 76 | .hljs-attribute, 77 | .hljs-bullet, 78 | .hljs-class, 79 | .hljs-function, 80 | .hljs-function .hljs-keyword, 81 | .hljs-meta-keyword, 82 | .hljs-selector-pseudo, 83 | .hljs-tag { 84 | color: #427b58; 85 | } 86 | 87 | /* Gruvbox Gray */ 88 | .hljs-comment { 89 | color: #928374; 90 | } 91 | 92 | /* Gruvbox Purple */ 93 | .hljs-link_label, 94 | .hljs-literal, 95 | .hljs-number { 96 | color: #8f3f71; 97 | } 98 | 99 | .hljs-comment, 100 | .hljs-emphasis { 101 | font-style: italic; 102 | } 103 | 104 | .hljs-section, 105 | .hljs-strong, 106 | .hljs-tag { 107 | font-weight: bold; 108 | } 109 | -------------------------------------------------------------------------------- /static/js/highlight/styles/hopscotch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Hopscotch 3 | * by Jan T. Sott 4 | * https://github.com/idleberg/Hopscotch 5 | * 6 | * This work is licensed under the Creative Commons CC0 1.0 Universal License 7 | */ 8 | 9 | /* Comment */ 10 | .hljs-comment, 11 | .hljs-quote { 12 | color: #989498; 13 | } 14 | 15 | /* Red */ 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-attribute, 19 | .hljs-tag, 20 | .hljs-name, 21 | .hljs-selector-id, 22 | .hljs-selector-class, 23 | .hljs-regexp, 24 | .hljs-link, 25 | .hljs-deletion { 26 | color: #dd464c; 27 | } 28 | 29 | /* Orange */ 30 | .hljs-number, 31 | .hljs-built_in, 32 | .hljs-builtin-name, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-params { 36 | color: #fd8b19; 37 | } 38 | 39 | /* Yellow */ 40 | .hljs-class .hljs-title { 41 | color: #fdcc59; 42 | } 43 | 44 | /* Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #8fc13e; 50 | } 51 | 52 | /* Aqua */ 53 | .hljs-meta { 54 | color: #149b93; 55 | } 56 | 57 | /* Blue */ 58 | .hljs-function, 59 | .hljs-section, 60 | .hljs-title { 61 | color: #1290bf; 62 | } 63 | 64 | /* Purple */ 65 | .hljs-keyword, 66 | .hljs-selector-tag { 67 | color: #c85e7c; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | background: #322931; 73 | color: #b9b5b8; 74 | padding: 0.5em; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /static/js/highlight/styles/hybrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) 4 | 5 | */ 6 | 7 | /*background color*/ 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #1d1f21; 13 | } 14 | 15 | /*selection color*/ 16 | .hljs::selection, 17 | .hljs span::selection { 18 | background: #373b41; 19 | } 20 | 21 | .hljs::-moz-selection, 22 | .hljs span::-moz-selection { 23 | background: #373b41; 24 | } 25 | 26 | /*foreground color*/ 27 | .hljs { 28 | color: #c5c8c6; 29 | } 30 | 31 | /*color: fg_yellow*/ 32 | .hljs-title, 33 | .hljs-name { 34 | color: #f0c674; 35 | } 36 | 37 | /*color: fg_comment*/ 38 | .hljs-comment, 39 | .hljs-meta, 40 | .hljs-meta .hljs-keyword { 41 | color: #707880; 42 | } 43 | 44 | /*color: fg_red*/ 45 | .hljs-number, 46 | .hljs-symbol, 47 | .hljs-literal, 48 | .hljs-deletion, 49 | .hljs-link { 50 | color: #cc6666 51 | } 52 | 53 | /*color: fg_green*/ 54 | .hljs-string, 55 | .hljs-doctag, 56 | .hljs-addition, 57 | .hljs-regexp, 58 | .hljs-selector-attr, 59 | .hljs-selector-pseudo { 60 | color: #b5bd68; 61 | } 62 | 63 | /*color: fg_purple*/ 64 | .hljs-attribute, 65 | .hljs-code, 66 | .hljs-selector-id { 67 | color: #b294bb; 68 | } 69 | 70 | /*color: fg_blue*/ 71 | .hljs-keyword, 72 | .hljs-selector-tag, 73 | .hljs-bullet, 74 | .hljs-tag { 75 | color: #81a2be; 76 | } 77 | 78 | /*color: fg_aqua*/ 79 | .hljs-subst, 80 | .hljs-variable, 81 | .hljs-template-tag, 82 | .hljs-template-variable { 83 | color: #8abeb7; 84 | } 85 | 86 | /*color: fg_orange*/ 87 | .hljs-type, 88 | .hljs-built_in, 89 | .hljs-builtin-name, 90 | .hljs-quote, 91 | .hljs-section, 92 | .hljs-selector-class { 93 | color: #de935f; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /static/js/highlight/styles/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #000; 12 | background: #fff; 13 | } 14 | 15 | .hljs-subst, 16 | .hljs-title { 17 | font-weight: normal; 18 | color: #000; 19 | } 20 | 21 | .hljs-comment, 22 | .hljs-quote { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | .hljs-meta { 28 | color: #808000; 29 | } 30 | 31 | .hljs-tag { 32 | background: #efefef; 33 | } 34 | 35 | .hljs-section, 36 | .hljs-name, 37 | .hljs-literal, 38 | .hljs-keyword, 39 | .hljs-selector-tag, 40 | .hljs-type, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | font-weight: bold; 44 | color: #000080; 45 | } 46 | 47 | .hljs-attribute, 48 | .hljs-number, 49 | .hljs-regexp, 50 | .hljs-link { 51 | font-weight: bold; 52 | color: #0000ff; 53 | } 54 | 55 | .hljs-number, 56 | .hljs-regexp, 57 | .hljs-link { 58 | font-weight: normal; 59 | } 60 | 61 | .hljs-string { 62 | color: #008000; 63 | font-weight: bold; 64 | } 65 | 66 | .hljs-symbol, 67 | .hljs-bullet, 68 | .hljs-formula { 69 | color: #000; 70 | background: #d0eded; 71 | font-style: italic; 72 | } 73 | 74 | .hljs-doctag { 75 | text-decoration: underline; 76 | } 77 | 78 | .hljs-variable, 79 | .hljs-template-variable { 80 | color: #660e7a; 81 | } 82 | 83 | .hljs-addition { 84 | background: #baeeba; 85 | } 86 | 87 | .hljs-deletion { 88 | background: #ffc8bd; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: bold; 97 | } 98 | -------------------------------------------------------------------------------- /static/js/highlight/styles/ir-black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote, 15 | .hljs-meta { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-tag, 22 | .hljs-name { 23 | color: #96cbfe; 24 | } 25 | 26 | .hljs-attribute, 27 | .hljs-selector-id { 28 | color: #ffffb6; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-selector-attr, 33 | .hljs-selector-pseudo, 34 | .hljs-addition { 35 | color: #a8ff60; 36 | } 37 | 38 | .hljs-subst { 39 | color: #daefa3; 40 | } 41 | 42 | .hljs-regexp, 43 | .hljs-link { 44 | color: #e9c062; 45 | } 46 | 47 | .hljs-title, 48 | .hljs-section, 49 | .hljs-type, 50 | .hljs-doctag { 51 | color: #ffffb6; 52 | } 53 | 54 | .hljs-symbol, 55 | .hljs-bullet, 56 | .hljs-variable, 57 | .hljs-template-variable, 58 | .hljs-literal { 59 | color: #c6c5fe; 60 | } 61 | 62 | .hljs-number, 63 | .hljs-deletion { 64 | color:#ff73fd; 65 | } 66 | 67 | .hljs-emphasis { 68 | font-style: italic; 69 | } 70 | 71 | .hljs-strong { 72 | font-weight: bold; 73 | } 74 | -------------------------------------------------------------------------------- /static/js/highlight/styles/kimbie.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (dark) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-quote { 11 | color: #d6baad; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-template-variable, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class, 21 | .hljs-regexp, 22 | .hljs-meta { 23 | color: #dc3958; 24 | } 25 | 26 | /* Kimbie Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion, 34 | .hljs-link { 35 | color: #f79a32; 36 | } 37 | 38 | /* Kimbie Yellow */ 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-attribute { 42 | color: #f06431; 43 | } 44 | 45 | /* Kimbie Green */ 46 | .hljs-string, 47 | .hljs-symbol, 48 | .hljs-bullet, 49 | .hljs-addition { 50 | color: #889b4a; 51 | } 52 | 53 | /* Kimbie Purple */ 54 | .hljs-keyword, 55 | .hljs-selector-tag, 56 | .hljs-function { 57 | color: #98676a; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #221a0f; 64 | color: #d3af86; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /static/js/highlight/styles/kimbie.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (light) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-quote { 11 | color: #a57a4c; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-template-variable, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class, 21 | .hljs-regexp, 22 | .hljs-meta { 23 | color: #dc3958; 24 | } 25 | 26 | /* Kimbie Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion, 34 | .hljs-link { 35 | color: #f79a32; 36 | } 37 | 38 | /* Kimbie Yellow */ 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-attribute { 42 | color: #f06431; 43 | } 44 | 45 | /* Kimbie Green */ 46 | .hljs-string, 47 | .hljs-symbol, 48 | .hljs-bullet, 49 | .hljs-addition { 50 | color: #889b4a; 51 | } 52 | 53 | /* Kimbie Purple */ 54 | .hljs-keyword, 55 | .hljs-selector-tag, 56 | .hljs-function { 57 | color: #98676a; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #fbebd4; 64 | color: #84613d; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /static/js/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; 12 | overflow-x: auto; 13 | padding: 0.5em; 14 | background-color: #f4f4f4; 15 | } 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: black; 20 | } 21 | 22 | .hljs-string, 23 | .hljs-title, 24 | .hljs-symbol, 25 | .hljs-bullet, 26 | .hljs-attribute, 27 | .hljs-addition, 28 | .hljs-variable, 29 | .hljs-template-tag, 30 | .hljs-template-variable { 31 | color: #050; 32 | } 33 | 34 | .hljs-comment, 35 | .hljs-quote { 36 | color: #777; 37 | } 38 | 39 | .hljs-number, 40 | .hljs-regexp, 41 | .hljs-literal, 42 | .hljs-type, 43 | .hljs-link { 44 | color: #800; 45 | } 46 | 47 | .hljs-deletion, 48 | .hljs-meta { 49 | color: #00e; 50 | } 51 | 52 | .hljs-keyword, 53 | .hljs-selector-tag, 54 | .hljs-doctag, 55 | .hljs-title, 56 | .hljs-section, 57 | .hljs-built_in, 58 | .hljs-tag, 59 | .hljs-name { 60 | font-weight: bold; 61 | color: navy; 62 | } 63 | 64 | .hljs-emphasis { 65 | font-style: italic; 66 | } 67 | 68 | .hljs-strong { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /static/js/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | } 10 | 11 | .hljs { 12 | color: #00193a; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-selector-tag, 17 | .hljs-title, 18 | .hljs-section, 19 | .hljs-doctag, 20 | .hljs-name, 21 | .hljs-strong { 22 | font-weight: bold; 23 | } 24 | 25 | .hljs-comment { 26 | color: #738191; 27 | } 28 | 29 | .hljs-string, 30 | .hljs-title, 31 | .hljs-section, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-addition, 36 | .hljs-tag, 37 | .hljs-quote, 38 | .hljs-name, 39 | .hljs-selector-id, 40 | .hljs-selector-class { 41 | color: #0048ab; 42 | } 43 | 44 | .hljs-meta, 45 | .hljs-subst, 46 | .hljs-symbol, 47 | .hljs-regexp, 48 | .hljs-attribute, 49 | .hljs-deletion, 50 | .hljs-variable, 51 | .hljs-template-variable, 52 | .hljs-link, 53 | .hljs-bullet { 54 | color: #4c81c9; 55 | } 56 | 57 | .hljs-emphasis { 58 | font-style: italic; 59 | } 60 | -------------------------------------------------------------------------------- /static/js/highlight/styles/monokai-sublime.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #23241f; 12 | } 13 | 14 | .hljs, 15 | .hljs-tag, 16 | .hljs-subst { 17 | color: #f8f8f2; 18 | } 19 | 20 | .hljs-strong, 21 | .hljs-emphasis { 22 | color: #a8a8a2; 23 | } 24 | 25 | .hljs-bullet, 26 | .hljs-quote, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal, 30 | .hljs-link { 31 | color: #ae81ff; 32 | } 33 | 34 | .hljs-code, 35 | .hljs-title, 36 | .hljs-section, 37 | .hljs-selector-class { 38 | color: #a6e22e; 39 | } 40 | 41 | .hljs-strong { 42 | font-weight: bold; 43 | } 44 | 45 | .hljs-emphasis { 46 | font-style: italic; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-name, 52 | .hljs-attr { 53 | color: #f92672; 54 | } 55 | 56 | .hljs-symbol, 57 | .hljs-attribute { 58 | color: #66d9ef; 59 | } 60 | 61 | .hljs-params, 62 | .hljs-class .hljs-title { 63 | color: #f8f8f2; 64 | } 65 | 66 | .hljs-string, 67 | .hljs-type, 68 | .hljs-built_in, 69 | .hljs-builtin-name, 70 | .hljs-selector-id, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-addition, 74 | .hljs-variable, 75 | .hljs-template-variable { 76 | color: #e6db74; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-deletion, 81 | .hljs-meta { 82 | color: #75715e; 83 | } 84 | -------------------------------------------------------------------------------- /static/js/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; color: #ddd; 10 | } 11 | 12 | .hljs-tag, 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-strong, 17 | .hljs-name { 18 | color: #f92672; 19 | } 20 | 21 | .hljs-code { 22 | color: #66d9ef; 23 | } 24 | 25 | .hljs-class .hljs-title { 26 | color: white; 27 | } 28 | 29 | .hljs-attribute, 30 | .hljs-symbol, 31 | .hljs-regexp, 32 | .hljs-link { 33 | color: #bf79db; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-bullet, 38 | .hljs-subst, 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-emphasis, 42 | .hljs-type, 43 | .hljs-built_in, 44 | .hljs-builtin-name, 45 | .hljs-selector-attr, 46 | .hljs-selector-pseudo, 47 | .hljs-addition, 48 | .hljs-variable, 49 | .hljs-template-tag, 50 | .hljs-template-variable { 51 | color: #a6e22e; 52 | } 53 | 54 | .hljs-comment, 55 | .hljs-quote, 56 | .hljs-deletion, 57 | .hljs-meta { 58 | color: #75715e; 59 | } 60 | 61 | .hljs-keyword, 62 | .hljs-selector-tag, 63 | .hljs-literal, 64 | .hljs-doctag, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-type, 68 | .hljs-selector-id { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /static/js/highlight/styles/obsidian.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Obsidian style 3 | * ported by Alexander Marenin (http://github.com/ioncreature) 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #282b2e; 11 | } 12 | 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-selector-id { 17 | color: #93c763; 18 | } 19 | 20 | .hljs-number { 21 | color: #ffcd22; 22 | } 23 | 24 | .hljs { 25 | color: #e0e2e4; 26 | } 27 | 28 | .hljs-attribute { 29 | color: #668bb0; 30 | } 31 | 32 | .hljs-code, 33 | .hljs-class .hljs-title, 34 | .hljs-section { 35 | color: white; 36 | } 37 | 38 | .hljs-regexp, 39 | .hljs-link { 40 | color: #d39745; 41 | } 42 | 43 | .hljs-meta { 44 | color: #557182; 45 | } 46 | 47 | .hljs-tag, 48 | .hljs-name, 49 | .hljs-bullet, 50 | .hljs-subst, 51 | .hljs-emphasis, 52 | .hljs-type, 53 | .hljs-built_in, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo, 56 | .hljs-addition, 57 | .hljs-variable, 58 | .hljs-template-tag, 59 | .hljs-template-variable { 60 | color: #8cbbad; 61 | } 62 | 63 | .hljs-string, 64 | .hljs-symbol { 65 | color: #ec7600; 66 | } 67 | 68 | .hljs-comment, 69 | .hljs-quote, 70 | .hljs-deletion { 71 | color: #818e96; 72 | } 73 | 74 | .hljs-selector-class { 75 | color: #A082BD 76 | } 77 | 78 | .hljs-keyword, 79 | .hljs-selector-tag, 80 | .hljs-literal, 81 | .hljs-doctag, 82 | .hljs-title, 83 | .hljs-section, 84 | .hljs-type, 85 | .hljs-name, 86 | .hljs-strong { 87 | font-weight: bold; 88 | } 89 | -------------------------------------------------------------------------------- /static/js/highlight/styles/ocean.css: -------------------------------------------------------------------------------- 1 | /* Ocean Dark Theme */ 2 | /* https://github.com/gavsiu */ 3 | /* Original theme - https://github.com/chriskempson/base16 */ 4 | 5 | /* Ocean Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #65737e; 9 | } 10 | 11 | /* Ocean Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #bf616a; 21 | } 22 | 23 | /* Ocean Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #d08770; 33 | } 34 | 35 | /* Ocean Yellow */ 36 | .hljs-attribute { 37 | color: #ebcb8b; 38 | } 39 | 40 | /* Ocean Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #a3be8c; 46 | } 47 | 48 | /* Ocean Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #8fa1b3; 52 | } 53 | 54 | /* Ocean Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #b48ead; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2b303b; 64 | color: #c0c5ce; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /static/js/highlight/styles/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #2f1e2e; 62 | color: #a39e9b; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /static/js/highlight/styles/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #e7e9db; 62 | color: #4f424c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /static/js/highlight/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | color: #dccf8f; 14 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 15 | } 16 | 17 | .hljs-comment, 18 | .hljs-quote { 19 | color: #586e75; 20 | font-style: italic; 21 | } 22 | 23 | .hljs-keyword, 24 | .hljs-selector-tag, 25 | .hljs-literal, 26 | .hljs-addition { 27 | color: #b64926; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-string, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #468966; 35 | } 36 | 37 | .hljs-title, 38 | .hljs-section, 39 | .hljs-built_in, 40 | .hljs-name { 41 | color: #ffb03b; 42 | } 43 | 44 | .hljs-variable, 45 | .hljs-template-variable, 46 | .hljs-class .hljs-title, 47 | .hljs-type, 48 | .hljs-tag { 49 | color: #b58900; 50 | } 51 | 52 | .hljs-attribute { 53 | color: #b89859; 54 | } 55 | 56 | .hljs-symbol, 57 | .hljs-bullet, 58 | .hljs-link, 59 | .hljs-subst, 60 | .hljs-meta { 61 | color: #cb4b16; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #dc322f; 66 | } 67 | 68 | .hljs-selector-id, 69 | .hljs-selector-class { 70 | color: #d3a60c; 71 | } 72 | 73 | .hljs-formula { 74 | background: #073642; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /static/js/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golangkorea/golangkorea-hugo/3d0a42737ecb42962d021c3cc7536c5a1126a8cf/static/js/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /static/js/highlight/styles/purebasic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | PureBASIC native IDE style ( version 1.0 - April 2016 ) 4 | 5 | by Tristano Ajmone 6 | 7 | Public Domain 8 | 9 | NOTE_1: PureBASIC code syntax highlighting only applies the following classes: 10 | .hljs-comment 11 | .hljs-function 12 | .hljs-keywords 13 | .hljs-string 14 | .hljs-symbol 15 | 16 | Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style. 17 | If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by 18 | a "--- used for PureBASIC ... ---" comment on same line. 19 | 20 | NOTE_2: Color names provided in comments were derived using "Name that Color" online tool: 21 | http://chir.ag/projects/name-that-color 22 | */ 23 | 24 | .hljs { /* Common set of rules required by highlight.js (don'r remove!) */ 25 | display: block; 26 | overflow-x: auto; 27 | padding: 0.5em; 28 | background: #FFFFDF; /* Half and Half (approx.) */ 29 | /* --- Uncomment to add PureBASIC native IDE styled font! 30 | font-family: Consolas; 31 | */ 32 | } 33 | 34 | .hljs, /* --- used for PureBASIC base color --- */ 35 | .hljs-type, /* --- used for PureBASIC Procedures return type --- */ 36 | .hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */ 37 | .hljs-name, 38 | .hljs-number, 39 | .hljs-attr, 40 | .hljs-params, 41 | .hljs-subst { 42 | color: #000000; /* Black */ 43 | } 44 | 45 | .hljs-comment, /* --- used for PureBASIC Comments --- */ 46 | .hljs-regexp, 47 | .hljs-section, 48 | .hljs-selector-pseudo, 49 | .hljs-addition { 50 | color: #00AAAA; /* Persian Green (approx.) */ 51 | } 52 | 53 | .hljs-title, /* --- used for PureBASIC Procedures Names --- */ 54 | .hljs-tag, 55 | .hljs-variable, 56 | .hljs-code { 57 | color: #006666; /* Blue Stone (approx.) */ 58 | } 59 | 60 | .hljs-keyword, /* --- used for PureBASIC Keywords --- */ 61 | .hljs-class, 62 | .hljs-meta-keyword, 63 | .hljs-selector-class, 64 | .hljs-built_in, 65 | .hljs-builtin-name { 66 | color: #006666; /* Blue Stone (approx.) */ 67 | font-weight: bold; 68 | } 69 | 70 | .hljs-string, /* --- used for PureBASIC Strings --- */ 71 | .hljs-selector-attr { 72 | color: #0080FF; /* Azure Radiance (approx.) */ 73 | } 74 | 75 | .hljs-symbol, /* --- used for PureBASIC Constants --- */ 76 | .hljs-link, 77 | .hljs-deletion, 78 | .hljs-attribute { 79 | color: #924B72; /* Cannon Pink (approx.) */ 80 | } 81 | 82 | .hljs-meta, 83 | .hljs-literal, 84 | .hljs-selector-id { 85 | color: #924B72; /* Cannon Pink (approx.) */ 86 | font-weight: bold; 87 | } 88 | 89 | .hljs-strong, 90 | .hljs-name { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-emphasis { 95 | font-style: italic; 96 | } 97 | -------------------------------------------------------------------------------- /static/js/highlight/styles/qtcreator_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator dark color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #000000; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #aaaaaa; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #a8a8a2; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #ff55ff; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #aaaaff; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #ffff55; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #ff5555; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #8888ff; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #ff55ff; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #55ffff; 83 | } 84 | -------------------------------------------------------------------------------- /static/js/highlight/styles/qtcreator_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator light color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #ffffff; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #000000; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #000000; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #000080; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #800080; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #808000; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #800000; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #0055AF; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #008000; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #008000; 83 | } 84 | -------------------------------------------------------------------------------- /static/js/highlight/styles/railscasts.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Railscasts-like style (c) Visoft, Inc. (Damien White) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #232323; 12 | color: #e6e1dc; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #bc9458; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag { 23 | color: #c26230; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-variable, 30 | .hljs-template-variable { 31 | color: #a5c261; 32 | } 33 | 34 | .hljs-subst { 35 | color: #519f50; 36 | } 37 | 38 | .hljs-tag, 39 | .hljs-name { 40 | color: #e8bf6a; 41 | } 42 | 43 | .hljs-type { 44 | color: #da4939; 45 | } 46 | 47 | 48 | .hljs-symbol, 49 | .hljs-bullet, 50 | .hljs-built_in, 51 | .hljs-builtin-name, 52 | .hljs-attr, 53 | .hljs-link { 54 | color: #6d9cbe; 55 | } 56 | 57 | .hljs-params { 58 | color: #d0d0ff; 59 | } 60 | 61 | .hljs-attribute { 62 | color: #cda869; 63 | } 64 | 65 | .hljs-meta { 66 | color: #9b859d; 67 | } 68 | 69 | .hljs-title, 70 | .hljs-section { 71 | color: #ffc66d; 72 | } 73 | 74 | .hljs-addition { 75 | background-color: #144212; 76 | color: #e6e1dc; 77 | display: inline-block; 78 | width: 100%; 79 | } 80 | 81 | .hljs-deletion { 82 | background-color: #600; 83 | color: #e6e1dc; 84 | display: inline-block; 85 | width: 100%; 86 | } 87 | 88 | .hljs-selector-class { 89 | color: #9b703f; 90 | } 91 | 92 | .hljs-selector-id { 93 | color: #8b98ab; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | 104 | .hljs-link { 105 | text-decoration: underline; 106 | } 107 | -------------------------------------------------------------------------------- /static/js/highlight/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #474949; 12 | color: #d1d9e1; 13 | } 14 | 15 | 16 | .hljs-comment, 17 | .hljs-quote { 18 | color: #969896; 19 | font-style: italic; 20 | } 21 | 22 | .hljs-keyword, 23 | .hljs-selector-tag, 24 | .hljs-literal, 25 | .hljs-type, 26 | .hljs-addition { 27 | color: #cc99cc; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-selector-attr, 32 | .hljs-selector-pseudo { 33 | color: #f99157; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag, 38 | .hljs-regexp { 39 | color: #8abeb7; 40 | } 41 | 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-section, 45 | .hljs-built_in { 46 | color: #b5bd68; 47 | } 48 | 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-selector-id, 52 | .hljs-class .hljs-title { 53 | color: #ffcc66; 54 | } 55 | 56 | .hljs-section, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-symbol, 63 | .hljs-bullet, 64 | .hljs-subst, 65 | .hljs-meta, 66 | .hljs-link { 67 | color: #f99157; 68 | } 69 | 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-attr, 79 | .hljs-attribute { 80 | color: #81a2be; 81 | } 82 | 83 | .hljs-emphasis { 84 | font-style: italic; 85 | } 86 | -------------------------------------------------------------------------------- /static/js/highlight/styles/school-book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 15px 0.5em 0.5em 30px; 11 | font-size: 11px; 12 | line-height:16px; 13 | } 14 | 15 | pre{ 16 | background:#f6f6ae url(./school-book.png); 17 | border-top: solid 2px #d2e8b9; 18 | border-bottom: solid 1px #d2e8b9; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-literal { 24 | color:#005599; 25 | font-weight:bold; 26 | } 27 | 28 | .hljs, 29 | .hljs-subst { 30 | color: #3e5915; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-title, 35 | .hljs-section, 36 | .hljs-type, 37 | .hljs-symbol, 38 | .hljs-bullet, 39 | .hljs-attribute, 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-addition, 43 | .hljs-variable, 44 | .hljs-template-tag, 45 | .hljs-template-variable, 46 | .hljs-link { 47 | color: #2c009f; 48 | } 49 | 50 | .hljs-comment, 51 | .hljs-quote, 52 | .hljs-deletion, 53 | .hljs-meta { 54 | color: #e60415; 55 | } 56 | 57 | .hljs-keyword, 58 | .hljs-selector-tag, 59 | .hljs-literal, 60 | .hljs-doctag, 61 | .hljs-title, 62 | .hljs-section, 63 | .hljs-type, 64 | .hljs-name, 65 | .hljs-selector-id, 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | 70 | .hljs-emphasis { 71 | font-style: italic; 72 | } 73 | -------------------------------------------------------------------------------- /static/js/highlight/styles/school-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golangkorea/golangkorea-hugo/3d0a42737ecb42962d021c3cc7536c5a1126a8cf/static/js/highlight/styles/school-book.png -------------------------------------------------------------------------------- /static/js/highlight/styles/solarized-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #002b36; 12 | color: #839496; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #586e75; 18 | } 19 | 20 | /* Solarized Green */ 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-addition { 24 | color: #859900; 25 | } 26 | 27 | /* Solarized Cyan */ 28 | .hljs-number, 29 | .hljs-string, 30 | .hljs-meta .hljs-meta-string, 31 | .hljs-literal, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #2aa198; 35 | } 36 | 37 | /* Solarized Blue */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-name, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | color: #268bd2; 44 | } 45 | 46 | /* Solarized Yellow */ 47 | .hljs-attribute, 48 | .hljs-attr, 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-class .hljs-title, 52 | .hljs-type { 53 | color: #b58900; 54 | } 55 | 56 | /* Solarized Orange */ 57 | .hljs-symbol, 58 | .hljs-bullet, 59 | .hljs-subst, 60 | .hljs-meta, 61 | .hljs-meta .hljs-keyword, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-link { 65 | color: #cb4b16; 66 | } 67 | 68 | /* Solarized Red */ 69 | .hljs-built_in, 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #073642; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/solarized-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fdf6e3; 12 | color: #657b83; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #93a1a1; 18 | } 19 | 20 | /* Solarized Green */ 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-addition { 24 | color: #859900; 25 | } 26 | 27 | /* Solarized Cyan */ 28 | .hljs-number, 29 | .hljs-string, 30 | .hljs-meta .hljs-meta-string, 31 | .hljs-literal, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #2aa198; 35 | } 36 | 37 | /* Solarized Blue */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-name, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | color: #268bd2; 44 | } 45 | 46 | /* Solarized Yellow */ 47 | .hljs-attribute, 48 | .hljs-attr, 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-class .hljs-title, 52 | .hljs-type { 53 | color: #b58900; 54 | } 55 | 56 | /* Solarized Orange */ 57 | .hljs-symbol, 58 | .hljs-bullet, 59 | .hljs-subst, 60 | .hljs-meta, 61 | .hljs-meta .hljs-keyword, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-link { 65 | color: #cb4b16; 66 | } 67 | 68 | /* Solarized Red */ 69 | .hljs-built_in, 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /static/js/highlight/styles/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000; 12 | color: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #aeaeae; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-type { 24 | color: #e28964; 25 | } 26 | 27 | .hljs-string { 28 | color: #65b042; 29 | } 30 | 31 | .hljs-subst { 32 | color: #daefa3; 33 | } 34 | 35 | .hljs-regexp, 36 | .hljs-link { 37 | color: #e9c062; 38 | } 39 | 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-tag, 43 | .hljs-name { 44 | color: #89bdff; 45 | } 46 | 47 | .hljs-class .hljs-title, 48 | .hljs-doctag { 49 | text-decoration: underline; 50 | } 51 | 52 | .hljs-symbol, 53 | .hljs-bullet, 54 | .hljs-number { 55 | color: #3387cc; 56 | } 57 | 58 | .hljs-params, 59 | .hljs-variable, 60 | .hljs-template-variable { 61 | color: #3e87e3; 62 | } 63 | 64 | .hljs-attribute { 65 | color: #cda869; 66 | } 67 | 68 | .hljs-meta { 69 | color: #8996a8; 70 | } 71 | 72 | .hljs-formula { 73 | background-color: #0e2231; 74 | color: #f8f8f8; 75 | font-style: italic; 76 | } 77 | 78 | .hljs-addition { 79 | background-color: #253b22; 80 | color: #f8f8f8; 81 | } 82 | 83 | .hljs-deletion { 84 | background-color: #420e09; 85 | color: #f8f8f8; 86 | } 87 | 88 | .hljs-selector-class { 89 | color: #9b703f; 90 | } 91 | 92 | .hljs-selector-id { 93 | color: #8b98ab; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /static/js/highlight/styles/tomorrow-night-blue.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Blue Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-quote { 9 | color: #7285b7; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-template-variable, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-selector-id, 18 | .hljs-selector-class, 19 | .hljs-regexp, 20 | .hljs-deletion { 21 | color: #ff9da4; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-type, 30 | .hljs-params, 31 | .hljs-meta, 32 | .hljs-link { 33 | color: #ffc58f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .hljs-attribute { 38 | color: #ffeead; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-symbol, 44 | .hljs-bullet, 45 | .hljs-addition { 46 | color: #d1f1a9; 47 | } 48 | 49 | /* Tomorrow Blue */ 50 | .hljs-title, 51 | .hljs-section { 52 | color: #bbdaff; 53 | } 54 | 55 | /* Tomorrow Purple */ 56 | .hljs-keyword, 57 | .hljs-selector-tag { 58 | color: #ebbbff; 59 | } 60 | 61 | .hljs { 62 | display: block; 63 | overflow-x: auto; 64 | background: #002451; 65 | color: white; 66 | padding: 0.5em; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | 73 | .hljs-strong { 74 | font-weight: bold; 75 | } 76 | -------------------------------------------------------------------------------- /static/js/highlight/styles/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Bright Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #969896; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #d54e53; 21 | } 22 | 23 | /* Tomorrow Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #e78c45; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .hljs-attribute { 37 | color: #e7c547; 38 | } 39 | 40 | /* Tomorrow Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #b9ca4a; 46 | } 47 | 48 | /* Tomorrow Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #7aa6da; 52 | } 53 | 54 | /* Tomorrow Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #c397d8; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: black; 64 | color: #eaeaea; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /static/js/highlight/styles/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Eighties Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #999999; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #f2777a; 21 | } 22 | 23 | /* Tomorrow Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #f99157; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .hljs-attribute { 37 | color: #ffcc66; 38 | } 39 | 40 | /* Tomorrow Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #99cc99; 46 | } 47 | 48 | /* Tomorrow Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #6699cc; 52 | } 53 | 54 | /* Tomorrow Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #cc99cc; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2d2d2d; 64 | color: #cccccc; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /static/js/highlight/styles/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-quote { 9 | color: #969896; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-template-variable, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-selector-id, 18 | .hljs-selector-class, 19 | .hljs-regexp, 20 | .hljs-deletion { 21 | color: #cc6666; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-type, 30 | .hljs-params, 31 | .hljs-meta, 32 | .hljs-link { 33 | color: #de935f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .hljs-attribute { 38 | color: #f0c674; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-symbol, 44 | .hljs-bullet, 45 | .hljs-addition { 46 | color: #b5bd68; 47 | } 48 | 49 | /* Tomorrow Blue */ 50 | .hljs-title, 51 | .hljs-section { 52 | color: #81a2be; 53 | } 54 | 55 | /* Tomorrow Purple */ 56 | .hljs-keyword, 57 | .hljs-selector-tag { 58 | color: #b294bb; 59 | } 60 | 61 | .hljs { 62 | display: block; 63 | overflow-x: auto; 64 | background: #1d1f21; 65 | color: #c5c8c6; 66 | padding: 0.5em; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | 73 | .hljs-strong { 74 | font-weight: bold; 75 | } 76 | -------------------------------------------------------------------------------- /static/js/highlight/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment, 5 | .hljs-quote { 6 | color: #8e908c; 7 | } 8 | 9 | /* Tomorrow Red */ 10 | .hljs-variable, 11 | .hljs-template-variable, 12 | .hljs-tag, 13 | .hljs-name, 14 | .hljs-selector-id, 15 | .hljs-selector-class, 16 | .hljs-regexp, 17 | .hljs-deletion { 18 | color: #c82829; 19 | } 20 | 21 | /* Tomorrow Orange */ 22 | .hljs-number, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-literal, 26 | .hljs-type, 27 | .hljs-params, 28 | .hljs-meta, 29 | .hljs-link { 30 | color: #f5871f; 31 | } 32 | 33 | /* Tomorrow Yellow */ 34 | .hljs-attribute { 35 | color: #eab700; 36 | } 37 | 38 | /* Tomorrow Green */ 39 | .hljs-string, 40 | .hljs-symbol, 41 | .hljs-bullet, 42 | .hljs-addition { 43 | color: #718c00; 44 | } 45 | 46 | /* Tomorrow Blue */ 47 | .hljs-title, 48 | .hljs-section { 49 | color: #4271ae; 50 | } 51 | 52 | /* Tomorrow Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #8959a8; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: white; 62 | color: #4d4d4c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /static/js/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | -------------------------------------------------------------------------------- /static/js/highlight/styles/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fff; 12 | color: black; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #006a00; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-literal { 23 | color: #aa0d91; 24 | } 25 | 26 | .hljs-name { 27 | color: #008; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable { 32 | color: #660; 33 | } 34 | 35 | .hljs-string { 36 | color: #c41a16; 37 | } 38 | 39 | .hljs-regexp, 40 | .hljs-link { 41 | color: #080; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-tag, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-number, 49 | .hljs-meta { 50 | color: #1c00cf; 51 | } 52 | 53 | .hljs-section, 54 | .hljs-class .hljs-title, 55 | .hljs-type, 56 | .hljs-attr, 57 | .hljs-built_in, 58 | .hljs-builtin-name, 59 | .hljs-params { 60 | color: #5c2699; 61 | } 62 | 63 | .hljs-attribute, 64 | .hljs-subst { 65 | color: #000; 66 | } 67 | 68 | .hljs-formula { 69 | background-color: #eee; 70 | font-style: italic; 71 | } 72 | 73 | .hljs-addition { 74 | background-color: #baeeba; 75 | } 76 | 77 | .hljs-deletion { 78 | background-color: #ffc8bd; 79 | } 80 | 81 | .hljs-selector-id, 82 | .hljs-selector-class { 83 | color: #9b703f; 84 | } 85 | 86 | .hljs-doctag, 87 | .hljs-strong { 88 | font-weight: bold; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | -------------------------------------------------------------------------------- /static/js/highlight/styles/xt256.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | xt256.css 4 | 5 | Contact: initbar [at] protonmail [dot] ch 6 | : github.com/initbar 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | color: #eaeaea; 13 | background: #000; 14 | padding: 0.5; 15 | } 16 | 17 | .hljs-subst { 18 | color: #eaeaea; 19 | } 20 | 21 | .hljs-emphasis { 22 | font-style: italic; 23 | } 24 | 25 | .hljs-strong { 26 | font-weight: bold; 27 | } 28 | 29 | .hljs-builtin-name, 30 | .hljs-type { 31 | color: #eaeaea; 32 | } 33 | 34 | .hljs-params { 35 | color: #da0000; 36 | } 37 | 38 | .hljs-literal, 39 | .hljs-number, 40 | .hljs-name { 41 | color: #ff0000; 42 | font-weight: bolder; 43 | } 44 | 45 | .hljs-comment { 46 | color: #969896; 47 | } 48 | 49 | .hljs-selector-id, 50 | .hljs-quote { 51 | color: #00ffff; 52 | } 53 | 54 | .hljs-template-variable, 55 | .hljs-variable, 56 | .hljs-title { 57 | color: #00ffff; 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-selector-class, 62 | .hljs-keyword, 63 | .hljs-symbol { 64 | color: #fff000; 65 | } 66 | 67 | .hljs-string, 68 | .hljs-bullet { 69 | color: #00ff00; 70 | } 71 | 72 | .hljs-tag, 73 | .hljs-section { 74 | color: #000fff; 75 | } 76 | 77 | .hljs-selector-tag { 78 | color: #000fff; 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-attribute, 83 | .hljs-built_in, 84 | .hljs-regexp, 85 | .hljs-link { 86 | color: #ff00ff; 87 | } 88 | 89 | .hljs-meta { 90 | color: #fff; 91 | font-weight: bolder; 92 | } 93 | -------------------------------------------------------------------------------- /static/js/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /static/js/jqcloud/jqcloud.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQCloud 2.0.2 3 | * Copyright 2011 Luca Ongaro (http://www.lucaongaro.eu) 4 | * Copyright 2013 Daniel White (http://www.developerdan.com) 5 | * Copyright 20142016 Damien "Mistic" Sorel (http://www.strangeplanet.fr) 6 | * Licensed under MIT (http://opensource.org/licenses/MIT) 7 | */ 8 | div.jqcloud{overflow:hidden;position:relative}div.jqcloud span{padding:0}div.jqcloud{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal}div.jqcloud a{font-size:inherit;text-decoration:none}div.jqcloud span.w10{font-size:550%}div.jqcloud span.w9{font-size:500%}div.jqcloud span.w8{font-size:450%}div.jqcloud span.w7{font-size:400%}div.jqcloud span.w6{font-size:350%}div.jqcloud span.w5{font-size:300%}div.jqcloud span.w4{font-size:250%}div.jqcloud span.w3{font-size:200%}div.jqcloud span.w2{font-size:150%}div.jqcloud span.w1{font-size:100%}div.jqcloud{color:#09f}div.jqcloud a{color:inherit}div.jqcloud a:hover,div.jqcloud span.w10,div.jqcloud span.w8,div.jqcloud span.w9{color:#0cf}div.jqcloud span.w7{color:#39d}div.jqcloud span.w6{color:#90c5f0}div.jqcloud span.w5{color:#90a0dd}div.jqcloud span.w4{color:#90c5f0}div.jqcloud span.w3{color:#a0ddff}div.jqcloud span.w2{color:#9ce}div.jqcloud span.w1{color:#aab5f0} -------------------------------------------------------------------------------- /static/js/jqcloud/jqcloud.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQCloud 2.0.3 3 | * Copyright 2011 Luca Ongaro (http://www.lucaongaro.eu) 4 | * Copyright 2013 Daniel White (http://www.developerdan.com) 5 | * Copyright 2014-2016 Damien "Mistic" Sorel (http://www.strangeplanet.fr) 6 | * Licensed under MIT (http://opensource.org/licenses/MIT) 7 | */ 8 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){"use strict";function b(a,b,c){var d={pid:null,last:0};return function(){function e(){return d.last=(new Date).getTime(),a.apply(c||h,Array.prototype.slice.call(g))}var f=(new Date).getTime()-d.last,g=arguments,h=this;return f>b?e():(clearTimeout(d.pid),void(d.pid=setTimeout(e,b-f)))}}var c=function(b,c,d){this.$element=a(b),this.word_array=c||[],this.options=d,this.sizeGenerator=null,this.colorGenerator=null,this.data={placed_words:[],timeouts:{},namespace:null,step:null,angle:null,aspect_ratio:null,max_weight:null,min_weight:null,sizes:[],colors:[]},this.initialize()};c.DEFAULTS={width:100,height:100,center:{x:.5,y:.5},steps:10,delay:null,shape:"elliptic",classPattern:"w{n}",encodeURI:!0,removeOverflowing:!0,afterCloudRender:null,autoResize:!1,colors:null,fontSize:null,template:null},c.prototype={initialize:function(){if(this.options.width?this.$element.width(this.options.width):this.options.width=this.$element.width(),this.options.height?this.$element.height(this.options.height):this.options.height=this.$element.height(),this.options=a.extend(!0,{},c.DEFAULTS,this.options),null===this.options.delay&&(this.options.delay=this.word_array.length>50?10:0),this.options.center.x>1&&(this.options.center.x=this.options.center.x/this.options.width,this.options.center.y=this.options.center.y/this.options.height),"function"==typeof this.options.colors)this.colorGenerator=this.options.colors;else if(a.isArray(this.options.colors)){var d=this.options.colors.length;if(d>0){if(d0){if(f0)this.drawOneWordDelayed();else{for(a=0,b=this.word_array.length;a").attr(c.attr),d.addClass("jqcloud-word"),this.options.classPattern&&d.addClass(this.options.classPattern.replace("{n}",l)),this.data.colors.length&&d.css("color",this.data.colors[l-1]),c.color&&d.css("color",c.color),this.data.sizes.length&&d.css("font-size",this.data.sizes[l-1]),this.options.template?d.html(this.options.template(c)):c.link?("string"==typeof c.link&&(c.link={href:c.link}),this.options.encodeURI&&(c.link.href=encodeURI(c.link.href).replace(/'/g,"%27")),d.append(a("").attr(c.link).text(c.text))):d.text(c.text),c.handlers&&d.on(c.handlers),this.$element.append(d),e={width:d.outerWidth(),height:d.outerHeight()},e.left=this.options.center.x*this.options.width-e.width/2,e.top=this.options.center.y*this.options.height-e.height/2,f=d[0].style,f.position="absolute",f.left=e.left+"px",f.top=e.top+"px";this.hitTest(e);){if("rectangular"===this.options.shape)switch(j++,j*this.data.step>(1+Math.floor(k/2))*this.data.step*(k%4%2===0?1:this.data.aspect_ratio)&&(j=0,k++),k%4){case 1:e.left+=this.data.step*this.data.aspect_ratio+2*Math.random();break;case 2:e.top-=this.data.step+2*Math.random();break;case 3:e.left-=this.data.step*this.data.aspect_ratio+2*Math.random();break;case 0:e.top+=this.data.step+2*Math.random()}else i+=this.data.step,h+=(b%2===0?1:-1)*this.data.step,e.left=this.options.center.x*this.options.width-e.width/2+i*Math.cos(h)*this.data.aspect_ratio,e.top=this.options.center.y*this.options.height+i*Math.sin(h)-e.height/2;f.left=e.left+"px",f.top=e.top+"px"}return this.options.removeOverflowing&&(e.left<0||e.top<0||e.left+e.width>this.options.width||e.top+e.height>this.options.height)?void d.remove():(this.data.placed_words.push(e),void("function"==typeof c.afterWordRender&&c.afterWordRender.call(d)))},drawOneWordDelayed:function(b){return b=b||0,this.$element.is(":visible")?void(b