Tistory: 설정 202501

2025. 1. 2. 09:38·Computer/Blog, Markdown, Latex
728x90
728x90

code block의 라인넘버 등이 좀 보기 불편해서 약간 수정을 가함:

 

우선 기본 스킨은 hELLO임.

https://pronist.tistory.com/5

 

hELLO 티스토리 스킨을 소개합니다.

hELLO 는 2020년 3월 첫 공개 이후 지금에 이르기까지 티스토리에서 많은 블로거분들께 사랑받은 스킨이 되었습니다. 그 결과 가장 영향력 있는 개발자 커뮤니티인 깃허브에서 약 천 개에 달하는

pronist.tistory.com

 

이용한 code highlighter는 다음임.

https://highlightjs.org/

 

highlight.js

Usage highlight.js can be used in different ways such using CDNs, hosting the bundle yourself, as a Vue plug-in, as ES6 modules, with Node.js, and web workers. See our README on GitHub for more details. As a Module Highlight.js can be used with Node on the

highlightjs.org

 

우선 아래 내용을 head 의 아래부분에 추가: </head> 위에 놓으면 됨.

<!-- dsaint31 -->
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ['$','$'], ["\\(","\\)"] ],
            outlineMath: [["$$","$$"], ["\\[","\\]" ] ],
            processEscapes: true
        }
    });
</script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML"></script>


<!-- code block highlighting and linenumber -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>

<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>

<script defer src='//cdn.jsdelivr.net/npm/highlightjs-line-numbers.js@2.8.0/dist/highlightjs-line-numbers.min.js'></script>
<script>
      window.addEventListener('load', () => {
          hljs.highlightAll();
          hljs.initLineNumbersOnLoad()
      })
</script>

 

이후 css파일의 맨 마지막에 다음을 추가.

/* ----------------------------- */
/* for block of numbers.         */
#content .hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-align: center;
    color: #ccc;
    border-right: 1px solid #CCC;
    vertical-align: top;
    padding-right: 5px;
}
 
/* for block of code */
#content .hljs-ln-code {
    padding-left: 10px;
}

 

'Computer > Blog, Markdown, Latex' 카테고리의 다른 글

[Blog] Tistory 의 hELLO 스킨: 글머리기호 글 들여쓰기  (0) 2024.12.16
Tistory에 수식 넣기  (0) 2021.09.07
MARKDOWN 문법  (0) 2021.09.07
'Computer/Blog, Markdown, Latex' 카테고리의 다른 글
  • [Blog] Tistory 의 hELLO 스킨: 글머리기호 글 들여쓰기
  • Tistory에 수식 넣기
  • MARKDOWN 문법
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (740)
      • Private Life (13)
      • Programming (186)
        • DIP (104)
        • ML (26)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (351)
        • Signals and Systems (103)
        • Math (172)
        • Linear Algebra (33)
        • Physics (42)
        • 인성세미나 (1)
      • 정리필요. (54)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (1)
        • PET Study 2009 (1)
        • 방사선 장해방호 (4)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    SIGNAL
    signals_and_systems
    signal_and_system
    Vector
    linear algebra
    Python
    DIP
    fourier transform
    Term
    opencv
    Convolution
    math
    인허가제도
    numpy
    function
    Probability
    SS
    random
    Programming
    Optimization
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
Tistory: 설정 202501
상단으로

티스토리툴바