Skip to content

Commit

Permalink
fix(fusumarc): rename from name to title
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Jun 22, 2019
1 parent 4505871 commit bdcccd7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Supports for `yaml` and `js` and it can be generated by running `fusuma init`.
```yml
meta:
url: https://slides.hiroppy.me
name: the present and future of JavaScript
title: the present and future of JavaScript
description: Explain how specifications are determined and how it will be in the future.
thumbnail: https://avatars1.githubusercontent.com/u/1725583?v=4&s=200
siteName: slides.hiroppy.me
Expand Down Expand Up @@ -199,7 +199,7 @@ extends:
module.exports = {
meta: {
url: 'https://slide.hiroppy.me',
name: 'test-test',
title: 'test-test',
description: 'test',
thumbnail: 'url',
siteName: 'siteName',
Expand Down
6 changes: 3 additions & 3 deletions packages/configs/__tests__/__snapshots__/fusumarc.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`fusuma init 1`] = `
"meta:
url:
name:
title:
thumbnail:
description:
sns:
Expand Down Expand Up @@ -33,9 +33,9 @@ Object {
},
"meta": Object {
"description": null,
"name": "yml",
"siteName": null,
"thumbnail": null,
"title": "yml",
"url": null,
},
"slide": Object {
Expand All @@ -52,9 +52,9 @@ Object {
},
"meta": Object {
"description": "",
"name": "js",
"siteName": "",
"thumbnail": "",
"title": "js",
"url": "",
},
"slide": Object {
Expand Down
4 changes: 2 additions & 2 deletions packages/configs/__tests__/fusumarc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('fusuma', () => {
path.join(__dirname, '.fusumarc.yml'),
`meta:
url:
name: yml
title: yml
description:
thumbnail:
siteName:
Expand All @@ -44,7 +44,7 @@ extends:
`module.exports = {
meta: {
url: '',
name: 'js',
title: 'js',
description: '',
thumbnail: '',
siteName: ''
Expand Down
2 changes: 1 addition & 1 deletion packages/configs/src/fusumarc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const writeFileAsync = promisify(writeFile);
const config = {
meta: {
url: null,
name: null,
title: null,
thumbnail: null,
description: null,
sns: ['twitter'] // twitter, hatena
Expand Down
7 changes: 4 additions & 3 deletions packages/webpack/src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ module.exports = ({
internal = {},
server = {}
}) => {
const { url, name, description, thumbnail, siteName, sns } = meta;
// name is deprecated TODO: delete
const { url, name, description, thumbnail, siteName, sns, title } = meta;
const {
sidebar,
targetBlank = true,
Expand Down Expand Up @@ -104,7 +105,7 @@ module.exports = ({
'process.env.URL': JSON.stringify(url),
'process.env.SNS': JSON.stringify(sns),
'process.env.SIDEBAR': JSON.stringify(sidebar === undefined ? true : sidebar),
'process.env.TITLE': JSON.stringify(name),
'process.env.TITLE': JSON.stringify(title || name || 'slide'),
'process.env.BASE_PATH': JSON.stringify(basePath),
'process.env.REMOTE_ORIGIN_URL': JSON.stringify(remoteOrigin),
'process.env.TARGET_BLANK': JSON.stringify(targetBlank),
Expand All @@ -118,7 +119,7 @@ module.exports = ({
new HtmlWebpackPlugin({
url,
filename: 'index.html',
title: name || 'slide',
title: title || name || 'slide',
template: path.join(__dirname, 'template.html'),
image: thumbnail || '',
siteName,
Expand Down
2 changes: 1 addition & 1 deletion samples/intro/.fusumarc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
meta:
url: https://slide.hiroppy.me
name: Fusuma
title: What's Fusuma?
description: Introduce Fusuma
thumbnail: https://avatars0.githubusercontent.com/u/3367801?s=400&v=4
siteName: hiroppy.me
Expand Down
2 changes: 1 addition & 1 deletion samples/issues/.fusumarc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
meta:
url: https://slide.hiroppy.me
name: Fusuma
title: issues
description: Introduce Fusuma
thumbnail: https://avatars0.githubusercontent.com/u/3367801?s=400&v=4
siteName: hiroppy.me
Expand Down

0 comments on commit bdcccd7

Please sign in to comment.