Skip to content

Commit

Permalink
Update protocol doc generation to .mdx
Browse files Browse the repository at this point in the history
Has inline JSX, and the next major version of Docusaurus will render
.md and .mdx files differently.
  • Loading branch information
danbarr committed Jan 22, 2025
1 parent b0145f2 commit 050571b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/database/mock/*.go linguist-generated=true
/docs/docs/ref/cli/*.md linguist-generated=true
/docs/docs/ref/schema.md linguist-generated=true
/docs/docs/ref/proto.md linguist-generated=true
/docs/docs/ref/proto.mdx linguist-generated=true
/pkg/api/openapi/** linguist-generated=true
/pkg/api/protobuf/go/minder/v1/*.pb.go linguist-generated=true
/pkg/api/protobuf/go/minder/v1/*.gw.go linguist-generated=true
Expand Down
2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ plugins:
# https://github.com/pseudomuto/protoc-gen-doc/issues/513
# buf.build/community/pseudomuto-doc:v1.5.1
out: docs/docs/ref
opt: "docs/proto_template.tmpl,proto.md:internal.proto"
opt: "docs/proto_template.tmpl,proto.mdx:internal.proto"
8 changes: 1 addition & 7 deletions docs/.markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"gitignore": true,
"globs": ["**/*.md"],
"ignores": [
"node_modules/",
".docusaurus",
"build/",
"docs/ref/cli/",
"docs/ref/proto.md",
],
"ignores": ["node_modules/", ".docusaurus", "build/", "docs/ref/cli/"],
}
2 changes: 1 addition & 1 deletion docs/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ build/

# Auto-generated files
docs/ref/cli/*.md
docs/ref/proto.md
docs/ref/proto.mdx
2 changes: 1 addition & 1 deletion docs/docs/ref/proto.md → docs/docs/ref/proto.mdx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions docs/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ import * as mdx from 'eslint-plugin-mdx';
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: [
'.docusaurus/',
'build/',
'import/',
'docs/minder/',
'node_modules/',
],
ignores: ['.docusaurus/', 'build/', 'node_modules/', 'docs/ref/proto.mdx'],
},
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { globals: globals.node } },
Expand Down
2 changes: 1 addition & 1 deletion docs/proto_template.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 60
title: Protocol documentation
sidebar_position: 60
toc_max_heading_level: 4
---

Expand Down

0 comments on commit 050571b

Please sign in to comment.