Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 917b3c9

Browse files
committed
Redo template
1 parent afa43c3 commit 917b3c9

63 files changed

Lines changed: 1618 additions & 5613 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@
1717

1818
# misc
1919
.DS_Store
20-
.env*
20+
*.pem
2121

2222
# debug
2323
npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
2626

27-
# dist
28-
/dist
27+
# local env files
28+
.env*.local
2929

30-
# mdx
31-
.mdx-data
30+
# vercel
31+
.vercel
3232

33-
# ide
34-
.vscode
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

.vscode/tasks.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "dev",
7+
"problemMatcher": [],
8+
"label": "npm: dev",
9+
"detail": "next dev",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
}
14+
}
15+
]
16+
}

LICENSE

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
![Next.js blogging template for Static CMS on Vercel](https://user-images.githubusercontent.com/1388138/197867836-58de8783-9712-4196-937f-4101b1327612.png)
22

3-
[![Netlify Status](https://api.netlify.com/api/v1/badges/c6f44d34-0570-4ca0-9d3d-cabdaa2b3afb/deploy-status)](https://app.netlify.com/sites/nextjs-netlify-template/deploys)
43
[![MADE BY Next.js](https://img.shields.io/badge/MADE%20BY%20Next.js-000000.svg?style=flat&logo=Next.js&labelColor=000)](https://nextjs.org/)
54

6-
Next.js blogging template for Netlify is a boilerplate for building blogs with only Netlify stacks.
5+
Next.js blogging template for Vercel is a boilerplate for building blogs with only Vercel stacks.
76

8-
There are some boilerplate or tutorials for the combination of Next.js and Netlify on GitHub. These resources have documentation and good tutorial to get started Next.js and Netlify quickly, but they are too simple to build blogs with standard features like tagging.
7+
There are some boilerplate or tutorials for the combination of Next.js and Vercel on GitHub. These resources have documentation and good tutorial to get started Next.js and Vercel quickly, but they are too simple to build blogs with standard features like tagging.
98

10-
Next.js blogging template for Netlify has already implemented these standard features for building blogs with only using Next.js and Netlify stacks.
9+
Next.js blogging template for Vercel has already implemented these standard features for building blogs with only using Next.js and Vercel stacks.
1110

1211
## Demo
1312

1413
Deploy on your environment by clicking here:
1514

16-
[Next.js blog template for Vercel](https://static-cms-next.netlify.app/)
15+
[Next.js blog template for Vercel](https://static-cms-next-vercel-template.vercel.app/)
1716

1817
## Features
1918

@@ -28,7 +27,7 @@ Deploy on your environment by clicking here:
2827

2928
- [TypeScript](https://www.typescriptlang.org/)
3029
- [Next.js](https://nextjs.org/)
31-
- [Netlify](https://www.netlify.com/)
30+
- [Vercel](https://vercel.com/)
3231
- [MDX](https://mdxjs.com/)
3332

3433
## Getting started
@@ -37,72 +36,20 @@ To create your blog using the template, open your terminal, `cd` into the direct
3736
and run the following command:
3837

3938
```
40-
npx create-next-app your-blog --example "https://github.com/StaticJsCMS/static-cms-next-netlify-template"
39+
npx create-next-app your-blog --example "https://github.com/StaticJsCMS/static-cms-next-vercel-template"
4140
```
4241

43-
After that, set up your project as following the Netlify blog:
42+
After that, set up your project, following the Vercel documentation:
4443

45-
[A Step-by-Step Guide: Deploying on Netlify](https://www.netlify.com/blog/2016/09/29/a-step-by-step-guide-deploying-on-netlify/)
44+
[Creating & Deploying Your Project](https://vercel.com/docs/concepts/get-started/deploy)
4645

47-
## Customization
46+
### Static CMS Config
4847

49-
This template is just a template and a boilerplate in which users can customize anything after the project was cloned and started.
50-
The following instructions introduce common customization points like adding new metadata or applying a new design theme.
51-
52-
### Styling pages by a customized theme
53-
54-
All source codes related to the blog are under [components](/src/components) and [pages](/src/pages) directory.
55-
You can modify it freely if you want to apply your design theme.
56-
All components use [styled-jsx](https://github.com/vercel/styled-jsx) and [css-modules](https://github.com/css-modules/css-modules) to define their styles, but you can choose any styling libraries for designing your theme.
57-
58-
The directory tree containing the blog source code are described below:
59-
60-
```
61-
meta: yaml files defining metadata like authors or tags
62-
public: images, favicons and other static assets
63-
src
64-
├── assets: other assets using inside of components
65-
├── components: pieces of components consisting of pages
66-
├── content: mdx files for each post page
67-
├── lib: project libraries like data fetching or pagination
68-
└── pages: page components managing by Next.js
69-
```
70-
71-
### Organizing content by categories
72-
73-
The category metadata that associates with content have the same relationship with the authors' one.
74-
Then reference these implementations for adding new metadata:
75-
76-
- [public/admin/config.yml](/public/admin/config.yml#L51): author metadata definition for Static CMS
77-
- [src/lib/authors.tsx](/src/lib/authors.ts): fetches metadata and defines utility functions for components
78-
- [meta/authors.yml](/src/meta/authors.yml): author content managed by Static CMS
79-
- [src/components/PostLayout.tsx](/src/components/PostLayout.tsx): displays author content for each page
80-
81-
You understood they have four steps to add the category metadata on your project after you read the above source codes:
82-
83-
1. Define the category metadata on the above Static CMS config file
84-
2. Create an empty file named with `categories.yml` under [meta](/src/meta/) directory
85-
3. Create a new module for fetching category metadata
86-
4. Display the category metadata on [src/components/PostLayout.tsx](/src/components/PostLayout.tsx#L75) or other components you want
87-
88-
It is all you have to do. After that, you can access Static CMS and create new categories at any time.
89-
90-
### Locale settings for Static CMS
91-
92-
Modify [config.yml](/public/admin/config.yml) and
93-
[index.html](/public/admin/index.html) under [public/admin](/public/admin/) directory
94-
as following instructions:
95-
96-
[Static CMS - Configuration Options #Locale](https://staticjscms.netlify.app/docs/configuration-options/#locale)
48+
[config.yml](src/config.ts)
9749

9850
## References
9951

100-
- [Static CMS Documentation](https://staticjscms.netlify.app/docs/intro/)
101-
- [Building a Markdown blog with Next 9.4 and Netlify](https://www.netlify.com/blog/2020/05/04/building-a-markdown-blog-with-next-9.4-and-netlify/)
102-
- [Hugo Theme - Codex](https://github.com/jakewies/hugo-theme-codex)
103-
- [Next.js Starter Template for TypeScript](https://github.com/vercel/next-learn-starter/tree/master/typescript-final)
104-
- [Building Blog with NextJS and Static CMS](https://dev.to/mefaba/building-blog-with-nextjs-and-netlify-cms-fom)
105-
- [Unicons](https://github.com/Iconscout/unicons)
52+
- [Static CMS Documentation](https://staticcms.org/docs/intro/)
10653

10754
## License
10855

config.json renamed to content/config.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,8 @@
22
"base_url": "https://next-template.staticcms.org",
33
"site_title": "Next.js Static CMS Blog",
44
"site_description": "Next.js blog template for Static CMS on Vercel",
5-
"site_keywords": [
6-
{
7-
"keyword": "Next.js"
8-
},
9-
{
10-
"keyword": "Static CMS"
11-
},
12-
{
13-
"keyword": "Vercel"
14-
},
15-
{
16-
"keyword": "React"
17-
}
18-
],
5+
"site_keywords": ["Next.js", "Static CMS", "Vercel", "React"],
196
"posts_per_page": 5,
207
"twitter_account": "@my-account",
218
"github_account": "myaccount"
22-
}
9+
}
File renamed without changes.

content/posts/references.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,4 @@ tags:
77
- document
88
---
99

10-
- [Static CMS Documentation](https://staticjscms.netlify.app/docs/intro/)
11-
- [Building a Markdown blog with Next 9.4 and Netlify](https://www.netlify.com/blog/2020/05/04/building-a-markdown-blog-with-next-9.4-and-netlify/)
12-
- [Hugo Theme - Codex](https://github.com/jakewies/hugo-theme-codex)
13-
- [Next.js Starter Template for TypeScript](https://github.com/vercel/next-learn-starter/tree/master/typescript-final)
14-
- [Building Blog with NextJS and Static CMS](https://dev.to/mefaba/building-blog-with-nextjs-and-netlify-cms-fom)
15-
- [Unicons](https://github.com/Iconscout/unicons)
10+
- [Static CMS Documentation](https://staticcms.org/docs/intro/)

0 commit comments

Comments
 (0)