Skip to content

Commit

Permalink
Merge branch 'master' into feat/saber-plugin-local-search
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 authored Aug 22, 2019
2 parents 9faa65e + bcd0693 commit a9583b2
Show file tree
Hide file tree
Showing 63 changed files with 1,782 additions and 404 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
"commitizen": "3.1.1",
"conf": "5.0.0",
"cz-conventional-changelog": "2.1.0",
"enquirer": "^2.3.1",
"eslint-config-prettier": "4.3.0",
"eslint-config-rem": "4.0.0",
"eslint-plugin-prettier": "3.1.0",
"husky": "3.0.0",
"husky": "3.0.4",
"lerna": "3.15.0",
"lint-staged": "8.1.6",
"prettier": "1.18.2",
Expand Down
21 changes: 21 additions & 0 deletions packages/create-blog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
21 changes: 21 additions & 0 deletions packages/create-site/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
21 changes: 21 additions & 0 deletions packages/saber-highlight-css/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
21 changes: 21 additions & 0 deletions packages/saber-highlighter-prism/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
21 changes: 21 additions & 0 deletions packages/saber-log/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
21 changes: 21 additions & 0 deletions packages/saber-markdown/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion packages/saber-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"markdown-it": "9.0.1",
"rollup": "1.17.0",
"rollup-plugin-babel": "4.3.3",
"rollup-plugin-commonjs": "9.3.4",
"rollup-plugin-commonjs": "10.0.2",
"rollup-plugin-json": "4.0.0",
"rollup-plugin-node-resolve": "4.2.3",
"rollup-plugin-terser": "5.0.0"
Expand Down
6 changes: 6 additions & 0 deletions packages/saber-plugin-feed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.4.1](https://github.com/saberland/saber/compare/saber-plugin-feed@0.4.0...saber-plugin-feed@0.4.1) (2019-08-20)

### Bug Fixes

- Correct the attributes in saber-plugin-feed ([#364](https://github.com/saberland/saber/issues/364)) ([5091335](https://github.com/saberland/saber/commit/5091335))

# [0.4.0](https://github.com/saberland/saber/compare/saber-plugin-feed@0.3.4...saber-plugin-feed@0.4.0) (2019-07-27)

### Features
Expand Down
21 changes: 21 additions & 0 deletions packages/saber-plugin-feed/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
11 changes: 6 additions & 5 deletions packages/saber-plugin-feed/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ exports.apply = (api, options = {}) => {
const content = await api.renderer.renderPageContent(page.permalink)
posts.push({
title: page.title,
id: page.permalink,
id: resolveURL(siteConfig.url, page.permalink),
link: resolveURL(siteConfig.url, page.permalink),
// Strip HTML tags in excerpt and use it as description (a.k.a. summary)
description:
Expand All @@ -82,13 +82,11 @@ exports.apply = (api, options = {}) => {
})
.slice(0, options.limit)

const feedLinks = {}

// Feed instance
const feed = new Feed({
title: siteConfig.title,
description: siteConfig.description,
id: siteConfig.url,
id: siteConfig.url.replace(/\/?$/, '/'), // Ensure that the id ends with a slash
link: siteConfig.url,
copyright: options.copyright,
generator: options.generator,
Expand All @@ -97,7 +95,10 @@ exports.apply = (api, options = {}) => {
email: siteConfig.email,
link: siteConfig.url
},
feedLinks
feedLinks: {
json: jsonFeedPath && resolveURL(siteConfig.url, jsonFeedPath),
atom: atomFeedPath && resolveURL(siteConfig.url, atomFeedPath)
}
})

// Add posts to feed
Expand Down
2 changes: 1 addition & 1 deletion packages/saber-plugin-feed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "saber-plugin-feed",
"version": "0.4.0",
"version": "0.4.1",
"description": "Generate Atom, RSS2, or JSON feed for your Saber app",
"license": "MIT",
"main": "lib/index.js",
Expand Down
21 changes: 21 additions & 0 deletions packages/saber-plugin-git-modification-time/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 6 additions & 0 deletions packages/saber-plugin-google-analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.2.0](https://github.com/saberland/saber/compare/saber-plugin-google-analytics@0.1.0...saber-plugin-google-analytics@0.2.0) (2019-08-20)

### Features

- Add anonymizeIp option to saber-plugin-google-analytics ([#363](https://github.com/saberland/saber/issues/363)) ([a498aa1](https://github.com/saberland/saber/commit/a498aa1))

# [0.1.0](https://github.com/saberland/saber/compare/saber-plugin-google-analytics@0.0.6...saber-plugin-google-analytics@0.1.0) (2019-07-27)

**Note:** Version bump only for package saber-plugin-google-analytics
Expand Down
21 changes: 21 additions & 0 deletions packages/saber-plugin-google-analytics/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
40 changes: 40 additions & 0 deletions packages/saber-plugin-google-analytics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# saber-plugin-google-analytics

Add Google Analytics to your Saber sites.

## Install

```bash
yarn add saber-plugin-google-analytics
```

## Usage

In your `saber-config.yml`:

```yml
plugins:
- resolve: saber-plugin-google-analytics
options:
trackId: UA-XXX-XX # Google Analytics Track ID
```
## Plugin Options
### trackId
- Type: `string`
- Required: `true`

Google Analytics Track ID.

### anonymizeIp

- Type: `boolean`
- Default: `false`

To anonymize the IP address for all hits sent from a single tracker, set the `anonymizeIp` option to `true`.

## License

MIT.
5 changes: 3 additions & 2 deletions packages/saber-plugin-google-analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ const ID = 'google-analytics'

exports.name = ID

exports.apply = (api, { trackId = false } = {}) => {
exports.apply = (api, { trackId = false, anonymizeIp = false } = {}) => {
api.hooks.chainWebpack.tap(ID, config => {
config.plugin('constants').tap(([options]) => [
Object.assign(options, {
__GA_TRACK_ID__: JSON.stringify(trackId)
__GA_TRACK_ID__: JSON.stringify(trackId),
__GA_ANONYMIZE_IP: JSON.stringify(anonymizeIp)
})
])
})
Expand Down
2 changes: 1 addition & 1 deletion packages/saber-plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "saber-plugin-google-analytics",
"version": "0.1.0",
"version": "0.2.0",
"main": "index.js",
"files": [
"index.js",
Expand Down
5 changes: 4 additions & 1 deletion packages/saber-plugin-google-analytics/saber-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export default function({ router }) {
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga')

ga('create', __GA_TRACK_ID__, 'auto')
ga('send', 'pageview')

if (__GA_ANONYMIZE_IP) {
ga('set', 'anonymizeIp', true)
}

router.afterEach(to => {
ga('set', 'page', to.fullPath)
Expand Down
10 changes: 10 additions & 0 deletions packages/saber-plugin-image/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.2.0](https://github.com/saberland/saber/compare/saber-plugin-image@0.1.0...saber-plugin-image@0.2.0) (2019-08-15)

### Bug Fixes

- **deps:** replace sharp with jimp ([#352](https://github.com/saberland/saber/issues/352)) ([e675ce9](https://github.com/saberland/saber/commit/e675ce9))

### Features

- **saber-plugin-image:** replace `vue-lazyload` with `lozad` ([#356](https://github.com/saberland/saber/issues/356)) ([1eacc83](https://github.com/saberland/saber/commit/1eacc83))

# [0.1.0](https://github.com/saberland/saber/compare/saber-plugin-image@0.0.4...saber-plugin-image@0.1.0) (2019-07-27)

### Bug Fixes
Expand Down
Loading

0 comments on commit a9583b2

Please sign in to comment.