saber-theme-ume
Advanced tools
Comparing version 1.2.1 to 2.0.0
@@ -25,2 +25,9 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
var selectFields = function selectFields(page) { | ||
return page && { | ||
title: page.attributes.title, | ||
permalink: page.attributes.permalink | ||
}; | ||
}; | ||
this.config.siteConfig.tags = []; | ||
@@ -37,11 +44,5 @@ var _iteratorNormalCompletion = true; | ||
this.config.siteConfig.tags = [].concat(_toConsumableArray(this.config.siteConfig.tags), _toConsumableArray(post.attributes.tags)); // It's NOT recommended to mutate `page` directly to add addtional props | ||
// Use `extendPageProp` instead to add more properties to the `page` prop on your layout page | ||
this.pages.extendPageProp(post.internal.id, { | ||
// Some properties on `page` are not supposed to be accessible at runtime | ||
// Use `getPagePublicFields` to return public fields of the page only | ||
prevPost: this.pages.getPagePublicFields(posts[index - 1]), | ||
nextPost: this.pages.getPagePublicFields(posts[index + 1]) | ||
}); | ||
post.prevPost = selectFields(posts[index - 1]); | ||
post.nextPost = selectFields(posts[index + 1]); | ||
this.config.siteConfig.tags = [].concat(_toConsumableArray(this.config.siteConfig.tags), _toConsumableArray(post.attributes.tags)); | ||
} | ||
@@ -48,0 +49,0 @@ } catch (err) { |
{ | ||
"name": "saber-theme-ume", | ||
"description": "Ume is a elegant theme for saber.js", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -20,7 +20,7 @@ "repository": { | ||
"devDependencies": { | ||
"saber": "^0.4.2", | ||
"saber": "^0.6.7", | ||
"saber-highlighter-prism": "^0.1.2", | ||
"saber-plugin-generate-feed": "^0.0.4", | ||
"saber-plugin-feed": "^0.3.0", | ||
"saber-plugin-google-analytics": "^0.0.3", | ||
"saber-plugin-query-posts": "^0.1.0", | ||
"saber-plugin-query-posts": "^0.3.0", | ||
"sass": "^1.17.3", | ||
@@ -27,0 +27,0 @@ "sass-loader": "^7.1.0", |
@@ -24,3 +24,3 @@ # Ume | ||
```bash | ||
yarn add saber-plugin-query-posts saber-plugin-generate-feed saber-highlighter-prism | ||
yarn add saber-plugin-query-posts saber-plugin-feed saber-highlighter-prism | ||
``` | ||
@@ -58,2 +58,4 @@ | ||
link: /about.html | ||
- title: Tags | ||
link: /tags.html # You need to add `/example/pages/tags.vue` in your `pages` folder to enable the tag cloud page. | ||
@@ -60,0 +62,0 @@ # The Home section on sidebar, this will shown on mobile device. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
244276
749
96