|
| 1 | +The section blog theme comes under an open-source license. Before starting the contribution, first read our [Code of Conduct](./CODE_OF_CONDUCT.md) guidelines. |
| 2 | + |
| 3 | +# How to start a contribution? |
| 4 | + |
| 5 | +1. Clone Repo |
| 6 | +2. Install Package |
| 7 | +3. Structure |
| 8 | +4. Start local development server |
| 9 | + |
| 10 | + |
| 11 | +## Clone Repo |
| 12 | +First, clone the section blog theme repository from GitHub. |
| 13 | +```bash |
| 14 | +git clone https://github.com/frontendweb3/section-blog-theme.git |
| 15 | +# or |
| 16 | +gh repo clone frontendweb3/section-blog-theme |
| 17 | +``` |
| 18 | + |
| 19 | +## Install-Package |
| 20 | +Install the NPM package with pnpm. |
| 21 | +```bash |
| 22 | +cd section-blog-theme && pnpm install |
| 23 | +``` |
| 24 | +## Structure |
| 25 | +Our repository is part of a Monorepo structure, it is managed with Turbo. |
| 26 | + |
| 27 | +**Folder :** |
| 28 | +1. Docs |
| 29 | +2. Package |
| 30 | +3. Example |
| 31 | + |
| 32 | +### Docs |
| 33 | +The Docs folder contains the documentation, the documentation site is built with the nextra and nextra docs theme. |
| 34 | +### Packages |
| 35 | +The package folder contains the actual code of the section blog theme. |
| 36 | + |
| 37 | +### Example |
| 38 | +The example folder contains a demo site built or used with a section blog theme. |
| 39 | + |
| 40 | +## Start local development server |
| 41 | +1. Section blog theme server |
| 42 | +2. Documentation server |
| 43 | + |
| 44 | +### Section blog theme server |
| 45 | +You can start the local development server with the following command. |
| 46 | +```bash |
| 47 | +pnpm dev |
| 48 | +``` |
| 49 | + |
| 50 | +### Documentation server |
| 51 | +Start your documentation server with the following command. |
| 52 | +```bash |
| 53 | +pnpm dev:docs |
| 54 | +``` |
| 55 | + |
| 56 | +### Building |
| 57 | +Building theme for production. |
| 58 | +```bash |
| 59 | +pnpm build:core # buiding only section-blog-theme |
| 60 | +# and |
| 61 | +pnpm build # buiding section-blog-theme, and demo-section-blog package |
| 62 | +# or |
| 63 | +pnpm build:all # buiding section-blog-theme, demo-section-blog and docs |
| 64 | +``` |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +## What and where we found components? |
| 69 | +- `components/Article/Article.tsx` article by front matter |
| 70 | +- `components/banner/Banner.tsx` Banner |
| 71 | +- `components/Card/Card.tsx` posts card |
| 72 | +- `components/Command/Command.tsx` command or cmd |
| 73 | +- `components/Footer/Footer.tsx` footer component |
| 74 | +- `components/Header/Header.tsx` header component |
| 75 | +- `components/Header/ThemeToggle.tsx` theme toggle |
| 76 | +- `components/Layouts` layouts folders |
| 77 | +- `components/Layouts/404.tsx` 404 error page |
| 78 | +- `components/Layouts/500.tsx` 500 error page |
| 79 | +- `components/Layouts/BlogLayout.tsx` posts type |
| 80 | +- `components/Layouts/HomePage.tsx` home type |
| 81 | +- `components/Layouts/index.tsx` main file |
| 82 | +- `components/Layouts/Page.tsx` page type |
| 83 | +- `components/Layouts/Posts.tsx` posts type |
| 84 | +- `components/Layouts/Read.tsx` read type |
| 85 | +- `components/Layouts/Tag.tsx` Generate Dynamic Tag |
| 86 | +- `components/Navigation/ListItem.tsx` Part of Header |
| 87 | +- `components/Navigation/NavgationItem.tsx` Part of Header |
| 88 | +- `components/Navigation/NavigationItems.tsx` Part of Header |
| 89 | +- `components/Seo/Seo.tsx` SEO component |
| 90 | +- `components/SocialLink/DynmicIcon.tsx` Part of Header |
| 91 | +- `components/SocialLink/SocialLink.tsx` Part of Header |
| 92 | +- `components/ui/*` Part of shadcn UI |
| 93 | +- `components.json` Part of shadcn UI |
| 94 | +- `src/index.tsx` Main |
| 95 | +- `src/tag.tsx` Tag Page |
| 96 | +- `src/types.ts` type |
| 97 | +- `styles/globals.css` tailwind CSS |
| 98 | +- `tsup.config.ts` tsup config |
| 99 | +- `utility/NextURL.ts` check development or production \* |
| 100 | +- `utility/slugify.ts` convert title slugify |
| 101 | +- `utility/useContent.ts` return all posts |
| 102 | +- `utility/useTagContent.ts` return post based on tag |
| 103 | +- `utility/useTags.ts` return all tags based on posts |
| 104 | +- `utility/utils.ts` use by shadcn UI and tailwind CSS |
| 105 | +- `public/` Public folder |
| 106 | +- `__TEST__/` testing folder |
| 107 | +- `tsconfig.json` typescript config |
0 commit comments