Skip to content

Commit

Permalink
Components: Prevent generated readmes duplicating h1 elements when pu…
Browse files Browse the repository at this point in the history
…blished (WordPress#66180)

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
  • Loading branch information
4 people authored Oct 17, 2024
1 parent b8bfe71 commit 6e764be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/api-docs/gen-components-docs/markdown/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { generateMarkdownPropsJson } from './props.mjs';

export function generateMarkdownDocs( { typeDocs, subcomponentTypeDocs } ) {
const mainDocsJson = [
'<!-- This file is generated automatically and cannot be edited directly. -->\n',
{ h1: typeDocs.displayName },
'<!-- This file is generated automatically and cannot be edited directly. Make edits via TypeScript types and TSDocs. -->',
{
p: `<p class="callout callout-info">See the <a href="https://wordpress.github.io/gutenberg/?path=/docs/components-${ typeDocs.displayName.toLowerCase() }--docs">WordPress Storybook</a> for more detailed, interactive documentation.</p>`,
},
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/alignment-matrix-control/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- This file is generated automatically and cannot be edited directly. -->

# AlignmentMatrixControl

<!-- This file is generated automatically and cannot be edited directly. Make edits via TypeScript types and TSDocs. -->

<p class="callout callout-info">See the <a href="https://wordpress.github.io/gutenberg/?path=/docs/components-alignmentmatrixcontrol--docs">WordPress Storybook</a> for more detailed, interactive documentation.</p>

Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/angle-picker-control/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- This file is generated automatically and cannot be edited directly. -->

# AnglePickerControl

<!-- This file is generated automatically and cannot be edited directly. Make edits via TypeScript types and TSDocs. -->

<p class="callout callout-info">See the <a href="https://wordpress.github.io/gutenberg/?path=/docs/components-anglepickercontrol--docs">WordPress Storybook</a> for more detailed, interactive documentation.</p>

Expand Down

0 comments on commit 6e764be

Please sign in to comment.