From 1493a0dd41dbed20c17ab6a622e70cf01fdf81a2 Mon Sep 17 00:00:00 2001 From: Matthew Ess Date: Thu, 18 Oct 2018 02:19:46 -0400 Subject: [PATCH] Working blog, I think! --- .gitignore | 1 + components/hero.vue | 6 ++-- content/2018-10-16-BlogWithVueNuxtNuxtent.md | 15 --------- .../{2018-10-17-FirstPost.md => FirstPost.md} | 0 layouts/compact.vue | 2 +- layouts/default.vue | 2 +- nuxt.config.js | 32 +++++++++++-------- pages/blog.vue | 7 +--- pages/blog/_slug.vue | 4 +-- pages/blog/index.vue | 18 +++++++---- pages/projects.vue | 2 +- pages/resume.vue | 2 +- 12 files changed, 42 insertions(+), 49 deletions(-) delete mode 100644 content/2018-10-16-BlogWithVueNuxtNuxtent.md rename content/{2018-10-17-FirstPost.md => FirstPost.md} (100%) diff --git a/.gitignore b/.gitignore index 29669c1..6a1ea61 100644 --- a/.gitignore +++ b/.gitignore @@ -69,6 +69,7 @@ typings/ .nuxt # Nuxt generate +public dist # vuepress build output diff --git a/components/hero.vue b/components/hero.vue index d481388..bc8648a 100644 --- a/components/hero.vue +++ b/components/hero.vue @@ -18,9 +18,9 @@ export default { props: { compact: { type: Boolean, - default: false - } - } + default: false, + }, + }, } diff --git a/content/2018-10-16-BlogWithVueNuxtNuxtent.md b/content/2018-10-16-BlogWithVueNuxtNuxtent.md deleted file mode 100644 index b89c2a9..0000000 --- a/content/2018-10-16-BlogWithVueNuxtNuxtent.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: writing your own blog in Vue, powered by Nuxt, and Nuxtent -tagline: break free from boring jekyll themes -tags: - - blog - - vue - - vuejs - - nuxt - - nuxtent - - markdown - - static site - - github pages - - gitlab pages -draft: true ---- diff --git a/content/2018-10-17-FirstPost.md b/content/FirstPost.md similarity index 100% rename from content/2018-10-17-FirstPost.md rename to content/FirstPost.md diff --git a/layouts/compact.vue b/layouts/compact.vue index 38801c6..f7bbe30 100644 --- a/layouts/compact.vue +++ b/layouts/compact.vue @@ -10,7 +10,7 @@ import hero from '../components/hero.vue' export default { - components: { hero } + components: { hero }, } diff --git a/layouts/default.vue b/layouts/default.vue index 306f431..adda551 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -10,7 +10,7 @@ import hero from '../components/hero.vue' export default { - components: { hero } + components: { hero }, } diff --git a/nuxt.config.js b/nuxt.config.js index 1dc76d7..4222426 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -14,8 +14,8 @@ export default { { charset: 'utf-8' }, { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge,chrome=1' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - { hid: 'description', name: 'description', content: pkg.description } - ] + { hid: 'description', name: 'description', content: pkg.description }, + ], }, /* @@ -42,7 +42,7 @@ export default { ** Static Site Generation configuration */ generate: { - dir: 'public' + dir: 'public', }, /* @@ -50,10 +50,16 @@ export default { */ nuxtent: { content: { - page: '/blog/_slug', - permalink: ':slug', - generate: ['get', 'getAll'] - } + page: '/_slug', + permalink: '/blog/:slug', + isPost: false, + generate: ['get', 'getAll'], + }, + api: isStatic => { + return { + browserBaseURL: isStatic ? 'https://mat.services' : '', + } + }, }, /* @@ -63,9 +69,9 @@ export default { postcss: { preset: { features: { - customProperties: false - } - } + customProperties: false, + }, + }, }, /* ** You can extend webpack config here @@ -77,9 +83,9 @@ export default { enforce: 'pre', test: /\.(js|vue)$/, loader: 'eslint-loader', - exclude: /(node_modules)/ + exclude: /(node_modules)/, }) } - } - } + }, + }, } diff --git a/pages/blog.vue b/pages/blog.vue index 4f68539..f9c3d9d 100644 --- a/pages/blog.vue +++ b/pages/blog.vue @@ -8,15 +8,10 @@ diff --git a/pages/blog/_slug.vue b/pages/blog/_slug.vue index f6f817b..7716648 100644 --- a/pages/blog/_slug.vue +++ b/pages/blog/_slug.vue @@ -10,9 +10,9 @@ diff --git a/pages/projects.vue b/pages/projects.vue index 5111016..9d52ddb 100644 --- a/pages/projects.vue +++ b/pages/projects.vue @@ -38,7 +38,7 @@ export default { head() { return { title: 'projects' } }, - layout: 'compact' + layout: 'compact', } diff --git a/pages/resume.vue b/pages/resume.vue index a180f70..134d098 100644 --- a/pages/resume.vue +++ b/pages/resume.vue @@ -49,7 +49,7 @@ export default { head() { return { title: 'resume' } }, - layout: 'compact' + layout: 'compact', }