|
1 |
| -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
| 1 | + |
| 2 | +[](https://opensource.org/licenses/MIT) |
| 3 | +[](https://github.com/ajeetchaulagain/nextjs-blog-starter-styled-components/issues) |
2 | 4 |
|
3 |
| -##Screenshot |
4 |
| - |
| 5 | +# Next.js Blog Starter Kit with styled-components |
5 | 6 |
|
| 7 | +This is a Blog starter kit built using [Next.js ](https://nextjs.org/) 14 (with [app router](https://nextjs.org/docs/app)), [styled-components](https://styled-components.com/) and typescript. |
6 | 8 |
|
7 |
| -## Getting Started |
| 9 | +**Live Demo:** https://nextjs-blog-styled-components.vercel.app/ |
8 | 10 |
|
9 |
| -First, run the development server: |
| 11 | +## Features |
| 12 | + |
| 13 | +- [styled-components](https://styled-components.com/) configuration with server-side rendering |
| 14 | +- Data sourcing for a blog post through Markdown files |
| 15 | +- Styling through Reusable components |
| 16 | +- Typescript and Eslint configuration |
| 17 | +- Uses Next.js latest [App Router](https://nextjs.org/docs/app) paradigm |
| 18 | + |
| 19 | +## How to use |
| 20 | + |
| 21 | +> [!IMPORTANT] |
| 22 | +> This application requires **Node.js v18.17+.** |
| 23 | +
|
| 24 | +### Installation & running project |
| 25 | + |
| 26 | +Execute [create-next-app](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with npm or yarn to bootstrap this template or clone this repo: |
10 | 27 |
|
11 | 28 | ```bash
|
12 |
| -npm run dev |
13 |
| -# or |
14 |
| -yarn dev |
15 |
| -# or |
16 |
| -pnpm dev |
17 |
| -# or |
18 |
| -bun dev |
| 29 | +npx create-next-app --example https://github.com/ajeetchaulagain/nextjs-blog-starter-styled-components my-blog |
19 | 30 | ```
|
20 | 31 |
|
21 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 32 | +OR |
22 | 33 |
|
23 |
| -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 34 | +```bash |
| 35 | +git clone https://github.com/ajeetchaulagain/nextjs-blog-starter-styled-components.git my-blog |
| 36 | +``` |
| 37 | + |
| 38 | +Install `node_modules` and run dev server: |
| 39 | + |
| 40 | +```bash |
| 41 | +cd my-blog |
| 42 | +npm install |
| 43 | +npm run dev |
| 44 | +``` |
24 | 45 |
|
25 |
| -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. |
| 46 | +Your dev server should be up and running at [http://localhost:3000](http://localhost:3000) |
26 | 47 |
|
27 |
| -## Learn More |
| 48 | +### Usage Guide/Note |
28 | 49 |
|
29 |
| -To learn more about Next.js, take a look at the following resources: |
| 50 | +- To add a blog post, add the new markdown file in `/posts` directory |
30 | 51 |
|
31 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
32 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 52 | + > **Note**: To create a blog post [remark](https://github.com/remarkjs/remark) and [remark-html](https://github.com/remarkjs/remark-html) is used to convert the markdown files into HTML string, which is then passed to page as the props. And for the metadata, [gray-matter](https://github.com/jonschlinkert/gray-matter) is used. |
33 | 53 |
|
34 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 54 | +- For styling markdown post, base styles are setup in `styles/MarkdownStyles.tsx`. For styling other pages, a minimal set of re-usable components created in this project are used. |
35 | 55 |
|
36 |
| -## Deploy on Vercel |
| 56 | +## Deployment |
37 | 57 |
|
38 | 58 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
39 | 59 |
|
|
0 commit comments