aboutsummaryrefslogtreecommitdiff
path: root/nuxt.config.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-05-01 13:44:35 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-05-01 13:44:35 -0400
commit808e89b024bed961cecd06c9e987dd0349458b92 (patch)
tree081fea8a806af08e66555a880b117718797e5280 /nuxt.config.js
parentcc96e201f6135e932375609d2a6744b30447dbbb (diff)
downloadpersonal-website-808e89b024bed961cecd06c9e987dd0349458b92.tar.gz
personal-website-808e89b024bed961cecd06c9e987dd0349458b92.tar.bz2
personal-website-808e89b024bed961cecd06c9e987dd0349458b92.zip
Finally implemented blog posts
Diffstat (limited to 'nuxt.config.js')
-rw-r--r--nuxt.config.js32
1 files changed, 25 insertions, 7 deletions
diff --git a/nuxt.config.js b/nuxt.config.js
index 7881a99..39370d1 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -11,12 +11,12 @@ module.exports = {
{ hid: 'description', name: 'description', content: 'Andrew\'s Personal Website' }
],
link: [
- {
- rel: 'icon',
- type: 'image/x-icon',
- href: 'favicon.ico',
- }
- ]
+ {
+ rel: 'icon',
+ type: 'image/x-icon',
+ href: 'favicon.ico'
+ }
+ ]
},
/*
** Customize the progress-bar color
@@ -41,7 +41,25 @@ module.exports = {
/*
** Nuxt.js modules
*/
- modules: ['@nuxtjs/pwa'],
+ modules: ['@nuxtjs/pwa', '@nuxtjs/markdownit'],
+
+ markdownit: {
+ injected: true
+ },
+
+ generate: {
+ routes: function () {
+ const fs = require('fs')
+ const path = require('path')
+ return fs.readdirSync('static/content/blog').map(file => {
+ return {
+ route: `/blog/${path.parse(file).name}`, // Return the slug
+ payload: require(`static/content/blog/${file}`)
+ }
+ })
+ }
+ },
+
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module