File tree 6 files changed +17
-5
lines changed
6 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ collections:
74
74
75
75
- name : " posts"
76
76
label : " Posts"
77
- folder : " pages/posts"
77
+ folder : " src/ pages/posts"
78
78
extension : " mdx"
79
79
format : " frontmatter"
80
80
create : true
Original file line number Diff line number Diff line change 9
9
< body >
10
10
<!-- Include the script that builds the page and powers Netlify CMS -->
11
11
< script src ="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js "> </ script >
12
+ < script >
13
+ CMS . registerPreviewStyle (
14
+ "https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400&display=swap"
15
+ ) ;
16
+ CMS . registerPreviewStyle ( "/styles/content.module.css" ) ;
17
+ </ script >
12
18
</ body >
13
19
</ html >
Original file line number Diff line number Diff line change
1
+ .content p {
2
+ line-height : 1.5rem ;
3
+ }
Original file line number Diff line number Diff line change 9
9
height : 100% ;
10
10
flex : 1 ;
11
11
font-weight : 200 ;
12
- letter-spacing : 0.05 em ;
12
+ letter-spacing : 0.05 rem ;
13
13
}
14
14
15
15
# __next {
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
import Layout from "../components/Layout" ;
3
3
import Date from "../components/Date" ;
4
+ import styles from "../../public/styles/content.module.css" ;
4
5
5
6
type Props = {
6
7
title : string ;
7
8
date : string ;
8
9
} ;
9
- export default function ( { title, date } : Props ) {
10
+ export default function Index ( { title, date } : Props ) {
10
11
return ( { children : content } ) => {
11
12
return (
12
13
< Layout >
13
14
< div className = { "post" } >
14
15
< h1 > { title } </ h1 >
15
16
< Date dateString = { date } />
16
- { content }
17
+ < div className = { styles . content } > { content } </ div >
17
18
</ div >
18
19
< style jsx >
19
20
{ `
Original file line number Diff line number Diff line change 1
1
import "normalize.css" ;
2
- import "../styles/global.css" ;
3
2
import { AppProps } from "next/app" ;
3
+ // NOTE: Do not move the styles dir to the src.
4
+ // They are used by the Netlify CMS preview feature.
5
+ import "../../public/styles/global.css" ;
4
6
5
7
export default function App ( { Component, pageProps } : AppProps ) {
6
8
return < Component { ...pageProps } /> ;
You can’t perform that action at this time.
0 commit comments