This post describes basic writing in blog.saebasol.org.
blog.saebasol.org is based on markdown rendered with MDX and Chakra-UI. You can both use markdown and React components to write post.
Followings are basically implemented components for general users.
MDAST stands for Markdown abstract syntax tree. You can check every available markdown syntax on following website.
See syntax-tree/mdast on GitHub
Since MDX supports writing JSX directly into markdown, you need to checkout available modules from Chakra-UI's documentation if you want to make your post more beautiful.
blog.saebasol.org is based on version 1.3.3 and all components are available without importing manually.
<ButtononClick={() => {if (confirm('Will you refresh this page?')) {window.location.href = ''}}}>Refresh!</Button>
Sometimes, you want to do more! 👌
TypedColorMode
component provides a selective rendering by user's color mode.
Light mode enabled!<TypedColorMode only='dark'>Dark mode enabled!</TypedColorMode><TypedColorMode only='light'>Light mode enabled!</TypedColorMode>
Not only components, we do provide some useful variables and ready to use functions.
You can send toast to user simply calling toast function.
<ButtononClick={() => {toast({title: 'Title',description: 'Description of the toast.',status: 'success',duration: 3000,isClosable: true})}}>Send!</Button>
You can toggle color mode of user by calling this function.
<ButtononClick={toggleColorMode}>Toggle</Button>
A bool
value that indicates if user enabled dark mode.
<Alert>{isLightMode? 'Light': 'Dark'} mode enabled!</Alert>