Skip to content

Commit

Permalink
build: update site & examples config
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyan0205 committed Dec 14, 2018
1 parent 8657fa7 commit c1649f0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build/rollup/rollup-plugin-example-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ const rollupPlugin = [
}),
fillHtmlPlugin({
template: resolve('examples/index.html'),
publicPath: '/mand-mobile/examples/',
// publicPath: '/mand-mobile/examples/',
publicPath: '/2x-doc/examples/',
destFile: path.resolve(EXAMPLE_OUTPUT_DIR, 'index.html')
}),
// cli
Expand Down
3 changes: 2 additions & 1 deletion site/build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin(Object.assign({}, htmlPluginOption, {
filename: 'index.html',
publicPath: '/mand-mobile/',
// publicPath: '/mand-mobile/',
publicPath: '/2x-doc/',
})),
new HtmlWebpackPlugin(Object.assign({}, htmlPluginOption, {
filename: 'index.gitee.html',
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"indices": "node ./build/bin/gen-indices --log"
},
"dependencies": {
"mand-mobile": "^1.4.4",
"mand-mobile": "^2.0.0-rc.1",
"v-tooltip": "^2.0.0-rc.31",
"vue": "^2.5.2",
"vue-clipboard2": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion site/theme/default/assets/js/home.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const qrcodeTableView = {
qrcodeTableShow: false
}
},
template: '<mfe-table v-model="qrcodeTableShow" style="width:160px;height:160px;top:65px;left:-10px;overflow:hidden;"><img src="//pt-starimg.didistatic.com/static/starimg/img/yFIIdKkZ1U1544692152996.png" alt=""></mfe-table>'
template: '<mfe-table v-model="qrcodeTableShow" style="width:160px;height:160px;top:65px;left:-10px;overflow:hidden;"><img src="//manhattan.didistatic.com/static/manhattan/mand-mobile/2.0/docs/mand-doc-home-qrcode.png" alt=""></mfe-table>'
}

export default {
Expand Down
2 changes: 1 addition & 1 deletion site/theme/default/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="mfe-blog-theme-default-header" :class="{active: isActive}">
<div class="default-header-container">
<div class="default-header-aside">
<a class="default-header-logo" href="/mand-mobile">
<a class="default-header-logo" href="/2x-doc">
<img :src="logo" alt="logo">
<p>
<span class="name" v-html="title"></span>
Expand Down
9 changes: 8 additions & 1 deletion site/theme/default/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ import { setScale } from './assets/js/util'

if (process.env.NODE_ENV === 'production') {
const hostname = location.hostname
const pathname = location.pathname
if (hostname === 'didi.github.io') {
__webpack_public_path__ = '/mand-mobile/'
} else if (hostname === 'mand-mobile.gitee.io') {
__webpack_public_path__ = '/docs/'
if (~pathname.indexOf('/1x-doc')) {
__webpack_public_path__ = '/1x-doc/'
} else if (~pathname.indexOf('/2x-doc')) {
__webpack_public_path__ = '/2x-doc/'
} else {
__webpack_public_path__ = '/docs/'
}
}
}

Expand Down

0 comments on commit c1649f0

Please sign in to comment.