diff --git a/.eslintrc.js b/.eslintrc.js index 81b05f7..7516fad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,6 +9,7 @@ module.exports = { extends: [ 'plugin:vue-libs/recommended', 'plugin:vue/vue3-recommended', + 'plugin:@intlify/vue-i18n/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended', 'prettier', diff --git a/.vitepress/config.js b/.vitepress/config.js index b1b41a5..583b614 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -1,76 +1,62 @@ -/** @type {UserConfig['head']} */ -const head = [ - ['meta', { name: 'twitter:card', content: 'summary_large_image' }], - ['meta', { name: 'twitter:site', content: '@intlify' }], - ['meta', { name: 'twitter:url', content: 'https://intlify.dev' }], - ['meta', { name: 'twitter:title', content: 'Intlify' }], - [ - 'meta', - { - name: 'twitter:description', - content: 'The Borderless Internationalization' - } - ], - [ - 'meta', - { name: 'twitter:image', content: 'https://intlify.dev/ogimage.png' } - ], - ['meta', { property: 'og:type', content: 'article' }], - ['meta', { property: 'og:url', content: 'https://intlify.dev' }], - ['meta', { property: 'og:site_name', content: 'Intlify' }], - ['meta', { property: 'og:title', content: 'Intlify' }], - [ - 'meta', - { - property: 'og:description', - content: 'The Borderless Internationalization' - } - ], - ['meta', { property: 'og:image', content: 'https://intlify.dev/ogimage.png' }] -] +const head = require('./head') -if (process.env.NODE_ENV === 'production') { - head.push([ - 'script', - { - src: 'https://unpkg.com/thesemetrics@latest', - async: '' - } - ]) +const mainInfo = { + title: 'Intlify', + description: 'The Borderless Internationalization' } /** * @type {UserConfig} */ const config = { - title: 'Intlify', - description: 'The Borderless Internationalization', + ...mainInfo, head, + lang: 'en', + locales: { + '/': { lang: 'en', ...mainInfo }, + '/ja/': { lang: 'ja', ...mainInfo } + }, themeConfig: { docsBranch: 'master', logo: 'nav_logo.png', - nav: [ - { - text: 'Blog', - link: 'https://blog.intlify.dev' + locales: { + '/': { + nav: [ + { + text: 'Blog', + link: 'https://blog.intlify.dev' + }, + { + text: 'GitHub', + link: 'https://github.com/intlify' + } + ] }, - { - text: 'GitHub', - link: 'https://github.com/intlify' + '/ja/': { + nav: [ + { + text: 'ブログ', + link: 'https://blog.intlify.dev' + }, + { + text: 'GitHub', + link: 'https://github.com/intlify' + } + ] } - ] + } }, customData: { projects: [ { title: 'Vue I18n', link: 'https://github.com/kazupon/vue-i18n', - logo: 'projects/vue-i18n.png' + logo: '/projects/vue-i18n.png' }, { title: 'ESLint Plugin Vue I18n', link: 'https://github.com/intlify/eslint-plugin-vue-i18n', - logo: 'projects/eslint-plugin-vue-i18n.png' + logo: '/projects/eslint-plugin-vue-i18n.png' } ], sponsors: { @@ -78,7 +64,7 @@ const config = { { title: 'NuxtJS', link: 'https://nuxtjs.org', - logo: 'sponsors/nuxt.png' + logo: '/sponsors/nuxt.png' } ], sliver: [ @@ -86,24 +72,24 @@ const config = { title: 'BabelEdit', link: 'https://www.codeandweb.com/babeledit?utm_campaign=vue-i18n-2019-01', - logo: 'sponsors/babeledit.png' + logo: '/sponsors/babeledit.png' } ], bronze: [ { title: 'ZenArchitects', link: 'https://zenarchitects.co.jp', - logo: 'sponsors/zenarchitects.png' + logo: '/sponsors/zenarchitects.png' }, { title: 'Sendcloud', link: 'https://www.sendcloud.com', - logo: 'sponsors/sendcloud.png' + logo: '/sponsors/sendcloud.png' }, { title: 'VueMastery', link: 'https://www.vuemastery.com/', - logo: 'sponsors/vuemastery.png' + logo: '/sponsors/vuemastery.png' } ] } diff --git a/.vitepress/head.js b/.vitepress/head.js new file mode 100644 index 0000000..5685588 --- /dev/null +++ b/.vitepress/head.js @@ -0,0 +1,44 @@ +/** + @type {UserConfig['head']} + */ +const head = [ + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], + ['meta', { name: 'twitter:site', content: '@intlify' }], + ['meta', { name: 'twitter:url', content: 'https://intlify.dev' }], + ['meta', { name: 'twitter:title', content: 'Intlify' }], + [ + 'meta', + { + name: 'twitter:description', + content: 'The Borderless Internationalization' + } + ], + [ + 'meta', + { name: 'twitter:image', content: 'https://intlify.dev/ogimage.png' } + ], + ['meta', { property: 'og:type', content: 'article' }], + ['meta', { property: 'og:url', content: 'https://intlify.dev' }], + ['meta', { property: 'og:site_name', content: 'Intlify' }], + ['meta', { property: 'og:title', content: 'Intlify' }], + [ + 'meta', + { + property: 'og:description', + content: 'The Borderless Internationalization' + } + ], + ['meta', { property: 'og:image', content: 'https://intlify.dev/ogimage.png' }] +] + +if (process.env.NODE_ENV === 'production') { + head.push([ + 'script', + { + src: 'https://unpkg.com/thesemetrics@latest', + async: '' + } + ]) +} + +module.exports = head diff --git a/.vitepress/locales/en.json b/.vitepress/locales/en.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.vitepress/locales/en.json @@ -0,0 +1 @@ +{} diff --git a/.vitepress/locales/ja.json b/.vitepress/locales/ja.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.vitepress/locales/ja.json @@ -0,0 +1 @@ +{} diff --git a/.vitepress/theme/Hero.vue b/.vitepress/theme/Hero.vue index 8c61df8..1f2791d 100644 --- a/.vitepress/theme/Hero.vue +++ b/.vitepress/theme/Hero.vue @@ -1,3 +1,5 @@ + +