Hello World
1console.log("hello world")23function sayHi(name) {4return `hi ${name}`;5}
示例代码
1import styled from "@emotion/styled";23console.log("hello world")4const l = 1235/**6* Some comments7*/8function sayHi(name) {9var message = `hi ${name}`10return message;11}1213export const HighlightedCodeText: React.FC<HighlightedCodeTextProps> = ({14codeString,15language,16highlightLine,17}) => {18if (!codeString) return null;1920return (21<Highlight22code={codeString}23language={language}24theme={{ plain: {}, styles: [] }}25>26{({ className, style, tokens, getLineProps, getTokenProps }) => (27<Pre className={className} style={style}>28{tokens.map((line, index) => {29return (30<Line31key={index}32{...getLineProps({33className:34highlightLine && highlightLine(index)35? "highlight-line"36: "",37line,38})}39>40<LineNo>{index + 1}</LineNo>41<LineContent>42{line.map((token, tokenIndex) => (43<span key={tokenIndex} {...getTokenProps({ token })} />44))}45</LineContent>46</Line>47);48})}49</Pre>50)}51</Highlight>52);53};5455
Note
Hello I am a callout
Tips
Hello I am a callout
Important
Hello I am a callout
Warning
Hello I am a callout
Caution
Hello I am a callout
Welcome to my blog 我就是 inline code I am the site creator, my name is Yvan
Made By Yvan