github.com/System-Glitch/goyave/v2@v2.10.3-0.20200819142921-51011e75d504/docs_src/src/.vuepress/config.js (about)

     1  const title = 'Goyave'
     2  const description = 'Goyave is a Golang web API framework aiming at cleanliness, fast development and power.'
     3  
     4  module.exports = {
     5      title: title,
     6      description: description,
     7      dest: '../docs',
     8      base: '/goyave/',
     9      head: [
    10          ['link', { rel: 'icon', type: "image/png", sizes: "16x16", href: `/goyave_16.png` }],
    11          ['link', { rel: 'icon', type: "image/png", sizes: "32x32", href: `/goyave_32.png` }],
    12          ['link', { rel: 'icon', type: "image/png", sizes: "64x64", href: `/goyave_64.png` }],
    13          ['link', { rel: 'icon', type: "image/png", sizes: "128x128", href: `/goyave_128.png` }],
    14          ['link', { rel: 'icon', type: "image/png", sizes: "256x256", href: `/goyave_256.png` }],
    15          ['link', { rel: 'icon', type: "image/png", sizes: "512x512", href: `/goyave_512.png` }],
    16          // Handled in each page
    17          // ['meta', { property: 'twitter:title', content: title }],
    18          ['meta', { property: 'twitter:description', content: description }],
    19          ['meta', { property: 'twitter:image:src', content: `https://system-glitch.github.io/goyave/goyave_banner.png` }],
    20          ['meta', { property: 'twitter:card', content: 'summary_large_image' }],
    21          // Handled in each page
    22          // ['meta', { property: 'og:title', content: title }],
    23          ['meta', { property: 'og:type', content: 'website' }],
    24          ['meta', { property: 'og:description', content: description }],
    25          ['meta', { property: 'og:image', content: `https://system-glitch.github.io/goyave/goyave_banner.png` }],
    26          ['meta', { property: 'og:site_name', content: "Goyave" }],
    27      ],
    28      themeConfig: {
    29          repo: 'System-Glitch/goyave',
    30          editLinks: true,
    31          docsDir: 'docs_src/src',
    32          smoothScroll: true,
    33          activeHeaderLinks: false,
    34          logo: '/goyave_64.png',
    35          locales: {
    36              '/': {
    37                  label: 'English',
    38                  selectText: 'Languages',
    39                  editLinkText: 'Edit this page on GitHub',
    40                  lastUpdated: 'Last Updated',
    41                  nav: require('./nav/en'),
    42                  sidebar: {
    43                      '/guide/': getGuideSidebar(),
    44                  }
    45              }
    46          }
    47      },
    48      plugins: [
    49          ['@vuepress/back-to-top', true],
    50          ['vuepress-plugin-container', {
    51              type: 'img-row',
    52              before: (img) => `<div class="img-row left">${img}<div class="row-content">`,
    53              after: '</div></div>',
    54          }],
    55          ['vuepress-plugin-container', {
    56              type: 'img-row-right',
    57              before: (img) => `<div class="img-row right">${img}<div class="row-content">`,
    58              after: '</div></div>',
    59          }],
    60          ['vuepress-plugin-container', {
    61              type: 'vue',
    62              before: '<pre class="vue-container"><code>',
    63              after: '</code></pre>',
    64          }],
    65          ['vuepress-plugin-container', {
    66              type: 'table',
    67              before: '<div class="table">',
    68              after: '</div>',
    69          }]
    70      ],
    71      extraWatchFiles: [
    72          '.vuepress/nav/en.js',
    73      ]
    74      
    75  }
    76  
    77  function getGuideSidebar () {
    78      return [
    79          {
    80              title: 'Guide',
    81              collapsable: true,
    82              children: [
    83                  '',
    84                  'changelog',
    85                  'installation',
    86                  'upgrade-guide',
    87                  'configuration',
    88                  'architecture-concepts',
    89                  'deployment',
    90                  'contribution-guide',
    91              ]
    92          },
    93          {
    94              title: 'The Basics',
    95              collapsable: true,
    96              children: [
    97                  'basics/routing',
    98                  'basics/middleware',
    99                  'basics/requests',
   100                  'basics/controllers',
   101                  'basics/responses',
   102                  'basics/database',
   103                  'basics/validation',
   104              ]
   105          },
   106          {
   107              title: 'Advanced',
   108              collapsable: true,
   109              children: [
   110                  'advanced/helpers',
   111                  'advanced/authentication',
   112                  'advanced/localization',
   113                  'advanced/testing',
   114                  'advanced/multi-services',
   115                  'advanced/cors',
   116                  'advanced/status-handlers',
   117                  'advanced/logging',
   118              ]
   119          }
   120      ]
   121  }