Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Commit 6d8fdb9

Browse files
authored
docs docs (#150)
* docs docs * changes * a bit experimental * bad idea * all fixed * and now corrected
1 parent 0cf7b35 commit 6d8fdb9

File tree

10 files changed

+61
-33
lines changed

10 files changed

+61
-33
lines changed

README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# Brisk Docs
22

3-
## A cute slogan goes here
3+
> Tools to document your mono-repos and React Packages
44
5-
TODO: Explain all this
5+
Brisk is an Atlassian Initiative to help with documenting code. It contains two main parts:
66

7-
## Getting running
7+
## [The Brisk Website Generator](./packages/website)
88

9-
```
10-
yarn global add bolt
11-
bolt
12-
```
9+
This is packaged as `@brisk-docs/website` and is designed as an all-inclusive documentation
10+
tool for mono-repos containing react components and other packages. Check out [its documentation](./packages/website)
11+
for more information on how to use it.
1312

14-
This should install and link all the `node_modules`
13+
## Support Packages
14+
15+
As part of being maximally useful, we want to make sure where possible, our helper components exist as
16+
their own packages. As such, there are a number of other libraries we maintain that you might be interested
17+
in, even if you don't need the complete set of things that brisk does:
18+
19+
- [file viewer](./packages/file-viewer) - simple package to run a live component example alongside displaying its code
20+
- [react changelogs]('./packages/react-changelogs) - Component that accepts raw changelog files and formats them for display. Allows filtering to semver versions
21+
- [extract-react-types](https://extract-react-types.com/) - a way to extract and display types for components, works on both flow and typescript
22+
- [codesandboxer](https://github.com/codesandbox/codesandboxer) - Deploy a single file to codesandbox to make your code easy to share and collaborate on - can be used from node or from within a react app

docs.config.js

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
const docs = [
2+
{
3+
path: './docs',
4+
name: 'Docs',
5+
description:
6+
'Information about brisk as a whole, and contributing to brisk',
7+
},
8+
];
9+
10+
if (process.env && process.env.HEAD !== 'production') {
11+
docs.push({
12+
path: './example-pages',
13+
name: 'Example Pages',
14+
description: 'This is a collection of example pages for how pages ',
15+
});
16+
}
17+
118
module.exports = () => ({
219
siteName: 'Brisk Docs Docs',
320
packages: ['./packages/*'],
421
showSubExamples: true,
5-
docs: [
6-
{
7-
path: './docs',
8-
name: 'Docs',
9-
description: 'View the documents for this project',
10-
},
11-
{
12-
path: './guides',
13-
name: 'Guides',
14-
description: 'View the guides for this project',
15-
},
16-
],
22+
docs,
1723
});

docs/contributing.md

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ In a PR we expect:
1010

1111
- tests to demonstrate your change.
1212
- a changeset to document your change (run `bolt changeset` and it will walk you through making a changeset). If you want to know more about changesets, read the documentation on our [release process](./release-process.md)
13-

docs/getting-started.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Getting started
22

3+
> This document is for deving on this mono-repo. For information on using brisk in your own project see the [@brisk-docs/website documentation](../packages/website)
4+
35
This project is a monorepo of several packages which can be managed using bolt.
46
Before starting your work on any of the packages make sure you run:
57

@@ -20,14 +22,6 @@ bolt docs
2022

2123
We use Jest for unit testing and Cypress for integration tests.
2224

23-
To run unit tests across the entire project:
24-
2525
```sh
2626
bolt test
2727
```
28-
29-
or for a single package:
30-
31-
```sh
32-
bolt w <package name> test
33-
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/website/README.md

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Brisk Docs website generator
22

33
Brisk Docs is a package oriented documentation system that lets you write useful, interactive
4-
docs alongside your code.
4+
docs alongside your code. It is aimed at documenting packages in a mono-repo
55

66
## Getting started
77

@@ -11,16 +11,16 @@ Start by installing Brisk Docs in your project
1111
npm install @brisk-docs/website
1212
```
1313

14-
To start your docs website locally, simply run:
14+
To start your docs website locally:
1515

1616
```shell
1717
npm run brisk dev
1818
```
1919

20-
To produce a static build of the website that can be hosted:
20+
To produce a static build of the website that can be statically hosted:
2121

2222
```shell
23-
npm run brisk export:
23+
npm run brisk build && npm run brisk export:
2424
```
2525

2626
## Organising your documentation
@@ -36,3 +36,24 @@ For guides and docs relating to your project or repository as a whole, Brisk Doc
3636
Brisk Docs has first class support for multi-package repos. All packages found in the `/packages` directory of your project will have documentation generated automatically.
3737

3838
Read more about package documentation in our [package documentation guide.](./docs/writing-package-docs)
39+
40+
## Using MDX
41+
42+
MDX means that we parse markdown a little differently, and treat jsx blocks as react components.
43+
44+
This means that you can write:
45+
46+
```mdxjs
47+
# Just a regular markdown package
48+
49+
import MyComponent from './src/myComponent'
50+
51+
<MyComponent>I could not be expressed just with markdown<.MyComponent>
52+
53+
Just some more _regular_ markdown here.
54+
```
55+
56+
In addition to being able to render any markdown, brisk provides two components that can be used on any
57+
page without being imported.
58+
59+
They are `<Props />` and `<FileViewer />` - these are exports of [pretty-proptypes](https://github.com/atlassian/extract-react-types/tree/master/packages/pretty-proptypes) and [file-viewer](../../packages/file-viewer)

0 commit comments

Comments
 (0)