Skip to content

Commit a147295

Browse files
Merge pull request #18 from nuxt-community/docs/improvements
chore: improvements to docs
2 parents 485c59b + 063a824 commit a147295

File tree

7 files changed

+168
-111
lines changed

7 files changed

+168
-111
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at excellence@jbakebwa.dev. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## Motivation and Context
7+
<!--- Why is this change required? What problem does it solve? -->
8+
<!--- If it fixes an open issue, please link to the issue here. -->
9+
10+
## How Has This Been Tested?
11+
<!--- Please describe in detail how you tested your changes. -->
12+
<!--- Include details of your testing environment, and the tests you ran to -->
13+
<!--- see how your change affects other areas of the code, etc. -->
14+
15+
## Screenshots (if appropriate):
16+
17+
## Types of changes
18+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
19+
- [ ] Bug fix (non-breaking change which fixes an issue)
20+
- [ ] New feature (non-breaking change which adds functionality)
21+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
22+
23+
## Checklist:
24+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
25+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
26+
- [ ] My code follows the code style of this project.
27+
- [ ] My change requires a change to the documentation.
28+
- [ ] I have updated the documentation accordingly.
29+
- [ ] I have added tests to cover my changes.
30+
- [ ] All new and existing tests passed.

README.md

Lines changed: 1 addition & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -19,85 +19,6 @@
1919
- Import Vue components in your `.mdx` files
2020
- Replace markdown elements with Vue components with the MDX Provider.
2121

22-
[📖 **Release Notes**](./CHANGELOG.md)
23-
24-
## Setup
25-
26-
1. Add `@nuxtjs/mdx` dependency to your project
27-
28-
```bash
29-
yarn add --dev @nuxtjs/mdx # or npm install --dev @nuxtjs/mdx
30-
```
31-
32-
2. Add `@nuxtjs/mdx` to the `buildModules` section of `nuxt.config.js`
33-
34-
```js
35-
export default {
36-
buildModules: [
37-
'@nuxtjs/mdx'
38-
]
39-
}
40-
```
41-
42-
## Usage
43-
44-
After installing the `@nuxtjs/mdx` module, you're ready to start using MDX files in your Nuxt app. The `@nuxtjs/mdx` module picks up all `.mdx` files used in your Nuxt app and converts them into Vue components. This makes it possible to use MDX files as Nuxt routes and regular components.
45-
46-
### Using `.mdx` files in `~/pages` directory
47-
48-
Start by creating a `hello.mdx` file in your `~/pages` directory.
49-
50-
```[Application]
51-
pages/
52-
index.vue
53-
hello.mdx
54-
```
55-
56-
Inside `hello.mdx`, add some markdown content:
57-
58-
```md[hello.mdx]
59-
# Hello Nuxt MDX
60-
61-
<section
62-
id="mdx-nuxt-section"
63-
style={{
64-
color: 'white',
65-
backgroundColor: 'tomato',
66-
padding: '3rem'
67-
}}
68-
>
69-
This a Nuxt MDX tomato.
70-
</section>
71-
72-
<nuxt-link to="/some/path">
73-
to some page &rarr;
74-
</nuxt-link>
75-
```
76-
77-
After starting your app server, you can now view your rendered `hello.mdx` page at `localhost:3000/hello` 🎉
78-
79-
### Importing `.mdx` files in Vue components
80-
You can also import `.mdx` files as inside other Vue components.
81-
82-
```vue
83-
<template>
84-
<div>
85-
<!-- 👇🏽 MDX file is parsed as Vue component -->
86-
<MyMDXComponent />
87-
</div>
88-
</template>
89-
90-
<script>
91-
import MyMDXComponent from '~/components/MyMDXComponent.mdx'
92-
93-
export default {
94-
components: {
95-
MyMDXComponent
96-
}
97-
}
98-
</script>
99-
```
100-
10122
## Development
10223

10324
1. Clone this repository
@@ -108,28 +29,8 @@ export default {
10829

10930
[MIT License](./LICENSE)
11031

111-
Copyright (c) Jonathan Bakebwa <codebender828@gmail.com>
112-
113-
## Contributors ✨
114-
115-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
116-
117-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
118-
<!-- prettier-ignore-start -->
119-
<!-- markdownlint-disable -->
120-
<table>
121-
<tr>
122-
<td align="center"><a href="https://github.com/pi0"><img src="https://avatars0.githubusercontent.com/u/5158436?v=4" width="100px;" alt=""/><br /><sub><b>pooya parsa</b></sub></a><br /><a href="https://github.com/codebender828/mdx-module/commits?author=pi0" title="Code">💻</a></td>
123-
<td align="center"><a href="https://atinux.com"><img src="https://avatars2.githubusercontent.com/u/904724?v=4" width="100px;" alt=""/><br /><sub><b>Sébastien Chopin</b></sub></a><br /><a href="https://github.com/codebender828/mdx-module/commits?author=Atinux" title="Code">💻</a></td>
124-
<td align="center"><a href="https://jbakebwa.dev"><img src="https://avatars2.githubusercontent.com/u/21237954?v=4" width="100px;" alt=""/><br /><sub><b>Jonathan Bakebwa</b></sub></a><br /><a href="https://github.com/codebender828/mdx-module/commits?author=codebender828" title="Code">💻</a></td>
125-
</tr>
126-
</table>
127-
128-
<!-- markdownlint-enable -->
129-
<!-- prettier-ignore-end -->
130-
<!-- ALL-CONTRIBUTORS-LIST:END -->
32+
Copyright (c) Nuxt Community
13133

132-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
13334

13435
<!-- Badges -->
13536
[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/mdx/latest.svg

docs/content/en/guide/setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ category: Guide
77

88
## Installation
99

10+
> Requires a minimum Nuxt version of v2.10.0. See [nuxt/nuxt.js#5854](https://github.com/nuxt/nuxt.js/pull/5854)
11+
1012
Add `@nuxtjs/mdx` as a development dependency to your project:
1113

1214
<code-group>

docs/content/en/guide/usage.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,7 @@ You can also import `.mdx` files as inside other Vue components.
5353
<template>
5454
<div>
5555
<!-- 👇🏽 MDX file is parsed as Vue component -->
56-
<MyMDXComponent />
56+
<hello />
5757
</div>
5858
</template>
59-
60-
<script>
61-
import MyMDXComponent from '~/components/MyMDXComponent.mdx'
62-
63-
export default {
64-
components: {
65-
MyMDXComponent
66-
}
67-
}
68-
</script>
6959
```

0 commit comments

Comments
 (0)