Skip to content

Conversation

ethanshar
Copy link
Collaborator

Description

I want to create (in private) some api.json files that will be part of the services section (not components)
I updated the build script to create relevant md files in a separate (services) folder

Changelog

N/A

Additional info

}

fs.writeFileSync(`${dirPath}/${component.name}.md`, content, {encoding: 'utf8'});
fs.writeFileSync(`${dirPath}/${component.name.replaceAll(' ', '_')}.md`, content, {encoding: 'utf8'});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the replaceAll here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Docusaurus read the md files, they can't have spaces in them
Usually the components names (in api.json) are one word
Now that I want to support building other types of md files, the name doesn't represent just components name.
for example in the private PR I have a file with a name of RNN TopBar

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Thanks

@Inbal-Tish Inbal-Tish assigned ethanshar and unassigned Inbal-Tish Dec 11, 2024
@Inbal-Tish
Copy link
Collaborator

@ethanshar Looks good, small question in the comments

@Inbal-Tish Inbal-Tish merged commit b1ceef4 into master Dec 11, 2024
1 check passed
@Inbal-Tish Inbal-Tish deleted the infra/services_docs_build branch December 11, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants