From 5cf92ed230286124462a03d4051320088317c658 Mon Sep 17 00:00:00 2001 From: bashamega Date: Mon, 29 Jul 2024 08:55:43 +0300 Subject: [PATCH] Formatting --- index.html | 5 +- ...ng_started_with_github_issues_and_setup.md | 2 +- src/pages/Doc/single doc/index.jsx | 204 +++++++++++------- vite.config.js | 14 +- 4 files changed, 134 insertions(+), 91 deletions(-) diff --git a/index.html b/index.html index eeb92d5..93663cf 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,10 @@ href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&display=swap" rel="stylesheet" /> - +
diff --git a/public/posts/getting_started_with_github_issues_and_setup.md b/public/posts/getting_started_with_github_issues_and_setup.md index f1bf475..f9af08d 100644 --- a/public/posts/getting_started_with_github_issues_and_setup.md +++ b/public/posts/getting_started_with_github_issues_and_setup.md @@ -80,4 +80,4 @@ GitHub Issues is a feature that allows you to track tasks, bugs, and feature req GitHub is an essential tool for modern software development, and mastering its basics will set you up for success. By setting up your GitHub account, understanding how to manage issues, and using best practices, you’ll be well on your way to effective project management and collaboration. Happy coding! -> Written by **Sakib Ahmed** | [GitHub](https://github.com/devvsakib) \ No newline at end of file +> Written by **Sakib Ahmed** | [GitHub](https://github.com/devvsakib) diff --git a/src/pages/Doc/single doc/index.jsx b/src/pages/Doc/single doc/index.jsx index 37beb79..9ac4013 100644 --- a/src/pages/Doc/single doc/index.jsx +++ b/src/pages/Doc/single doc/index.jsx @@ -64,91 +64,131 @@ const DocDetail = () => { } setHeadings(headings); }; - if (loading) return
; - if (error) return ; - const headingToId = (children) => String(children).toLowerCase().replace(/\s+/g, '-'); + if (loading) return ( - -
-

- {slug.replace(/_/g, ' ')} -

-
- -
- - {String(children).replace(/\n$/, '')} - - ) : ( - - {children} - - ); - }, - h1({ node, children }) { - return

{children}

; - }, - h2({ node, children }) { - return

🌿 {children}

; - }, - h3({ node, children }) { - return

🌿 {children}

; - }, - blockquote({ node, children }) { - return {children}; - }, - table: Table, - tr: TableRow, - td: TableCell, - th: TableHeader, - li({ node, children }) { - return
  • {children}
  • ; - }, - ul({ node, children }) { - return
      {children}
    ; - }, - ol({ node, children }) { - return
      {children}
    ; - }, - img({ node, src, alt }) { - return {alt}; - } - - }} - > - {content} -
    -
    -
    -
    -
    +
    + +
    ); if (error) return ; + const headingToId = (children) => + String(children).toLowerCase().replace(/\s+/g, "-"); + return ( + +
    +

    + {slug.replace(/_/g, " ")} +

    +
    + +
    + + {String(children).replace(/\n$/, "")} + + ) : ( + + {children} + + ); + }, + h1({ node, children }) { + return ( +

    + {" "} + {children} +

    + ); + }, + h2({ node, children }) { + return ( +

    + 🌿 {children} +

    + ); + }, + h3({ node, children }) { + return ( +

    + 🌿 {children} +

    + ); + }, + blockquote({ node, children }) { + return ( + + {children} + + ); + }, + table: Table, + tr: TableRow, + td: TableCell, + th: TableHeader, + li({ node, children }) { + return
  • {children}
  • ; + }, + ul({ node, children }) { + return
      {children}
    ; + }, + ol({ node, children }) { + return
      {children}
    ; + }, + img({ node, src, alt }) { + return ( + {alt} + ); + }, + }} + > + {content} +
    +
    +
    +
    +
    + ); + if (error) return ; return ( diff --git a/vite.config.js b/vite.config.js index e554f52..dfb8d5b 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,16 +3,16 @@ import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ react(), { - name: 'html-transform', + name: "html-transform", transformIndexHtml(html) { return html.replace( - '%VITE_GOOGLE_SITE_VERIFICATION%', - process.env.VITE_GOOGLE_SITE_VERIFICATION + "%VITE_GOOGLE_SITE_VERIFICATION%", + process.env.VITE_GOOGLE_SITE_VERIFICATION, ); - } - }], -}) + }, + }, + ], +});