Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Enable sitemap.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joouis committed Jan 28, 2020
1 parent 9e93693 commit 7da6107
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 2 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"deploy": "yarn build && node scripts/publish.js",
"lint": "vue-cli-service lint"
"sitemap": "vue-cli-service sitemap"
},
"dependencies": {
"@mdi/js": "^4.8.95",
Expand All @@ -25,6 +26,7 @@
"gh-pages": "^2.1.1",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-cli-plugin-sitemap": "^1.0.4",
"vue-cli-plugin-vuetify": "^2.0.2",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.0"
Expand Down
1 change: 1 addition & 0 deletions src/plugins/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Images from '../components/examples/Images';

Vue.use(VueRouter);

// Sync `./routes.js` file if routes below changed.
const routes = [
{ path: '/', component: UIComponentsList },
{ path: '/alerts', component: Alerts },
Expand Down
42 changes: 42 additions & 0 deletions src/plugins/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* This file is for sitemap generation.
*/

const routes = [
{ path: '/', name: 'Homepage' },
{ path: '/alerts', name: 'Alerts' },
{ path: '/avatars', name: 'Avatars' },
{ path: '/badges', name: 'Badges' },
{ path: '/banners', name: 'Banners' },
{ path: '/app-bars', name: 'App Bars' },
{ path: '/toolbars', name: 'Toolbars' },
{ path: '/system-bars', name: 'System Bars' },
{ path: '/bottom-navigation', name: 'Bottom Navigation' },
{ path: '/bottom-sheets', name: 'Bottom Sheets' },
{ path: '/breadcrumbs', name: 'Breadcrumbs' },
{ path: '/buttons', name: 'Buttons' },
{ path: '/floating-action-buttons', name: 'Floating Action Buttons' },
{ path: '/calendars', name: 'Calendars' },
{ path: '/cards', name: 'Cards' },
{ path: '/carousels', name: 'Carousels' },
{ path: '/chips', name: 'Chips' },
{ path: '/dialogs', name: 'Dialogs' },
{ path: '/dividers', name: 'Dividers' },
{ path: '/expansion-panels', name: 'Expansion Panels' },
{ path: '/footer', name: 'Footer' },
{ path: '/grids', name: 'Grids' },
{ path: '/hover', name: 'Hover' },
{ path: '/icons', name: 'Icons' },
{ path: '/images', name: 'Images' },
{ path: '/*', name: '404' }
].map(i => ({
...i,
path: `vuetify-playground${i.path}`,
lastmod: new Date() - 0,
priority: 1,
changefreq: 'monthly'
}));

// console.log(routes);

module.exports = routes;
11 changes: 10 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
const routes = require('./src/plugins/routes');

module.exports = {
transpileDependencies: [
'vuetify'
],
publicPath: '/vuetify-playground'
publicPath: '/vuetify-playground',
productionSourceMap: false,
pluginOptions: {
sitemap: {
baseURL: 'https://joouis.com',
routes
}
}
};
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7887,6 +7887,13 @@ vm-browserify@^1.0.1:
resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha1-eGQcSIuObKkadfUR56OzKobl3aA=

vue-cli-plugin-sitemap@^1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/vue-cli-plugin-sitemap/download/vue-cli-plugin-sitemap-1.0.4.tgz#11f6bbc9b994061e40aca3dd93f724f49813e70b"
integrity sha1-Efa7ybmUBh5ArKPdk/ck9JgT5ws=
dependencies:
ajv "^6.10.2"

vue-cli-plugin-vuetify@^2.0.2:
version "2.0.2"
resolved "https://registry.npm.taobao.org/vue-cli-plugin-vuetify/download/vue-cli-plugin-vuetify-2.0.2.tgz#160e573d59f2594b89531e95b0fdd74ca76ecd9d"
Expand Down

0 comments on commit 7da6107

Please sign in to comment.