Skip to content

Commit ddbfa83

Browse files
committed
improve website contribution docs
1 parent 331c10a commit ddbfa83

File tree

1 file changed

+58
-24
lines changed

1 file changed

+58
-24
lines changed

docs/user/contributing.md

Lines changed: 58 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,48 @@ We encourage you to contribute to conda-forge. You can do so in several ways:
1515
- [Contribute new packages](../maintainer/adding_pkgs.md).
1616
- Help update and [maintain packages](../maintainer/updating_pkgs.md).
1717
- Suggest or implement improvements for our [infrastructure](../maintainer/infrastructure.md).
18-
- Help [improve the documentation](#improve-docs).
18+
- Help [improve the website and documentation](#improve-the-website).
1919

2020
<a id="improve-docs"></a>
2121

22-
<a id="improve-the-documentation"></a>
22+
## Improve the website
2323

24-
## Improve the documentation
24+
The conda-forge website is version-controlled in the
25+
[conda-forge.github.io repository](https://github.com/conda-forge/conda-forge.github.io) on GitHub.
26+
It is built with [Docusaurus](https://docusaurus.io).
2527

26-
The conda-forge documentation is version-controlled in the
27-
[conda-forge.github.io repository](https://github.com/conda-forge/conda-forge.github.io) on GitHub. The source
28-
text is stored in [the `docs/` subdirectory](https://github.com/conda-forge/conda-forge.github.io/tree/main/docs of this repository and
29-
is formatted using [Docusaurus' Markdown](https://docusaurus.io/docs/markdown-features).
28+
### Website repository structure
29+
30+
:::info MD, MDX and JSX
31+
While most of the content is written with
32+
[Docusaurus' Markdown](https://docusaurus.io/docs/markdown-features) (`*.md` files),
33+
some specific pages and sections include dynamic blocks (`*.mdx` files) or are straight JSX files
34+
(`*.jsx` files). This allows you to mix Markdown and JavaScript/React in the same document,
35+
depending on the file extension. In MDX mode, the parser is much stricter though.
36+
Read more about in the ["MDX and React" docs from Docusaurus](https://docusaurus.io/docs/markdown-features/react).
37+
:::
38+
39+
#### Docs & Community
40+
41+
- These two sections use [`plugin-content-docs`](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs).
42+
- The **Docs** section corresponds to the `/docs` directory. Most of the pages use regular Markdown
43+
(`*.md`), but some are dynamic pages with some JavaScript (`*.mdx`).
44+
- The **Community** section comes from the `/community` directory.
45+
46+
#### News & blog
47+
48+
- These two sections use [`plugin-content-blog`](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
49+
- The **News** section comes from the `/news` directory.
50+
It is considered a changelog of important changes in our infrastructure and packages.
51+
- The **Blog** section corresponds to the `/blog` directory.
52+
It usually discusses important updates from the extended ecosystem.
53+
54+
#### Standalone pages and sections
55+
56+
- These rely on [`plugin-content-pages`](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-pages).
57+
- They can be simple Markdown pages or more elaborate React applications.
58+
- Find them under `/src/pages`. MDX and JSX pages will usually call components defined in `/src/components`.
3059

31-
<a id="editing-the-documentation-directly-through-github"></a>
3260

3361
### Editing the documentation directly through Github
3462

@@ -38,8 +66,6 @@ will take you directly to a web-based editor for this very webpage. In
3866
general, the file corresponding to each page in the GitHub browser has a
3967
little pencil icon in its top-right corner that lets you open it up for editing.
4068

41-
<a id="editing-the-documentation-locally"></a>
42-
4369
### Editing the documentation locally
4470

4571
We are glad to know that you would like to contribute to the conda-forge documentation.
@@ -48,29 +74,37 @@ If you are new to the conda-forge community, follow the steps below to make your
4874
1. [Fork](https://help.github.com/articles/fork-a-repo/) the
4975
[conda-forge.github.io repository](https://github.com/conda-forge/conda-forge.github.io).
5076
2. Clone this fork onto your local machine:
51-
- `git clone https://github.com/<your-username>/conda-forge.github.io.git`
52-
- `cd conda-forge.github.io`
77+
```
78+
git clone https://github.com/<your-username>/conda-forge.github.io.git
79+
cd conda-forge.github.io
80+
```
5381
3. Create a new branch deriving from `main` to do your work:
54-
- `git checkout -b <new-branch-name>`
82+
```
83+
git checkout -b <new-branch-name>
84+
```
5585
4. Run the following commands:
56-
- `conda env create -f ./.ci_scripts/environment.yml`
57-
- `conda activate conda-forge-docs`
86+
```
87+
conda env create -f ./.ci_scripts/environment.yml
88+
```
89+
conda activate conda-forge-docs
5890
5. While writing your new documentation, you can use the live preview mode with:
5991
- `npm install` to make sure `node_modules` is up-to-date
60-
- `npm run start` to start the live preview. Every time you save a file, the changes will be reflected instantaneously!
61-
6. Once ready, you can also check how the production build would look like with the command:
62-
- `.ci_scripts/update_docs`
63-
You can check the changes locally by opening the html files in `build/` or running:
64-
- `python -m http.server --directory build/`
92+
- `npm run start` to start the live preview. Every time you save a file, the changes will be reflected instantaneously.
93+
6. Once ready, you can also check how the production build would look like with the commands:
94+
```
95+
.ci_scripts/update_docs
96+
python -m http.server --directory build/
97+
```
6598
7. Add and commit your changes:
66-
- `git add .`
67-
- `git commit -m "your commit message"`
99+
```
100+
git add .
101+
git commit -m "your commit message"
102+
```
68103
8. Submit a [pull request](https://help.github.com/articles/about-pull-requests/) to the main repository proposing your changes.
104+
The CI pipelines will include a PR preview on Netlify.
69105

70106
Happy contributing!
71107

72-
<a id="writing-guidelines"></a>
73-
74108
### Writing guidelines
75109

76110
Some basic writing guidelines should be kept in mind before you start contributing:

0 commit comments

Comments
 (0)