Skip to content

Commit

Permalink
[docs] Restore search
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 14, 2019
1 parent ddff2bf commit acbf1e3
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
4 changes: 3 additions & 1 deletion docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function initDocsearch() {
apiKey: '1d8534f83b9b0cfea8f16498d19fbcab',
indexName: 'material-ui',
inputSelector: '#docsearch-input',
algoliaOptions: { facetFilters: ['version:master', 'language:en'] },
algoliaOptions: {
facetFilters: ['version:v3', 'language:en'],
},
handleSelected: (input, event, suggestion) => {
const url = suggestion.url
.replace(/^https:\/\/material-ui\.com/, '')
Expand Down
10 changes: 5 additions & 5 deletions docs/src/modules/components/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ function Head(props) {
{/* Twitter */}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@MaterialUI" />
<meta name="twitter:title" content={title} />
<meta name="twitter:title" content={`${title} [v3]`} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content="https://material-ui.com/static/brand.png" />
<meta name="twitter:image" content="https://v3.material-ui.com/static/brand.png" />
{/* Facebook */}
<meta property="og:type" content="website" />
<meta property="og:title" content={title} />
<meta
property="og:url"
content={`https://material-ui.com${_rewriteUrlForNextExport(router.asPath)}`}
content={`https://v3.material-ui.com${_rewriteUrlForNextExport(router.asPath)}`}
/>
<meta property="og:description" content={description} />
<meta property="og:image" content="https://material-ui.com/static/brand.png" />
<meta property="og:image" content="https://v3.material-ui.com/static/brand.png" />
<meta property="og:ttl" content="604800" />
{/* Algolia */}
<meta name="docsearch:language" content="en" />
<meta name="docsearch:version" content="master" />
<meta name="docsearch:version" content="v3" />
</NextHead>
);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/versions/StableVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class StableVersions extends React.Component {
});
// Legacy documentation.
docs.push({
version: 'v0.20.1',
version: 'v0',
url: 'https://v0.material-ui.com',
});
docs = orderBy(docs, 'version', 'desc');
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-hooks/src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import { install } from '@material-ui/styles';
// Behind the scenes, the install() function switches the
// styling engine the core components use.
//
// https://material-ui.com/css-in-js/basics/#migration-for-material-ui-core-users
// https://v3.material-ui.com/css-in-js/basics/#migration-for-material-ui-core-users
install();
2 changes: 1 addition & 1 deletion packages/material-ui/src/Typography/Typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ Typography.propTypes = {
return new Error(
'Material-UI: you are using a deprecated typography variant: ' +
`\`${props.variant}\` that will be removed in the next major release.\n` +
'Please read the migration guide under https://material-ui.com/style/typography#migration-to-typography-v2.',
'Please read the migration guide under https://v3.material-ui.com/style/typography#migration-to-typography-v2.',
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Zoom/Zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const styles = {

/**
* The Zoom transition can be used for the floating variant of the
* [Button](https://material-ui.com/demos/buttons/#floating-action-buttons) component.
* [Button](/demos/buttons/#floating-action-buttons) component.
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
*/
class Zoom extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/createMuiTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function createMuiTheme(options = {}) {
2,
),
'',
'https://material-ui.com/customization/overrides#internal-states',
'https://v3.material-ui.com/customization/overrides#internal-states',
].join('\n'),
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/createTypography.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function createTypography(palette, typography) {
useNextVariants || suppressWarning,
'Material-UI: you are using the deprecated typography variants ' +
'that will be removed in the next major release.' +
'\nPlease read the migration guide under https://material-ui.com/style/typography#migration-to-typography-v2',
'\nPlease read the migration guide under https://v3.material-ui.com/style/typography#migration-to-typography-v2',
);

const coef = fontSize / 14;
Expand Down
2 changes: 1 addition & 1 deletion pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ MyDocument.getInitialProps = async ctx => {
...page,
pageContext,
url: ctx.req.url,
canonical: `https://material-ui.com${ctx.req.url.replace(/\/$/, '')}/`,
canonical: `https://v3.material-ui.com${ctx.req.url.replace(/\/$/, '')}/`,
styles: (
<style
id="jss-server-side"
Expand Down
2 changes: 1 addition & 1 deletion pages/api/zoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Zoom from '@material-ui/core/Zoom';
```

The Zoom transition can be used for the floating variant of the
[Button](https://material-ui.com/demos/buttons/#floating-action-buttons) component.
[Button](/demos/buttons/#floating-action-buttons) component.
It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.

## Props
Expand Down
4 changes: 2 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ class HomePage extends React.Component {
"@context": "http://schema.org",
"@type": "Organization",
"name": "Material-UI",
"url": "https://material-ui.com/",
"logo": "https://material-ui.com/static/brand.png",
"url": "https://v3.material-ui.com/",
"logo": "https://v3.material-ui.com/static/brand.png",
"sameAs": [
"https://twitter.com/materialUI",
"https://github.com/mui-org/material-ui",
Expand Down

0 comments on commit acbf1e3

Please sign in to comment.