config.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. const description = 'A draggable and resizable grid layout, as a Vue component.'
  2. const title = 'Vue Grid Layout - ️A grid layout system for Vue.js'
  3. module.exports = {
  4. base: "/vue-grid-layout/",
  5. locales: {
  6. '/': {
  7. lang: 'en-US',
  8. title: 'Vue Grid Layout - ️A grid layout system for Vue.js',
  9. description: 'A draggable and resizable grid layout, as a Vue component.'
  10. },
  11. '/zh/': {
  12. lang: 'zh-CN',
  13. title: 'Vue Grid Layout -️ 适用Vue.js的栅格布局系统',
  14. description: '可拖动和可调整大小栅格布局的Vue组件。'
  15. }
  16. },
  17. head: [
  18. ['link', { rel: 'icon', href: `/favicon.ico` }],
  19. ['link', { rel: "apple-touch-icon", sizes: "180x180", href: "https://jbaysolutions.github.io/vue-grid-layout/assets/favicon/apple-touch-icon.png"}],
  20. // ['script', { src: 'https://cdn.jsdelivr.net/npm/vue-grid-layout@2.3.9/dist/vue-grid-layout.umd.min.js' }]
  21. ],
  22. port: 8081,
  23. theme: '@vuepress/vue',
  24. themeConfig: {
  25. smoothScroll: true,
  26. logo: '/assets/img/logo.png',
  27. repo: 'jbaysolutions/vue-grid-layout',
  28. docsDir: 'website/docs',
  29. editLinks: true,
  30. algolia: {
  31. apiKey: '2f143d1edd24605564065dd02bf0a22b',
  32. indexName: 'vue_grid_layout'
  33. },
  34. locales: {
  35. '/': {
  36. selectText: 'Languages',
  37. label: 'English',
  38. ariaLabel: 'Select language',
  39. sidebar: {
  40. '/guide/': [
  41. {
  42. title: "Guide",
  43. collapsable: false,
  44. children: [
  45. '',
  46. 'usage',
  47. 'properties',
  48. 'events',
  49. 'styling',
  50. ]
  51. },
  52. {
  53. title: "Examples",
  54. collapsable: false,
  55. children: [
  56. '01-basic',
  57. '02-events',
  58. '03-multiple-grids',
  59. '04-allow-ignore',
  60. '05-mirrored',
  61. '06-responsive',
  62. '07-prevent-collision',
  63. '08-responsive-predefined-layouts',
  64. '09-dynamic-add-remove',
  65. '10-drag-from-outside',
  66. ]
  67. }
  68. ]
  69. },
  70. nav: [
  71. {text: 'Home', link: '/'},
  72. {text: 'Guide', link: '/guide/'},
  73. {text: 'Changelog', link: '/changelog/'}
  74. ],
  75. searchPlaceholder: 'Search...',
  76. editLinkText: 'Help improve this page!',
  77. lastUpdated: 'Last Updated'
  78. },
  79. '/zh/': {
  80. selectText: '选择语言',
  81. label: '简体中文',
  82. ariaLabel: '选择语言',
  83. sidebar: {
  84. '/zh/guide/': [
  85. {
  86. title: "首页",
  87. collapsable: false,
  88. children: [
  89. '',
  90. 'usage',
  91. 'properties',
  92. 'events',
  93. 'styling',
  94. ]
  95. },
  96. {
  97. title: "例子",
  98. collapsable: false,
  99. children: [
  100. '01-basic',
  101. '02-events',
  102. '03-multiple-grids',
  103. '04-allow-ignore',
  104. '05-mirrored',
  105. '06-responsive',
  106. '07-prevent-collision',
  107. '08-responsive-predefined-layouts',
  108. '09-dynamic-add-remove',
  109. '10-drag-from-outside',
  110. ]
  111. }
  112. ]
  113. },
  114. nav: [
  115. {text: '首页', link: '/zh/'},
  116. {text: '指南', link: '/zh/guide/'},
  117. {text: '更新日志', link: '/zh/changelog/'}
  118. ],
  119. searchPlaceholder: '搜索...',
  120. editLinkText: '帮助改善此页面!',
  121. lastUpdated: '最后更新时间'
  122. }
  123. }
  124. },
  125. plugins: [
  126. '@vuepress/back-to-top',
  127. ['@vuepress/google-analytics', {
  128. ga: 'UA-37288388-24' // UA-00000000-0
  129. }],
  130. ['seo', {
  131. title: $page => `${$page.title} — Vue Grid Layout`,
  132. // image: () => 'https://jbaysolutions.github.io/vue-grid-layout/assets/img/og.jpg',
  133. siteTitle: (_, $site) => $site.title,
  134. description: $page => $page.frontmatter.description || description,
  135. author: (_, $site) => $site.themeConfig.author,
  136. tags: $page => $page.frontmatter.tags,
  137. twitterCard: _ => 'summary_large_image',
  138. type: () => 'article',
  139. url: (_, $site, path) => ($site.themeConfig.domain || '') + path,
  140. publishedAt: $page => $page.frontmatter.date && new Date($page.frontmatter.date),
  141. modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated),
  142. }],
  143. ['vuepress-plugin-serve', {
  144. port: 8080,
  145. staticOptions: {
  146. dotfiles: 'allow',
  147. },
  148. /*beforeServer(app, server) {
  149. app.get('/path/to/my/custom', function(req, res) {
  150. res.json({ custom: 'response' })
  151. })
  152. },*/
  153. }],
  154. ],
  155. dest: 'public',
  156. }