Skip to main content

Greetings, Frist Post!

· 2 min read

This is my first post on blog using Docusaurus.

Why Docusaurus? Made by Meta for a fast way to create documentation for a new project. Using it for my website is also helpful to be familiar with it in the future.

Markdown Features:

Since this is the frist post. I will include some mardown features to use with Docusaurus.

Front Matter

Metadata at the top.

my-doc.md
---
id: my-doc-id
title: My document title
description: My document description is here
slug; /my-custom-url
---

Code Blocks

src/hello.rs
fn main(){
println!("Hello, Friends!");
}

Admonitions

:::tip My tip

Use this awesome feature option

:::

:::danger Take care

This action is dangerous

:::
Take care

Thank you!

MDX and React Components

MDX can make your allows using any React components inside Markdown:

export const Highlight = ({children, color}) => (
<span
style={{
backgroundColor: color,
borderRadius: '20px',
color: '#fff',
padding: '10px',
cursor: 'pointer',
}}
onClick={() => {
alert(`You clicked the color ${color} with label ${children}`)
}}>
{children}
</span>
);

This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !

This is <Highlight color="#1877F2">Facebook blue</Highlight> !

This is Docusaurus green !

This is Facebook blue !