Skip to content

Commit d6fbec0

Browse files
committed
Webiste registry adjustments
1 parent 82ba394 commit d6fbec0

File tree

9 files changed

+3273
-3759
lines changed

9 files changed

+3273
-3759
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
plugin_packages/
44

55
# Generated website pages
6-
website/docs/registry/*
6+
website/docs/registry-generated/*
77

88
# Logs
99
logs

scripts/docs.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ import { CodeshiftConfig } from '@codeshift/types';
66
import { fetchConfig } from '@codeshift/fetcher';
77

88
const COMMUNITY_PATH = path.join(__dirname, '..', 'community');
9-
const DOCS_PATH = path.join(__dirname, '..', 'website', 'docs', 'registry');
9+
const DOCS_PATH = path.join(
10+
__dirname,
11+
'..',
12+
'website',
13+
'docs',
14+
'registry-generated',
15+
);
1016

1117
function cleanTargetDir(targetPath: string) {
1218
if (fs.existsSync(targetPath)) fs.emptyDirSync(targetPath);
@@ -47,12 +53,13 @@ async function main() {
4753
`---
4854
id: ${safeName}
4955
title: ${safeName.replace('__', '/')}
50-
slug: /${safeName}
56+
slug: /registry/${safeName}
5157
---
5258
5359
**Target package:** ${packageLink}
5460
5561
**Maintainers:**
62+
5663
${config.maintainers!.map(
5764
maintainer => `- [${maintainer}](https://github.com/${maintainer})`,
5865
)}
@@ -70,7 +77,7 @@ ${Object.keys(config.transforms)
7077
7178
Migrates ${packageLink} to version ${key}.
7279
73-
### Usage
80+
#### Usage
7481
7582
\`\`\`
7683
$ codeshift --packages ${name}@${key} path/to/source
@@ -93,7 +100,7 @@ ${Object.keys(config.presets)
93100
94101
[Source](https://github.com/CodeshiftCommunity/CodeshiftCommunity/tree/main/community/${urlSafeName}) | [Report an issue](https://github.com/CodeshiftCommunity/CodeshiftCommunity/issues/new?title=${safeName}@${key})
95102
96-
### Usage
103+
#### Usage
97104
98105
\`\`\`
99106
$ codeshift --packages ${name}#${key} path/to/source

website/docs/authoring.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Use this method if you want:
2323
- Your codemods to be open source
2424
- Build tooling, dependency management and project setup to be handled for you
2525
- The community to help maintain and contribute to your codemods
26-
- Documentation to be automatically generated and available on the [Regisistry page](atlaskit__avatar)
26+
- Documentation to be automatically generated and available on the [Regisistry page](registry)
2727

2828
Do not use this method if:
2929

@@ -46,7 +46,7 @@ Use this method if you want:
4646

4747
Do not use this method if:
4848

49-
- You want docs to be automatically generated and available on the [Regisistry page](atlaskit__avatar)
49+
- You want docs to be automatically generated and available on the [Regisistry page](registry)
5050

5151
## 3. Create a stand-alone codeshift package
5252

website/docs/contribution.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This page covers contribution to the [Community Folder](https://github.com/Codes
99
- Codemods to be open source
1010
- Build tooling, dependency management and project setup to be handled for you
1111
- The community to help maintain and contribute to your codemods
12-
- Documentation to be automatically generated and available on the [Regisistry page](atlaskit__avatar)
12+
- Documentation to be automatically generated and available on the [Regisistry page](registry)
1313

1414
If you prefer to create codemods outside of this repo, please see the [Authoring guide](authoring) for other options.
1515

website/docs/registry.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
id: registry
3+
title: Registry
4+
slug: /registry
5+
---
6+
7+
Welcome to the CodeshiftCommunity Registry. Here we list community owned and maintained Codeshift packages.
8+
9+
Source for these packages are located in the repository [/community folder](https://github.com/CodeshiftCommunity/CodeshiftCommunity/tree/main/community).
10+
11+
To contribute to the Registry please see the [Contribution guide](/docs/contribution). For other publishing options, including private codemod packages, please refer to the [Authoring guide](/docs/authoring).

website/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = {
3535
},
3636
{
3737
type: 'doc',
38-
docId: 'registry/atlaskit__avatar',
38+
docId: 'registry',
3939
label: 'Registry',
4040
position: 'left',
4141
},

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.0.0-beta.0",
18-
"@docusaurus/preset-classic": "2.0.0-beta.0",
17+
"@docusaurus/core": "2.0.0-beta.18",
18+
"@docusaurus/preset-classic": "2.0.0-beta.18",
1919
"@mdx-js/react": "^1.6.21",
2020
"clsx": "^1.1.1",
2121
"react": "^17.0.1",

website/sidebars.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
docs: [
33
{
4-
type: 'category',
54
label: 'Getting Started',
5+
type: 'category',
66
collapsed: false,
77
items: [
88
'introduction',
@@ -13,8 +13,8 @@ module.exports = {
1313
],
1414
},
1515
{
16-
type: 'category',
1716
label: 'Docs',
17+
type: 'category',
1818
collapsed: false,
1919
items: [
2020
'authoring',
@@ -27,8 +27,8 @@ module.exports = {
2727
],
2828
},
2929
{
30-
type: 'category',
3130
label: 'Guides',
31+
type: 'category',
3232
collapsed: false,
3333
items: [
3434
'guides/your-first-codemod',
@@ -38,24 +38,37 @@ module.exports = {
3838
],
3939
},
4040
{
41-
type: 'category',
4241
label: 'Recipes',
42+
type: 'category',
4343
collapsed: false,
4444
items: ['recipes/import-manipulation', 'recipes/react'],
4545
},
4646
],
4747
api: [
4848
{
49-
type: 'category',
5049
label: 'Packages',
50+
type: 'category',
51+
collapsible: false,
5152
collapsed: false,
5253
items: ['api/cli', 'api/utils', 'api/test-utils'],
5354
},
5455
],
5556
registry: [
5657
{
57-
dirName: 'registry',
58-
type: 'autogenerated',
58+
label: 'Registry',
59+
type: 'category',
60+
collapsible: false,
61+
collapsed: false,
62+
link: {
63+
type: 'doc',
64+
id: 'registry',
65+
},
66+
items: [
67+
{
68+
dirName: 'registry-generated',
69+
type: 'autogenerated',
70+
},
71+
],
5972
},
6073
],
6174
};

0 commit comments

Comments
 (0)