「Javascript/vue/vuepress」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→カスタム変数用意) |
(→カスタム変数用意) |
||
| 行11: | 行11: | ||
const string = { | const string = { | ||
example: { | example: { | ||
| − | mail: "hoge@ | + | mail: "hoge@example.com" |
} | } | ||
} | } | ||
2019年4月12日 (金) 13:22時点における版
vuepressとは
Markdownのドキュメントジェネレーター
サイトデザインなど変更
設定ファイル
.vuepress/config.js
カスタム変数用意
.vuepress/scripts/string.js
const string = {
example: {
mail: "hoge@example.com"
}
}
export default {
computed: {
$string () {
return string
}
}
}
.vuepress/enhanceApp.js
import strings from "./scripts/string"
export default ({
Vue,
options,
router,
siteData
}) => {
Vue.mixin(strings);
}
example1.md
ver:{{$string.example.,mail}}'
