talos/docs/website/nuxt.config.js
Timothy Gerla f59620473e docs: add 0.5 pre-release docs, add linkable anchors, other fixes
- add 0.5 docs branched from 0.4
- add intro page and "get help" pages
- moved Docker and Firecracker into a "Local Clusters" category
- switch to markdown-it from markd for consistency between corp site and docs site
- use markdown-it-anchor to create linkable anchors to sections within a page
- improve urls to use / instead of # for docs pages (WARNING: this breaks old links)
- continue to simplify handling in the Content.vue component
- update JS deps

Signed-off-by: Timothy Gerla <tim@gerla.net>
2020-05-04 16:04:53 -07:00

118 lines
2.2 KiB
JavaScript

const routes = require('./routes')
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
}
],
script: [{ src: '/js/asciinema-player.js' }],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: ['@/assets/css/main.css'],
/*
** Plugins to load before mounting the App
*/
plugins: [],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module',
// Doc: https://github.com/nuxt-community/nuxt-tailwindcss
'@nuxtjs/tailwindcss',
[
'@nuxtjs/google-analytics',
{
id: 'UA-141692582-2'
}
]
],
/*
** Nuxt.js dev-modules configuration
*/
eslint: {
fix: true
},
// PurgeCSS is automatically installed by @nuxtjs/tailwindcss
purgeCSS: {
enabled: false
},
/*
** Nuxt.js modules
*/
modules: ['nuxt-webfontloader'],
webfontloader: {
google: {
families: ['Lato:400,700', 'Nunito Sans:400,700', 'Fira Mono:400,700']
}
},
generate: {
routes(callback) {
let generatedRoutes = []
routes.forEach((route) => {
const parts = route.split('/')
let lang = parts[1]
let version = parts[3]
if (lang == 'docs') {
lang = 'en'
version = parts[2]
}
const r = {
route: route,
payload: {
sections: require(`${__dirname}/static/${version}.sections.${lang}.json`),
menu: require(`${__dirname}/static/${version}.menu.${lang}.json`)
}
}
generatedRoutes.push(r)
})
callback(null, generatedRoutes)
}
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend(config, ctx) {},
extractCSS: true
}
}