Skip to content

Commit

Permalink
[docs] meta updates for search (#8142)
Browse files Browse the repository at this point in the history
* update docs-page-shell, update page-shell; update page meta

* Update react-page-shell.js

* remove contentType from examples page

* Update react-page-shell.js

* Update react-page-shell.js
  • Loading branch information
katydecorah authored Apr 22, 2019
1 parent b32d2ce commit 2aaab27
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 34 deletions.
2 changes: 2 additions & 0 deletions docs/components/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ ${html}

render() {
const {frontMatter} = this.props;
frontMatter.language = ['JavaScript'];
frontMatter.contentType = 'example';
return (
<PageShell meta={frontMatter}>
<div className='relative prose'>
Expand Down
3 changes: 3 additions & 0 deletions docs/components/markdown-page-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class MarkdownPageshell extends React.Component {
if (!meta.pathname) {
meta.pathname = location.pathname;
}
if (frontMatter.contentType) meta.contentType = frontMatter.contentType;
if (frontMatter.language) meta.language = frontMatter.language;
if (frontMatter.level) meta.level = frontMatter.level;
return (
<PageShell meta={meta} {...this.props}>
<div className="prose">
Expand Down
2 changes: 1 addition & 1 deletion docs/components/page_shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class PageShell extends React.Component {
};

return (
<ReactPageShell darkHeaderText={true} includeFooter={false} {...this.props}>
<ReactPageShell site="Mapbox GL JS" darkHeaderText={true} includeFooter={false} {...this.props}>
<Helmet>
<link
rel="canonical"
Expand Down
6 changes: 4 additions & 2 deletions docs/pages/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import LinkerStack from 'documentation/src/output/util/linker_stack';
import ApiItem from '../components/api-item';

const meta = {
title: 'Mapbox GL JS API',
title: 'API Reference',
description: 'The Mapbox GL JS API documentation to render interactive maps from vector tiles and Mapbox styles.',
pathname: '/mapbox-gl-js/api'
pathname: '/mapbox-gl-js/api',
contentType: 'API',
lanaguage: ['JavaScript']
};

const linkerStack = new LinkerStack({})
Expand Down
5 changes: 3 additions & 2 deletions docs/pages/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import AppropriateImage from '../components/appropriate-image';
import imageConfig from '../img/dist/image.config.json'; // eslint-disable-line

const meta = {
title: 'Mapbox GL JS Examples',
title: 'Examples',
description: 'Code examples for Mapbox GL JS.',
pathname: '/examples'
pathname: '/examples',
lanaguage: ['JavaScript']
};

class ExamplesLandingPage extends React.PureComponent {
Expand Down
1 change: 1 addition & 0 deletions docs/pages/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ prependJs:
- "import Quickstart from '../../components/quickstart';"
- "import {version} from '../../../package.json';"
pathname: /mapbox-gl-js/overview/
contentType: API
---

{{
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import entries from 'object.entries';
import IconText from '@mapbox/mr-ui/icon-text';

const meta = {
title: 'Mapbox GL JS Plugins',
title: 'Plugins',
description: 'Extend your Mapbox GL JS map with plugins.',
pathname: '/mapbox-gl-js/plugins'
};
Expand Down
5 changes: 3 additions & 2 deletions docs/pages/style-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import ref from '../../src/style-spec/reference/latest';
import Icon from '@mapbox/mr-ui/icon';

const meta = {
title: 'Mapbox Style Specification',
title: 'Style Specification',
description: 'This specification defines and describes the visual appearance of a map: what data to draw, the order to draw it in, and how to style the data when drawing it.',
pathname: '/mapbox-gl-js/style-spec'
pathname: '/mapbox-gl-js/style-spec',
contentType: 'specification'
};

const sourceTypes = ['vector', 'raster', 'raster-dem', 'geojson', 'image', 'video'];
Expand Down
2 changes: 1 addition & 1 deletion vendor/docs-page-shell/page-shell-script.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vendor/docs-page-shell/page-shell-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
color: #4264fb !important;
}
.shell-wrapper .shell-color-gray {
color: #607d9c !important;
color: #5b7897 !important;
}
.shell-wrapper .shell-color-gray-dark {
color: #273d56 !important;
Expand Down Expand Up @@ -555,7 +555,7 @@
color: #314ccd !important;
}
.shell-wrapper .shell-color-gray-dark-on-hover:hover {
color: #273d56 !important;
color: #23374d !important;
}

/* ========================================================================== */
Expand Down
Loading

0 comments on commit 2aaab27

Please sign in to comment.