You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,8 +55,7 @@ The following instructions introduce common customization points like adding new
55
55
56
56
### Styling pages by a customized theme
57
57
58
-
All source codes related to the blog are under [components](/src/components), [pages](/src/pages), and
59
-
[layouts](/src/layouts) directory.
58
+
All source codes related to the blog are under [components](/src/components) and [pages](/src/pages) directory.
60
59
You can modify it freely if you want to apply your design theme.
61
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.
62
61
@@ -68,7 +67,7 @@ public: images, favicons and other static assets
68
67
src
69
68
├── assets: other assets using inside of components
70
69
├── components: pieces of components consisting of pages
71
-
├── layouts: layout components for each post page
70
+
├── content: mdx files for each post page
72
71
├── lib: project libraries like data fetching or pagination
73
72
└── pages: page components managing by Next.js
74
73
```
@@ -81,14 +80,14 @@ Then reference these implementations for adding new metadata:
81
80
-[public/admin/config.yml](/public/admin/config.yml#L51): author metadata definition for Netlify CMS
82
81
-[src/lib/authors.tsx](/src/lib/authors.ts): fetches metadata and defines utility functions for components
83
82
-[meta/authors.yml](/src/meta/authors.yml): author content managed by Netlify CMS
84
-
-[layouts/index.tsx](/src/layouts/index.tsx): displays author content for each page
83
+
-[src/components/PostLayout.tsx](/src/components/PostLayout.tsx): displays author content for each page
85
84
86
85
You understood they have four steps to add the category metadata on your project after you read the above source codes:
87
86
88
87
1. Define the category metadata on the above Netlify config file
89
88
2. Create an empty file named with `categories.yml` under [meta](/src/meta/) directory
90
89
3. Create a new module for fetching category metadata
91
-
4. Display the category metadata on [layouts](/src/layouts/index.tsx#L71) or other components you want
90
+
4. Display the category metadata on [src/components/PostLayout.tsx](/src/components/PostLayout.tsx#L75) or other components you want
92
91
93
92
It is all you have to do. After that, you can access Netlify CMS and create new categories at any time.
0 commit comments