Velog 마크다운 작성방법

상환·2021년 8월 3일
0
post-thumbnail

마크다운 기초 문법

🥇헤더Headers

  • 큰제목: 문서 제목

    This is an H1
    =============

    This is an H1


  • 작은제목: 문서 부제목

    This is an H2
    -------------

    This is an H2


  • 글머리: 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

####### This is a H7(지원하지 않음)

🧲인용(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.

이 안에서는 다른 마크다운 요소를 포함할 수 있다.

This is a H3

  • List
    	```
    	code
    	```

📜목록

●순서있는 목록(번호)

순서있는 목록은 숫자와 점을 사용한다.

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

현재까지는 어떤 번호를 입력해도 순서는 내림차순으로 정의된다.

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

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

* 빨강
  * 녹색
    * 파랑

+ 빨강
  + 녹색
    + 파랑

- 빨강
  - 녹색
    - 파랑
  • 빨강
    • 녹색
      • 파랑
  • 빨강
    • 녹색
      • 파랑
  • 빨강
    • 녹색
      • 파랑

혼합해서 사용하는 것도 가능하다

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

🎆코드

4개의 공백 또는 하나의 탭으로 들여쓰기를 만나면 변환되기 시작하여 들여쓰지 않은 행을 만날때까지 변환이 계속된다.

🎇들여쓰기

This is a normal paragraph:

    This is a code block.
    
end code block.

실제로 적용해보면,

적용예:


This is a normal paragraph:

This is a code block.

end code block.


한줄 띄어쓰지 않으면 인식이 제대로 안되는 문제가 발생합니다.

This is a normal paragraph:
    This is a code block.
end code block.

적용예:


This is a normal paragraph:
This is a code block.
end code block.


🎟코드블럭

백틱(`)을 통해서 인라인코드와 코드블럭을 만들 수 있습니다.

인라인코드는 다음과 같은 방식으로 사용합니다.

  • `inlineCodeTest`

  • inlineCodeTest

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

  • <pre><code>{code}</code></pre> 이용방식
<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");
  }
}

깃헙에서는 코드블럭코드("```") 시작점에 사용하는 언어를 선언하여 문법강조(Syntax highlighting)이 가능하다. 매우중요!!


```java
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");
  }
}

🦯구분선(divider)

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

<hr/>

* * *

***

*****

- - -

---------------------------------------
  • 적용예






🔗링크

  • 참조링크
[link keyword][id]

[id]: URL "Optional Title here"

// code
Link: [Google][googlelink]

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

Link: Google

  • 외부링크
사용문법: [Title](link)
적용예: [Google](https://google.com "google link")

Link: Google

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

* 외부링크: <http://example.com/>
* 이메일링크: <address@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 width="" height=""></img>를 이용한다.

<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칸 이상 띄어쓰기( )를 하면 줄이 바뀐다.

* 줄 바꿈을 하기 위해서는 문장 마지막에서 3칸이상을 띄어쓰기해야 한다. 
이렇게

* 줄 바꿈을 하기 위해서는 문장 마지막에서 3칸이상을 띄어쓰기해야 한다.___\\ 띄어쓰기
이렇게
  • 줄 바꿈을 하기 위해서는 문장 마지막에서 3칸이상을 띄어쓰기해야 한다. 이렇게

  • 줄 바꿈을 하기 위해서는 문장 마지막에서 3칸이상을 띄어쓰기해야 한다. \
    이렇게

🎈정리

velog, github 등 다양한 장소에서 많이 사용하는 만큼 익숙해지면 좋다


[출처]

ihoneymoon님 Github

profile
레모네이드 커피

0개의 댓글