Skip to content

[docs] Fix demo links for new util components#10337

Merged
oliviertassinari merged 2 commits into
mui:v1-betafrom
jprince:fix-util-demo-links
Feb 18, 2018
Merged

[docs] Fix demo links for new util components#10337
oliviertassinari merged 2 commits into
mui:v1-betafrom
jprince:fix-util-demo-links

Conversation

@jprince

@jprince jprince commented Feb 17, 2018

Copy link
Copy Markdown

In ed76e11, released in v1.0.0-beta.34, several components were moved into the utils section. When making that change, a few links from component API docs to their demos were broken.

@oliviertassinari

Copy link
Copy Markdown
Member

I'm looking into it.

@jprince

jprince commented Feb 17, 2018

Copy link
Copy Markdown
Author

@oliviertassinari oh ok. The build tipped me off that I shouldn't have modified the .md files directly, so I was closing while revisiting the approach. But 👍if you're on it. Thanks!

@oliviertassinari oliviertassinari added type: bug It doesn't behave as expected. docs Improvements or additions to the documentation. labels Feb 17, 2018
@oliviertassinari oliviertassinari changed the title Fix demo links for new util components [docs] Fix demo links for new util components Feb 17, 2018
@mbrookes

Copy link
Copy Markdown
Member

@jprince It's already fixed in #10288, but @oliviertassinari is going to generalize the approach.

@oliviertassinari oliviertassinari self-assigned this Feb 18, 2018
@oliviertassinari

Copy link
Copy Markdown
Member

Alright, I have found an elegant solution: consistency with the folder structure 👌.

}
let pathname = itemPath.replace(new RegExp(`\\${path.sep}`, 'g'), '/').replace(/^.*\/pages/, '').replace('.md', '');

if (pathname.indexOf('/demos') === 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code branch is no longer needed.

Comment thread .circleci/config.yml
# This isn't user facing code.
# Let's take advantage of the most up to date node version.
docker:
- image: circleci/node:9.4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

60% speed up

@oliviertassinari
oliviertassinari merged commit df43762 into mui:v1-beta Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants