Skip to content

Commit 24e4797

Browse files
authored
Write a basic README (#111)
1 parent 797d014 commit 24e4797

File tree

1 file changed

+66
-62
lines changed

1 file changed

+66
-62
lines changed

README.md

Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,78 @@
1-
<p align="center">
2-
<a href="https://www.gatsbyjs.com">
3-
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
4-
</a>
5-
</p>
6-
<h1 align="center">
7-
Starter for creating a Gatsby Theme workspace
8-
</h1>
9-
10-
```shell
11-
gatsby new my-theme https://github.com/gatsbyjs/gatsby-starter-theme-workspace
12-
cd my-theme
13-
yarn workspace example develop
14-
```
1+
# Gatsby Theme: Iterative
152

16-
## Layout
17-
18-
```text
19-
.
20-
├── README.md
21-
├── gatsby-theme-minimal
22-
│   ├── README.md
23-
│   ├── gatsby-config.js
24-
│   ├── index.js
25-
│   └── package.json
26-
├── example
27-
│   ├── README.md
28-
│   ├── gatsby-config.js
29-
│   ├── package.json
30-
│   └── src
31-
├── package.json
32-
└── yarn.lock
33-
34-
3 directories, 10 files
35-
```
3+
This Gatsby Theme houses the shared website code for all websites for
4+
[Iterative](https://iterative.ai). This package is currently purpose-built
5+
specifically for our websites and not very useful outside of them, but we intend
6+
to change that as we make improvements and iron out issues!
367

37-
### `gatsby-theme-minimal`
8+
## Usage
389

39-
This directory is the theme package itself. You should rename this at some point
40-
to be `gatsby-theme-{my-theme-name}`. Also change the `package.json` name field
41-
and the corresponding dependency in the example directory's
42-
`package.json`/`gatsby-config.js` to match the chosen name.
10+
### Options
4311

44-
- `gatsby-theme-minimal/`
45-
- `gatsby-config.js`: An empty gatsby-config that you can use as a starting
46-
point for building functionality into your theme.
47-
- `index.js`: Since themes also function as plugins, this is an empty file
48-
that gatsby needs to use this theme as a plugin.
49-
- `package.json`: The dependencies that your theme will pull in when people
50-
install it. `gatsby` should be a `peerDependency`.
12+
- disable: boolean Default: Boolean(process.env.SKIP_DOCS)
5113

52-
### `example`
14+
- getTemplate: function Default: () => defaultGetTemplate
5315

54-
This is an example usage of your theme. It should look the same as the site of
55-
someone who installed and used your theme from npm.
16+
- defaultTemplate: string Default: require.resolve('./src/templates/doc.tsx')
5617

57-
- `example/`
58-
- `gatsby-config.js`: Specifies which theme to use and any other one-off
59-
config a site might need.
60-
- `src/`: Source code such as one-off pages or components that might live in a
61-
user's site.
18+
- remark: boolean Default: true
6219

63-
You can run the example with:
20+
- filesystem: boolean Default: true
6421

65-
```shell
66-
yarn workspace example develop
67-
```
22+
- glossaryDirectory: string Default: 'docs/user-guide/basic-concepts'
23+
24+
- simpleLinkerTerms: { matches: string, url: string }[] These terms will be
25+
passed to the simpleLinker remark plugin
26+
27+
- cssBase: string Used as base files for global PostCSS variables and queries
28+
29+
- customMediaConfig: object config passed to `postcss-custom-media`
6830

69-
## 🚀 Quick start (Gatsby Cloud)
31+
- customPropertiesConfig: object config passed to `postcss-custom-properties`
7032

71-
Deploy this starter with one click on
72-
[Gatsby Cloud](https://www.gatsbyjs.com/cloud/):
33+
- colorModConfig: object config passed to `postcss-color-mod`
7334

74-
[<img src="https://www.gatsbyjs.com/deploynow.svg" alt="Deploy to Gatsby Cloud">](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-theme-workspace)
35+
- postCssPlugins: Plugin[] If specified, this array will completely replace
36+
plugins this theme passes to PostCSS. This is mostly an escape hatch for if
37+
styles are broken with the default plugins. Check out
38+
[the theme's `gatsby-config`](https://github.com/iterative/gatsby-theme-iterative/blob/main/packages/gatsby-theme-iterative/gatsby-config.js)
39+
to see the default plugins, as not having them in this option will very likely
40+
break core functionality.
41+
42+
### Examples
43+
44+
See this example from
45+
[the example website's `gatsby-config.js`](https://github.com/iterative/gatsby-theme-iterative/blob/main/packages/example/gatsby-config.js).
46+
47+
```js
48+
const path = require('path')
49+
const {
50+
name: themePackageName
51+
} = require('../gatsby-theme-iterative/package.json')
52+
53+
module.exports = {
54+
trailingSlash: 'never',
55+
siteMetadata: {
56+
title: 'Example website',
57+
description: 'Example website description',
58+
keywords: ['docs', 'test'],
59+
siteUrl: 'http://localhost:8000'
60+
},
61+
plugins: [
62+
{
63+
resolve: themePackageName,
64+
options: {
65+
simpleLinkerTerms: require('./content/linked-terms')
66+
}
67+
},
68+
{
69+
resolve: 'gatsby-source-filesystem',
70+
options: {
71+
name: 'images',
72+
path: path.join(__dirname, 'static', 'img')
73+
}
74+
},
75+
'@sentry/gatsby'
76+
]
77+
}
78+
```

0 commit comments

Comments
 (0)