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

Commit d775990

Browse files
committed
feat: update to new template
1 parent 4da8232 commit d775990

Some content is hidden

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

68 files changed

+1825
-3522
lines changed

.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: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,16 @@
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-
# Local Netlify folder
31-
.netlify
32-
33-
# mdx
34-
.mdx-data
35-
36-
# ide
37-
.vscode
30+
# typescript
31+
*.tsbuildinfo
32+
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Copyright 2020 Takahiro Fujiwara
2-
31
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
42

53
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

README.md

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
![Next.js blogging template for Static CMS on Netlify](https://user-images.githubusercontent.com/1388138/197867836-58de8783-9712-4196-937f-4101b1327612.png)
1+
![Next.js blogging template for Static CMS on Netlify](https://github.com/StaticJsCMS/static-cms-next-netlify-template/assets/1388138/51fc586a-b150-4ca7-afd8-95c18961b14f)
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

65
Next.js blogging template for Netlify is a boilerplate for building blogs with only Netlify stacks.
@@ -13,11 +12,7 @@ Next.js blogging template for Netlify has already implemented these standard fea
1312

1413
Deploy on your environment by clicking here:
1514

16-
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/StaticJsCMS/static-cms-next-netlify-template&stack=cms)
17-
18-
Or access the following demo site:
19-
20-
[Next.js blog template for Netlify](https://static-cms-next.netlify.app/)
15+
[Next.js blog template for Netlify](https://next-template.staticcms.org/)
2116

2217
## Features
2318

@@ -32,7 +27,7 @@ Or access the following demo site:
3227

3328
- [TypeScript](https://www.typescriptlang.org/)
3429
- [Next.js](https://nextjs.org/)
35-
- [Netlify](https://www.netlify.com/)
30+
- [Netlify](https://netlify.com/)
3631
- [MDX](https://mdxjs.com/)
3732

3833
## Getting started
@@ -44,69 +39,17 @@ and run the following command:
4439
npx create-next-app your-blog --example "https://github.com/StaticJsCMS/static-cms-next-netlify-template"
4540
```
4641

47-
After that, set up your project as following the Netlify blog:
48-
49-
[A Step-by-Step Guide: Deploying on Netlify](https://www.netlify.com/blog/2016/09/29/a-step-by-step-guide-deploying-on-netlify/)
50-
51-
## Customization
52-
53-
This template is just a template and a boilerplate in which users can customize anything after the project was cloned and started.
54-
The following instructions introduce common customization points like adding new metadata or applying a new design theme.
55-
56-
### Styling pages by a customized theme
57-
58-
All source codes related to the blog are under [components](/src/components) and [pages](/src/pages) directory.
59-
You can modify it freely if you want to apply your design theme.
60-
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.
61-
62-
The directory tree containing the blog source code are described below:
63-
64-
```
65-
meta: yaml files defining metadata like authors or tags
66-
public: images, favicons and other static assets
67-
src
68-
├── assets: other assets using inside of components
69-
├── components: pieces of components consisting of pages
70-
├── content: mdx files for each post page
71-
├── lib: project libraries like data fetching or pagination
72-
└── pages: page components managing by Next.js
73-
```
74-
75-
### Organizing content by categories
76-
77-
The category metadata that associates with content have the same relationship with the authors' one.
78-
Then reference these implementations for adding new metadata:
79-
80-
- [public/admin/config.yml](/public/admin/config.yml#L51): author metadata definition for Static CMS
81-
- [src/lib/authors.tsx](/src/lib/authors.ts): fetches metadata and defines utility functions for components
82-
- [meta/authors.yml](/src/meta/authors.yml): author content managed by Static CMS
83-
- [src/components/PostLayout.tsx](/src/components/PostLayout.tsx): displays author content for each page
84-
85-
You understood they have four steps to add the category metadata on your project after you read the above source codes:
86-
87-
1. Define the category metadata on the above Static CMS config file
88-
2. Create an empty file named with `categories.yml` under [meta](/src/meta/) directory
89-
3. Create a new module for fetching category metadata
90-
4. Display the category metadata on [src/components/PostLayout.tsx](/src/components/PostLayout.tsx#L75) or other components you want
91-
92-
It is all you have to do. After that, you can access Static CMS and create new categories at any time.
42+
After that, set up your project, following the Netlify documentation:
9343

94-
### Locale settings for Static CMS
44+
[Creating & Deploying Your Project](https://netlify.com/docs/concepts/get-started/deploy)
9545

96-
Modify [config.yml](/public/admin/config.yml) and
97-
[index.html](/public/admin/index.html) under [public/admin](/public/admin/) directory
98-
as following instructions:
46+
### Static CMS Config
9947

100-
[Static CMS - Configuration Options #Locale](https://staticjscms.netlify.app/docs/configuration-options/#locale)
48+
[config.yml](src/config.ts)
10149

10250
## References
10351

104-
- [Static CMS Documentation](https://staticjscms.netlify.app/docs/intro/)
105-
- [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/)
106-
- [Hugo Theme - Codex](https://github.com/jakewies/hugo-theme-codex)
107-
- [Next.js Starter Template for TypeScript](https://github.com/vercel/next-learn-starter/tree/master/typescript-final)
108-
- [Building Blog with NextJS and Static CMS](https://dev.to/mefaba/building-blog-with-nextjs-and-netlify-cms-fom)
109-
- [Unicons](https://github.com/Iconscout/unicons)
52+
- [Static CMS Documentation](https://staticcms.org/docs/intro/)
11053

11154
## License
11255

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 Netlify",
5-
"site_keywords": [
6-
{
7-
"keyword": "Next.js"
8-
},
9-
{
10-
"keyword": "Static CMS"
11-
},
12-
{
13-
"keyword": "Netlify"
14-
},
15-
{
16-
"keyword": "React"
17-
}
18-
],
5+
"site_keywords": ["Next.js", "Static CMS", "Netlify", "React"],
196
"posts_per_page": 5,
207
"twitter_account": "@my-account",
218
"github_account": "myaccount"
22-
}
9+
}
File renamed without changes.

content/posts/license.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ tags:
99

1010
## Next.js and netlify blog template is managed under the MIT license
1111

12-
Copyright 2020 Takahiro Fujiwara
13-
1412
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1513

1614
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

0 commit comments

Comments
 (0)