Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/polite-aliens-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@open-rpc/markdown-generator": patch
"@open-rpc/docusaurus-plugin": patch
---

Code cleanup and readme updates
9 changes: 5 additions & 4 deletions packages/docusaurus-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ plugins: [

### Options

| Option | Type | Default | Description |
| ----------------- | -------- | ----------------- | -------------------------------------------- |
| `openRPCSpecPath` | `string` | `./openrpc.json` | Path to the OpenRPC JSON specification file |
| `docOutputPath` | `string` | `./api-reference` | Output directory for generated documentation |
| Option | Type | Default | Description |
| ----------------- | --------- | ----------------- | ---------------------------------------------- |
| `openRPCSpecPath` | `string` | `./openrpc.json` | Path to the OpenRPC JSON specification file |
| `docOutputPath` | `string` | `./api-reference` | Output directory for generated documentation |
| `showPoweredBy` | `boolean` | `true` | Show "Powered by OpenRPC" footer on index page |

## Sidebar Configuration

Expand Down
7 changes: 0 additions & 7 deletions packages/docusaurus-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// TODO: Remove this once we have a proper implementation nailed down
/* eslint-disable @typescript-eslint/no-unused-vars */

import logger from "@docusaurus/logger";
Expand Down
Empty file.
4 changes: 1 addition & 3 deletions packages/docusaurus-plugin/src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { promises as fs } from "fs";
import * as path from "path";
import { OpenRPCMdContent } from "@open-rpc/markdown-generator";
import { MethodObjectParamStructure } from "@open-rpc/meta-schema";
import { Options, PluginOptions } from "./options";
import { PluginOptions } from "./options";

type JSONSchema = any;

Expand Down Expand Up @@ -72,11 +72,9 @@ export async function generateDocs(

const outDir = outputPath;
const methodsDir = path.join(outDir, "methods");
const schemasDir = path.join(outDir, "schemas");

await fs.mkdir(outDir, { recursive: true });
await fs.mkdir(methodsDir, { recursive: true });
await fs.mkdir(schemasDir, { recursive: true });

for (const m of methods) {
await fs.writeFile(
Expand Down
2 changes: 0 additions & 2 deletions packages/docusaurus-plugin/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* User-provided plugin options
*/
export type Options = {
// TODO: Add user-configurable options here

openRPCSpecPath: string;
docOutputPath: string;
showPoweredBy: boolean;
Expand Down
290 changes: 0 additions & 290 deletions packages/example-site/sample.md

This file was deleted.

Loading
Loading