Skip to main content

Hello Docusaurus

· 2 min read
3sam3
Backend Developer

Overview

This Posting is about My first Look on Docusaurus functions

Codeblock

Show Line Number + Line Highlighting

export const formatDate = (date: string) => {
const regex = /^(\d{4})(\d{2})(\d{2})$/;
if(!date.match(regex)) {
throw new Error('날짜 포맷에 맞지 않습니다.')
}

return date.replace(regex, '$1-$2-$3');
};

Error Highlighting

const name = null;
console.log(name.toUpperCase());

Diagram

I personally prefer D2 diagram, but Mermaid is the only diagram docusaurus officially offers.


Import Image

Example banner

This Image Link!

Import Video

Buy Me A Coffee

Support me with:

Buy Me A Coffee