Skip to content
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

[docs] update docs-page-shell #8254

Merged
merged 2 commits into from
May 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import imageConfig from '../img/dist/image.config.json'; // eslint-disable-line
const meta = {
title: 'Examples',
description: 'Code examples for Mapbox GL JS.',
pathname: '/examples/',
pathname: '/mapbox-gl-js/examples/',
lanaguage: ['JavaScript']
};

Expand Down
35 changes: 33 additions & 2 deletions vendor/docs-page-shell/react-page-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,37 @@ function PageFooter() {
}))));
}

function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;
}

function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}

var titleGenerator_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.titleGenerator = titleGenerator;

function titleGenerator(title, subsite, site) {
// create array for formatted title: {title} | {subsite} | {site}
var titleArr = []; // do not push a title that is "Introduction"

if (title && title !== 'Introduction' && (subsite || site)) titleArr.push(title); // push subsite, if same value doesn't exist yet, strip "for (Product)" from name

if (subsite && titleArr.indexOf(subsite) === -1) titleArr.push(subsite.replace(/\sfor\s(iOS|Android|Vision|Unity)/, '')); // push site, if same value doesn't exist yet

if (site && titleArr.indexOf(site) === -1) titleArr.push(site);
return titleArr;
}
});

unwrapExports(titleGenerator_1);
var titleGenerator_2 = titleGenerator_1.titleGenerator;

var removeMarkdown = function (md, options) {
options = options || {};
options.listUnicodeChar = options.hasOwnProperty('listUnicodeChar') ? options.listUnicodeChar : false;
Expand Down Expand Up @@ -942,8 +973,8 @@ var removeMarkdown = function (md, options) {
};

function MetaTagger(props) {
var site = props.subsite ? props.subsite : props.site;
var suffixedTitle = "".concat(props.title === site ? props.title : "".concat(props.title, " | ").concat(site), " | Mapbox");
var title = titleGenerator_2(props.title, props.subsite, props.site).join(' | ');
var suffixedTitle = "".concat(title, " | Mapbox");
var preppedDescription = props.description.replace(/\s+/g, ' ');
var prodUrl = 'https://www.mapbox.com';
if (props.pathname[0] !== '/') prodUrl += '/';
Expand Down