|
1 | 1 | const fs = require('fs');
|
2 | 2 | const path = require('path');
|
3 | 3 |
|
| 4 | +require('dotenv').config(); |
| 5 | + |
| 6 | +const hostname = 'laravel-lang.com'; |
| 7 | + |
4 | 8 | module.exports = {
|
5 | 9 | lang: 'en-US',
|
6 | 10 | title: 'Laravel Lang',
|
7 | 11 | description: 'List of 78 languages for Laravel Framework 4-9, Jetstream, Fortify, Breeze, Cashier, Nova, Spark and UI.',
|
8 | 12 |
|
9 | 13 | head: [
|
10 | 14 | ['link', { rel: 'icon', href: '/images/logo.svg' }],
|
11 |
| - ['meta', { name: 'twitter:image', content: 'https://laravel-lang.com/images/social-logo.png' }] |
| 15 | + ['meta', { name: 'twitter:image', content: `https://${ hostname }/images/social-logo.png` }] |
12 | 16 | ],
|
13 | 17 |
|
14 | 18 | theme: '@vuepress/theme-default',
|
15 | 19 | themeConfig: {
|
| 20 | + hostname, |
16 | 21 | base: '/',
|
17 | 22 |
|
18 | 23 | logo: '/images/logo.svg',
|
@@ -88,7 +93,15 @@ module.exports = {
|
88 | 93 | description: $page => $page.frontmatter.description,
|
89 | 94 | type: _ => 'website',
|
90 | 95 | image: (_, $site) => $site.domain + '/images/social-logo.png'
|
91 |
| - } |
| 96 | + }, |
| 97 | + [ |
| 98 | + '@vuepress/docsearch', |
| 99 | + { |
| 100 | + appId: process.env.VITE_APP_ALGOLIA_APP_ID, |
| 101 | + apiKey: process.env.VITE_APP_ALGOLIA_API_KEY, |
| 102 | + indexName: process.env.VITE_APP_ALGOLIA_INDEX_NAME |
| 103 | + } |
| 104 | + ] |
92 | 105 | ]
|
93 | 106 | ]
|
94 | 107 | };
|
@@ -118,7 +131,7 @@ function getChildren(folder, sort = 'asc') {
|
118 | 131 | }
|
119 | 132 |
|
120 | 133 | function resolveNumeric(value) {
|
121 |
| - const sub = value.substr(0, value.indexOf('.')); |
| 134 | + const sub = value.substring(0, value.indexOf('.')); |
122 | 135 |
|
123 | 136 | const num = Number(sub);
|
124 | 137 |
|
|
0 commit comments