Back to posts

The markdownX guide

January 1, 2023

This is certainly more fun than I had expected, in this post I will be shortly guiding you to the amazing MDX (that X in here is for React-Components) features and also custom MDX components that I can use to compose those interesting blog posts that I do rarely write 😂

Alright Let's start with basics then~

Here is a simple example of a footnote[1] that you might use in your blog posts. You can add cited text pointing to a source.[2] Also, you can add the link to the source you are reffering to and[3] you might have use in your blog posts.

Formatting

Heading Level 4

Heading Level 3

Heading Level 2

Heading Level 1

This is how underlined text looks like

This is how bold text looks like

This is how italic text looks like

This is how strikethrough looks like

Ordered List


  1. Item 1
  2. Item 2
  3. Item 3

Unordered List


  • Item 1
  • Item 2
  • Item 3

BlockQuote

“The best part of beauty is that which no picture can express”– Francis Bacon

This is an auto-image example from picsum
This is an auto-image example from picsum

Table

Tables are useful for presenting structured data in a clear, organized manner. Here’s an example of a table I use to display various levels of experience, learning appetite, project sizes, and solutions:

Experience LevelLearning AppetiteProject/Team SizeRecommended Solution
BeginnerLowSmalluseState
BeginnerMediumSmall to MediumuseContext + useReducer
IntermediateHighLargeRedux Toolkit
AdvancedHighMedium to LargeJotai, Valtio
AdvancedHighLargeRecoil (or Relay for GraphQL)

Pro-Con Cards

SSR boosts SEO and performance.
SSG enables faster page loads.
Built-in routing and API routes.
Automatic code splitting.
Strong TypeScript support.
Complex setup for large apps.
Frequent updates need maintenance.
Steep learning curve for advanced features.
SSR increases server load.
Third-party tools dependency.

Inline Code

HashMap<Integer, String>

SELECT Count(*) FROM users

float x=9.99

const func=() => {}

Code Block

jsx
import React from "react";
const Greeting = () => {
  React.useEffect(() => {
    console.log("Hello, world!");
  }, []);
  return <div>Check the console for a greeting!</div>;
};
export default Greeting;

Live Code

Live code allows interactive code snippets and their outputs directly in my webpage. Here’s how I use a live code block with the Angular template:

💡

Callout: Alright this block is a callout block to highlight essential information that readers shouldn’t overlook. Below is how the tweet card looks like.

Footnotes

    Peace out,Somrit Dasgupta