Skip to content

[docs] Option to disable ads#22574

Merged
oliviertassinari merged 1 commit into
mui:nextfrom
oliviertassinari:docs-option-hide-ads
Sep 13, 2020
Merged

[docs] Option to disable ads#22574
oliviertassinari merged 1 commit into
mui:nextfrom
oliviertassinari:docs-option-hide-ads

Conversation

@oliviertassinari

@oliviertassinari oliviertassinari commented Sep 12, 2020

Copy link
Copy Markdown
Member

Ads are meant to sustain the MIT licensed code. I don't think that it makes sense to keep them for code released under a paid commercial license. This change allows https://github.com/mui-org/material-ui-x to disable ads, where relevant.

Usage example:

diff --git a/docs/pages/components/alert.js b/docs/pages/components/alert.js
index caeeb16f23..54f9f2bec9 100644
--- a/docs/pages/components/alert.js
+++ b/docs/pages/components/alert.js
@@ -11,7 +11,7 @@ const requireRaw = require.context(
 );

 export default function Page({ demos, docs }) {
-  return <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
+  return <MarkdownDocs demos={demos} docs={docs} disableAd requireDemo={requireDemo} />;
 }

 Page.getInitialProps = () => {
diff --git a/docs/src/pages/components/alert/alert.md b/docs/src/pages/components/alert/alert.md
index f77f0250f8..5209e349ae 100644
--- a/docs/src/pages/components/alert/alert.md
+++ b/docs/src/pages/components/alert/alert.md
@@ -18,7 +18,7 @@ waiAria: https://www.w3.org/TR/wai-aria-practices/#alert

 The alert offers four severity levels that set a distinctive icon and color.

-{{"demo": "pages/components/alert/SimpleAlerts.js"}}
+{{"demo": "pages/components/alert/SimpleAlerts.js", "disableAd": true}}

 ## Description

Hopefully, one day, we will be able to kill all the ads.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation. label Sep 12, 2020
@mui-pr-bot

Copy link
Copy Markdown

No bundle size changes comparing e4d6eac...2996d22

Generated by 🚫 dangerJS against 2996d22

@oliviertassinari
oliviertassinari merged commit 4f502ce into mui:next Sep 13, 2020
@oliviertassinari
oliviertassinari deleted the docs-option-hide-ads branch September 13, 2020 09:22
oliviertassinari added a commit that referenced this pull request Sep 13, 2020
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants