GitHub Gist로 코드 스닙펫 공유

2innnnn0·2022년 3월 21일
0
post-thumbnail

배경

  • 팀단위로 코드를 관리하고 싶은 니즈가 있었음. 리서치 해보던 중 Github Gist로 하면 코드가 가독성있게 잘 불러와진다는 것을 확인함.

  • 그런데 "보안"사유로 아쉽게도 gist는 사용할 수 없었다. 특정 도메인만 접속이 가능하거나 제약조건이 있다면 좋을테지만 해당 부분은 어려운 것으로 확인.

  • 링크만 외부 유출안되면 되겠지만 사람일이란 늘 뜻대로 되지 않기 때문에 포기하였다.

[DOCS](https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists)
Warning: Secret gists aren't private.
If you send the URL of a secret gist to a friend, they'll be able to see it.
However, if someone you don't know discovers the URL, they'll also be able to see your gist.
If you need to keep your code away from prying eyes, you may want to create a private repository instead.

방법

  1. https://gist.github.com/{본인깃헙계정} 으로 접속.
  2. 코드를 추가해주면 끝.
  3. 임베딩을 아무곳에서나 사용하기

(ps)추가로 velog에서도 코드 임베딩은 안된다. 이 부분은 적용해주시면 좋을 것 같은 느낌.

profile
성장하고 싶은 데이터분석가.

0개의 댓글