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