feat: eleventy transform for images
This commit is contained in:
parent
243b1103e4
commit
7e1597b36a
36 changed files with 179 additions and 1262 deletions
|
@ -1,16 +1,11 @@
|
|||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
import StatusMock from './json/mocks/status.js'
|
||||
|
||||
export default async function () {
|
||||
const url = 'https://api.omg.lol/address/cory/statuses/'
|
||||
if (process.env.ELEVENTY_PRODUCTION) {
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
}).catch()
|
||||
const status = await res
|
||||
return status.response['statuses'][0]
|
||||
} else {
|
||||
return StatusMock
|
||||
}
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
}).catch()
|
||||
const status = await res
|
||||
return status.response['statuses'][0]
|
||||
}
|
||||
|
|
Reference in a new issue