diff --git a/public/posts/mastering_git_branching_strategies.md b/public/posts/mastering_git_branching_strategies.md index f59fb83..65c9358 100644 --- a/public/posts/mastering_git_branching_strategies.md +++ b/public/posts/mastering_git_branching_strategies.md @@ -19,18 +19,14 @@ GitFlow is one of the most well-known branching models. It uses two main branche - `develop`: Serves as an integration branch for features. Additional supporting branches include: - - Feature branches - Release branches - Hotfix branches -#### Pros: -- Clear separation of concerns -- Suitable for projects with scheduled releases - -#### Cons: -- Can be complex for smaller projects -- May lead to long-lived feature branches +| Pros | Cons | +|------|------| +| Clear separation of concerns | Can be complex for smaller projects | +| Suitable for projects with scheduled releases | May lead to long-lived feature branches | ### 2. GitHub Flow @@ -43,12 +39,10 @@ GitHub Flow is a simpler alternative to GitFlow. It uses a single main branch an 5. Deploy for testing 6. Merge to `main` -#### Pros: -- Simple and easy to understand -- Encourages continuous delivery - -#### Cons: -- Less suitable for projects with multiple versions in production +| Pros | Cons | +|------|------| +| Simple and easy to understand | Less suitable for projects with multiple versions in production | +| Encourages continuous delivery | | ### 3. Trunk-Based Development @@ -58,13 +52,10 @@ This strategy involves keeping branches short-lived and merging frequently to a - Branches are merged to `main` at least once a day - `main` is always in a releasable state -#### Pros: -- Supports continuous integration effectively -- Reduces merge conflicts - -#### Cons: -- Requires a robust testing and CI/CD pipeline -- May be challenging for less experienced teams +| Pros | Cons | +|------|------| +| Supports continuous integration effectively | Requires a robust testing and CI/CD pipeline | +| Reduces merge conflicts | May be challenging for less experienced teams | ## Choosing the Right Strategy diff --git a/src/components/Header/Header.jsx b/src/components/Header/Header.jsx index df37a82..89e73f0 100644 --- a/src/components/Header/Header.jsx +++ b/src/components/Header/Header.jsx @@ -41,7 +41,7 @@ function Header({ countStar, notice }) { ]; return ( -
+
{/* Logo */} diff --git a/src/pages/Doc/single doc/index.jsx b/src/pages/Doc/single doc/index.jsx index fcb91da..4ca0283 100644 --- a/src/pages/Doc/single doc/index.jsx +++ b/src/pages/Doc/single doc/index.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; @@ -7,6 +7,22 @@ import { a11yDark } from 'react-syntax-highlighter/dist/esm/styles/prism'; import { Spin, Alert } from 'antd'; import Layout from '../../../components/Layout/Layout'; +const Table = ({ children }) => { + return {children}
; +}; + +const TableRow = ({ children }) => { + return {children}; +}; + +const TableCell = ({ children }) => { + return {children}; +}; + +const TableHeader = ({ children }) => { + return {children}; +}; + const DocDetail = () => { const { slug } = useParams(); const [content, setContent] = useState(''); @@ -14,20 +30,6 @@ const DocDetail = () => { const [error, setError] = useState(null); const [activeSection, setActiveSection] = useState(null); const [headings, setHeadings] = useState([]); - const tableRef = useRef(null); - - useEffect(() => { - const handleScroll = () => { - if (tableRef.current) { - const rect = tableRef.current.getBoundingClientRect(); - const isTableVisible = rect.top <= 0 && rect.bottom >= 100; - setIsSticky(isTableVisible); - } - }; - - window.addEventListener('scroll', handleScroll); - return () => window.removeEventListener('scroll', handleScroll); - }, []); useEffect(() => { const fetchContent = async () => { @@ -55,6 +57,7 @@ const DocDetail = () => { while ((match = regex.exec(markdown)) !== null) { const level = match[0].split(' ')[0].length; const title = match[1]; + if (level > 3) continue; headings.push({ level, title }); } setHeadings(headings); @@ -87,7 +90,7 @@ const DocDetail = () => { {slug.replace(/_/g, ' ')}
-