Javascript/vue/vuepress
提供: 初心者エンジニアの簡易メモ
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}}'
全文検索API
Algolia DocSearch申請
https://community.algolia.com/docsearch/#join-docsearch-program
こんな感じの結果が1日で来る
apiKey: 'bb637hogehogegehohogehogegehohogehogegehoge', indexName: 'gehogehoge', https://github.com/algolia/docsearch-configs/blob/master/configs/hogehoge.json
参考:https://kitigai.hatenablog.com/entry/2019/04/04/133432
やり方
.vuepress/config.js
module.exports = {
themeConfig: {
algolia: {
apiKey: '<API_KEY>',
indexName: '<INDEX_NAME>'
}
}
}
