Skip to content

Commit 6f62403

Browse files
committed
initial commit
0 parents  commit 6f62403

File tree

23 files changed

+11118
-0
lines changed

23 files changed

+11118
-0
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish Package to NPM
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16.x
15+
registry-url: 'https://registry.npmjs.org'
16+
- run: npm ci
17+
- run: npm run build --if-present
18+
- run: npm publish --access public
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.DS_Store
3+
*.log
4+
yarn.lock

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2021- Stripe, Inc. (https://stripe.com)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# `@markdoc/next.js`
2+
3+
> **Note**: this plugin will be treated as a beta version until `v1.0.0` is released.
4+
5+
Using the `@markdoc/next.js` plugin allows you to create custom `.md` and `.mdoc` pages in your Next.js apps, and automatically render them with [`markdoc`](https://github.com/markdoc/markdoc).
6+
7+
## Setup
8+
9+
The first thing you'll need to do is install `@markdoc/next.js` and add it to your project's config.
10+
11+
1. From your project, run this command to install `@markdoc/next.js`:
12+
```sh
13+
npm install @markdoc/next.js
14+
```
15+
2. Open `next.config.js` and add the following code:
16+
17+
```js
18+
// next.config.js
19+
20+
const withMarkdoc = require('@markdoc/next.js');
21+
22+
module.exports = withMarkdoc(/* options */)({
23+
pageExtensions: ['js', 'md'],
24+
});
25+
```
26+
27+
3. Create a new Markdoc file in `pages/docs` named `getting-started.md`.
28+
29+
```
30+
pages
31+
├── _app.js
32+
├── docs
33+
│ └── getting-started.md
34+
├── index.js
35+
```
36+
37+
4. Add some content to `getting-started.md`:
38+
39+
```md
40+
---
41+
title: Get started with Markdoc
42+
description: How to get started with Markdoc
43+
---
44+
45+
# Get started with Markdoc
46+
```
47+
48+
See [our docs](https://markdoc.io/docs/nextjs) for more options.
49+
50+
## Contributing
51+
52+
Contributions and feedback are welcome and encouraged. Follow these steps to set up the project:
53+
54+
1. Run `npm install`
55+
1. Run `npm test`
56+
57+
## Code of conduct
58+
59+
This project has adopted the Stripe [Code of conduct](https://github.com/markdoc/markdoc/blob/main/.github/CODE_OF_CONDUCT.md).
60+
61+
## License
62+
63+
This project uses the [MIT license](LICENSE).

babel.config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"env": {
3+
"test": {
4+
"plugins": [
5+
"@babel/plugin-transform-modules-commonjs"
6+
]
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)