Skip to content

Webpages multi page output#1943

Merged
joshcarp merged 9 commits intomainfrom
joshcarp/multi-page-output
Mar 27, 2023
Merged

Webpages multi page output#1943
joshcarp merged 9 commits intomainfrom
joshcarp/multi-page-output

Conversation

@joshcarp
Copy link
Contributor

Changes:

  • Addition of SlugPrefix and OutputDir fields to the webpagesConfig struct to allow for better customization of the generated markdown output.
  • Modification of the generateMarkdownTree function to create the required directories and files for each command and its subcommands, organizing the output in a more structured manner.
  • Refactoring of the generateMarkdownPage function to make the generated markdown files follow a more standardized format, including slug, sidebar position, and sidebar label.
  • Addition of the websiteSlug and sidebarLabel functions to handle the generation of the slug and sidebar label for each command.
tree structure
.
└── buf
    ├── beta
    │   ├── _category.json
    │   ├── index.md
    │   ├── migrate-v1beta1.md
    │   ├── price.md
    │   ├── registry
    │   │   ├── commit
    │   │   │   ├── get.md
    │   │   │   ├── index.md
    │   │   │   └── list.md
    │   │   ├── draft
    │   │   │   ├── delete.md
    │   │   │   ├── index.md
    │   │   │   └── list.md
    │   │   ├── index.md
    │   │   ├── organization
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── get.md
    │   │   │   └── index.md
    │   │   ├── plugin
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── deprecate.md
    │   │   │   ├── index.md
    │   │   │   ├── list.md
    │   │   │   ├── undeprecate.md
    │   │   │   └── version
    │   │   │       ├── index.md
    │   │   │       └── list.md
    │   │   ├── repository
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── deprecate.md
    │   │   │   ├── get.md
    │   │   │   ├── index.md
    │   │   │   ├── list.md
    │   │   │   ├── undeprecate.md
    │   │   │   └── update.md
    │   │   ├── tag
    │   │   │   ├── create.md
    │   │   │   ├── index.md
    │   │   │   └── list.md
    │   │   ├── template
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── deprecate.md
    │   │   │   ├── index.md
    │   │   │   ├── list.md
    │   │   │   ├── undeprecate.md
    │   │   │   └── version
    │   │   │       ├── create.md
    │   │   │       ├── index.md
    │   │   │       └── list.md
    │   │   └── webhook
    │   │       ├── create.md
    │   │       ├── delete.md
    │   │       ├── index.md
    │   │       └── list.md
    │   └── studio-agent.md
    ├── breaking.md
    ├── build.md
    ├── convert.md
    ├── curl.md
    ├── export.md
    ├── format.md
    ├── generate.md
    ├── index.md
    ├── lint.md
    ├── mod
    │   ├── clear-cache.md
    │   ├── index.md
    │   ├── init.md
    │   ├── ls-breaking-rules.md
    │   ├── ls-lint-rules.md
    │   ├── open.md
    │   ├── prune.md
    │   └── update.md
    ├── push.md
    └── registry
        ├── index.md
        ├── login.md
        └── logout.md

15 directories, 69 files

@joshcarp joshcarp requested a review from bufdev March 27, 2023 21:23
@joshcarp joshcarp merged commit 53462bd into main Mar 27, 2023
@joshcarp joshcarp deleted the joshcarp/multi-page-output branch March 27, 2023 21:55
Monirul1 pushed a commit to Monirul1/buf that referenced this pull request Apr 30, 2023
Changes:
- Addition of SlugPrefix and OutputDir fields to the webpagesConfig
struct to allow for better customization of the generated markdown
output.
- Modification of the generateMarkdownTree function to create the
required directories and files for each command and its subcommands,
organizing the output in a more structured manner.
- Refactoring of the generateMarkdownPage function to make the generated
markdown files follow a more standardized format, including slug,
sidebar position, and sidebar label.
- Addition of the websiteSlug and sidebarLabel functions to handle the
generation of the slug and sidebar label for each command.

<details>
 <summary>tree structure</summary>

```
.
└── buf
    ├── beta
    │   ├── _category.json
    │   ├── index.md
    │   ├── migrate-v1beta1.md
    │   ├── price.md
    │   ├── registry
    │   │   ├── commit
    │   │   │   ├── get.md
    │   │   │   ├── index.md
    │   │   │   └── list.md
    │   │   ├── draft
    │   │   │   ├── delete.md
    │   │   │   ├── index.md
    │   │   │   └── list.md
    │   │   ├── index.md
    │   │   ├── organization
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── get.md
    │   │   │   └── index.md
    │   │   ├── plugin
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── deprecate.md
    │   │   │   ├── index.md
    │   │   │   ├── list.md
    │   │   │   ├── undeprecate.md
    │   │   │   └── version
    │   │   │       ├── index.md
    │   │   │       └── list.md
    │   │   ├── repository
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── deprecate.md
    │   │   │   ├── get.md
    │   │   │   ├── index.md
    │   │   │   ├── list.md
    │   │   │   ├── undeprecate.md
    │   │   │   └── update.md
    │   │   ├── tag
    │   │   │   ├── create.md
    │   │   │   ├── index.md
    │   │   │   └── list.md
    │   │   ├── template
    │   │   │   ├── create.md
    │   │   │   ├── delete.md
    │   │   │   ├── deprecate.md
    │   │   │   ├── index.md
    │   │   │   ├── list.md
    │   │   │   ├── undeprecate.md
    │   │   │   └── version
    │   │   │       ├── create.md
    │   │   │       ├── index.md
    │   │   │       └── list.md
    │   │   └── webhook
    │   │       ├── create.md
    │   │       ├── delete.md
    │   │       ├── index.md
    │   │       └── list.md
    │   └── studio-agent.md
    ├── breaking.md
    ├── build.md
    ├── convert.md
    ├── curl.md
    ├── export.md
    ├── format.md
    ├── generate.md
    ├── index.md
    ├── lint.md
    ├── mod
    │   ├── clear-cache.md
    │   ├── index.md
    │   ├── init.md
    │   ├── ls-breaking-rules.md
    │   ├── ls-lint-rules.md
    │   ├── open.md
    │   ├── prune.md
    │   └── update.md
    ├── push.md
    └── registry
        ├── index.md
        ├── login.md
        └── logout.md

15 directories, 69 files

```

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants