add: Preparation for external posts
Preparation for external blog posts
This commit is contained in:
parent
d6859cdaad
commit
427d9ae276
7 changed files with 435 additions and 47 deletions
|
@ -54,7 +54,3 @@ if (!article.value) {
|
|||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
6
eslint.config.mjs
Normal file
6
eslint.config.mjs
Normal file
|
@ -0,0 +1,6 @@
|
|||
// @ts-check
|
||||
import withNuxt from './.nuxt/eslint.config.mjs'
|
||||
|
||||
export default withNuxt(
|
||||
// Your custom configs here
|
||||
)
|
|
@ -75,7 +75,14 @@ export default defineNuxtConfig({
|
|||
},
|
||||
},
|
||||
|
||||
modules: ['@nuxt/icon', '@nuxt/fonts', '@vueuse/nuxt', '@nuxtjs/seo', '@nuxt/content'],
|
||||
modules: [
|
||||
'@nuxt/icon',
|
||||
'@nuxt/fonts',
|
||||
'@vueuse/nuxt',
|
||||
'@nuxtjs/seo',
|
||||
'@nuxt/content',
|
||||
'@nuxt/eslint',
|
||||
],
|
||||
|
||||
icon: {
|
||||
customCollections: [
|
||||
|
|
|
@ -15,10 +15,12 @@
|
|||
"@iconify-json/material-symbols": "^1.2.14",
|
||||
"@iconify-json/ph": "^1.2.2",
|
||||
"@iconify-json/ri": "^1.2.5",
|
||||
"@nuxt/eslint": "1.4.1",
|
||||
"@nuxt/fonts": "^0.11.4",
|
||||
"@nuxt/icon": "^1.10.3",
|
||||
"@nuxtjs/seo": "^3.0.3",
|
||||
"@vueuse/nuxt": "^13.3.0",
|
||||
"eslint": "^9.0.0",
|
||||
"nuxt": "^3.17.4",
|
||||
"postcss-nesting": "^13.0.0",
|
||||
"vue": "^3.5.15"
|
||||
|
|
6
server/api/external-posts.post.ts
Normal file
6
server/api/external-posts.post.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import type { ExternalPost } from '../../shared/types/Blog'
|
||||
|
||||
export default defineEventHandler(async () => {
|
||||
// Robert
|
||||
const webertoireResponse: ExternalPost = await (await fetch('https://robertjanus.de/blog.json')).json()
|
||||
})
|
19
shared/types/Blog.ts
Normal file
19
shared/types/Blog.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
type Post = {
|
||||
url: string
|
||||
title: string
|
||||
excerpt: string
|
||||
date: string
|
||||
}
|
||||
|
||||
type Author = {
|
||||
name: string
|
||||
img: string
|
||||
img1x: string
|
||||
img2x: string
|
||||
img3x: string
|
||||
}
|
||||
|
||||
export type ExternalPost = {
|
||||
author: Author
|
||||
posts: Post[]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue