Skip to content

[apidocs] Improve file detection and updates toc.yaml #936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2021
Merged

Conversation

mbleigh
Copy link
Contributor

@mbleigh mbleigh commented Aug 10, 2021

No description provided.

Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

Thanks!

One question on const devsitePath.

@@ -198,7 +198,10 @@ async function checkForMissingFilesAndFixFilenameCase(tocText) {
const filenames = tocText
.split('\n')
.filter((line) => line.includes('path:'))
.map((line) => line.split(devsitePath)[1].replace(/#.*$/, ''));
.map((line) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow I would have had no idea how to refactor that.

Do we need to update the value for 'const devsitePath' as well? Or does this basically override that and extrapolate it from the toc.yaml file (which makes a lot of sense, since that is in a versioned directory that can be updated as we go)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only other thing devsitePath feeds is _toc_autogenerated.yaml which I'm not sure if you use. That being said, I now fork devsitePath based on version.

@mbleigh mbleigh merged commit de94b78 into master Aug 11, 2021
@mbleigh mbleigh deleted the mb-docs-toc branch August 11, 2021 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants