아요 개발 일기

Markdown 문법 본문

GitHub

Markdown 문법

소진이 2023. 1. 27. 18:25

안녕하세요! 오늘은 Markdown 문법에 대해 알아보겠습니다ㅎㅎ

Git을 한번이라도 보셨으면, READM.md 파일을 접해보셨을꺼에요!!

그 md 파일이 markdown 문법을 사용하여 꾸민 글??이에요!

그럼 이제 공부하러 가볼까요?!! 

 


마크다운

Markdown은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능합니다. Git Hub에서 마크다운을 통해 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 됩니다.

 

장점

  1.  간결하다.
  2.  별도의 도구없이 작성가능하다.
  3.  다양한 형태로 변환이 가능하다.
  4.  텍스트(Text)로 저장되기 때문에 용량이 적어 보관이 용이하다.
  5.  텍스트파일이기 때문에 버전관리시스템을 이용하여 변경이력을 관리할 수 있다.
  6.  지원하는 프로그램과 플랫폼이 다양하다.

단점

  1. 표준이 없다.
  2. 표준이 없기 때문에 도구에 따라서 변환방식이나 생성물이 다르다.
  3. 모든 HTML 마크업을 대신하지 못한다.

문법 살펴보기

 

헤더 (Headers)

글자 크기를 1~6 까지 지원합니다.

# This is a H1
## This is a H2
### This is a H3
#### This is a H4
##### This is a H5
###### This is a H6

This is a H1

This is a H2

This is a H3

This is a H4

 

This is a H5

 

This is a H6

 


BlockQuote

 

> This is a first blockqute.
>    > This is a second blockqute.
>    >    > This is a third blockqute.

 

This is a first blockqute.

This is a second blockqute.

This is a third blockqute.

 


목록 (list)

 

순서있는 목록(번호)

1. 첫번째
2. 두번째
3. 세번째
  1. 첫번째
  2. 두번째
  3. 세번째

 

순서없는 목록(글머리 기호: *, +, - 지원)


* 빨강   
   * 녹색     
      * 파랑

+ 빨강   
   + 녹색       
      +파랑

- 빨강   
   - 녹색       
       - 파랑

 

  • 빨강
    • 녹색
      • 파랑
  • 빨강
    • 녹색
    • +파랑
  • 빨강
    • 녹색
      • 파랑

 

* 1단계
   - 2단계
      + 3단계
          + 4단계

 

 

  •  1단계
    • 2단계
      • 3단계
        • 4단계

 


 

Code block (코드 블럭)

코드블럭은 다음과 같이 2가지 방식을 사용할 수 있습니다.

 

<pre>
<code>
public class BootSpringBootApplication {
public static void main(String[] args) {
System.out.println("Hello, Honeymon");
   }
}
</code>
</pre>
public class BootSpringBootApplication {  
  public static void main(String\[\] args) {  
      System.out.println("Hello, Honeymon");  
   }  
}  

 

```
public class BootSpringBootApplication {
public static void main(String[] args) { System.out.println("Hello, Honeymon");
}
}
```
public class BootSpringBootApplication {
  public static void main(String[] args) {
    System.out.println("Hello, Honeymon");
  }
}

 


 

수평선 <hr/>

아래 줄은 모두 수평선을 만든다. 마크다운 문서를 미리보기로 출력할 때페이지 나누기용도로 많이 사용한다.

* * *
***
*****
- - - -
--------------------------------------

적용 예)


 


 


 


 



Link (링크)

참조 링크


[link keyword][id]
[id]: URL "Optional Title here"

// code Link: [Google](link) 

[googlelink]: https://google.com "Go google"

Link: Google

 

Google

 

www.google.com

 

자동 연결


일반적인 URL 혹은 이메일주소인 경우 적절한 형식으로 링크를 형성한다.

* 외부링크: <http://example.com/>
* 이메일링크: <address@example.com>

 

 

Example Domain

Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information...

example.com

 


 

강조

*single asterisks*
_single underscores_
**double asterisks**
__double underscores__
~~cancelline~~

 

  • single asterisks
  • single underscores
  • double asterisks
  • double underscores
  • cancelline

 


 

이미지

![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")
<img src="/path/to/img.jpg" width="450px" height="300px" title="px(픽셀) 크기 설정" alt="RubberDuck"></img><br/> <img src="/path/to/img.jpg" width="40%" height="30%" title="px(픽셀) 크기 설정" alt="RubberDuck"></img>

 


 

줄바꿈

3칸 이상 띄어쓰기(   )를 하면 줄이 바뀝니다.

 


 

내부 링크 (목차)

[보여지는 내용](링크)
[집단 자료형 - Array, Dictionary, Set, Tupel](#집단-자료형)
[조건문 - Switch case](#Switch-case)
[반복문 - while, repeat~while](#while,repeat~while)
[class&struct/Enum](#class&struct/Enum)
[객체와 인스턴스](#객체와-인스턴스)

 

주의할 점

  • 띄어쓰기는 -로 연결한다.
  • 영어는 모두 소문자로 작성한다.

이상 많이 사용하는 마크다운 문법을 소개해보았습니다!

마크다운 문법을 잘 활용해서 저도 Git hub에 공부한 내용을 멋지게 적을꺼에요!!!!ㅋㅋㅋㅋ

다음 포스팅에서 보아요 녀러분!!