feat: video static thumbnails (#164)

Closes #163 

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2018-07-29 09:44:15 +01:00 committed by GitHub
parent 94e5cf2f44
commit cd0e7d775e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 16 deletions

View file

@ -8,13 +8,9 @@ const contentDir = path.join(__dirname, '../src/content')
const indexesDir = path.join(__dirname, '../src/layouts/partials/indexes')
const processDataType = (data) => {
const content = data.content.map((info, index) => {
const content = data.content.map(info => {
const { website, ...more } = info
if (data.title === 'Videos' && website.includes('youtube')) {
more.youtube = website.replace('https://www.youtube.com/watch?v=', '')
}
return {
website: website,
categories: [data.title.toLowerCase()],