upstream #1
14
README.md
14
README.md
@ -82,6 +82,20 @@ You can start editing the page by modifying `pages/index.js`. The page auto-upda
|
|||||||
|
|
||||||
`pages` - pages to route to. Read the [Next.js documentation](https://nextjs.org/docs) for more information
|
`pages` - pages to route to. Read the [Next.js documentation](https://nextjs.org/docs) for more information
|
||||||
|
|
||||||
|
## Compose
|
||||||
|
|
||||||
|
`scripts/compose.js` can be used to easily generate a post with pre-filled front matter.
|
||||||
|
|
||||||
|
The first argument is the name of the post and the second optional argument is the extension (default to .mdx)
|
||||||
|
|
||||||
|
Example code to generate the post called "My First Post" in markdown format
|
||||||
|
|
||||||
|
```
|
||||||
|
node ./scripts/compose.js "My First Post" .md
|
||||||
|
```
|
||||||
|
|
||||||
|
This will generate `./data/blog/my-first-post.md` with pre-filled front matter.
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
**Vercel**
|
**Vercel**
|
||||||
|
@ -88,6 +88,20 @@ You can start editing the page by modifying `pages/index.js`. The page auto-upda
|
|||||||
|
|
||||||
`pages` - pages to route to. Read the [Next.js documentation](https://nextjs.org/docs) for more information
|
`pages` - pages to route to. Read the [Next.js documentation](https://nextjs.org/docs) for more information
|
||||||
|
|
||||||
|
## Compose
|
||||||
|
|
||||||
|
`scripts/compose.js` can be used to easily generate a post with pre-filled front matter.
|
||||||
|
|
||||||
|
The first argument is the name of the post and the second optional argument is the extension (default to .mdx)
|
||||||
|
|
||||||
|
Example code to generate the post called "My First Post" in markdown format
|
||||||
|
|
||||||
|
```
|
||||||
|
node ./scripts/compose.js "My First Post" .md
|
||||||
|
```
|
||||||
|
|
||||||
|
This will generate `./data/blog/my-first-post.md` with pre-filled front matter.
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
**Vercel**
|
**Vercel**
|
||||||
|
@ -24,6 +24,6 @@ summary:
|
|||||||
---
|
---
|
||||||
`
|
`
|
||||||
|
|
||||||
fs.writeFile(`data/blog/${date}-${fileName}.${ext}`, frontMatter, (err) => {
|
fs.writeFile(`data/blog/${fileName}.${ext}`, frontMatter, (err) => {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user