저는 Minimal Mistakes 테마를 사용하고 있습니다.

해당 테마의 Code block의 라인에 숫자를 표시하는 설정 방법입니다.

_config.yml 파일에서 kramdown -> syntax_highlighter_opts -> blockline_number: true 를 추가해주면 됩니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
markdown: kramdown
highlighter: rouge
lsi: false
excerpt_separator: "\n\n"
incremental: false

kramdown:
  input: GFM
  hard_wrap: false
  auto_ids: true
  footnote_nr: 1
  entity_output: as_char
  toc_levels: 1..6
  smart_quotes: lsquo,rsquo,ldquo,rdquo
  enable_coderay: false
  syntax_highlighter_opts:
    block:
      line_numbers: true

Updated: