jam-my-stack youtube implementation executed

This commit is contained in:
Wouter Groeneveld 2021-06-15 13:31:36 +02:00
parent d6a74e01e3
commit 0e749db4ae
8 changed files with 769 additions and 18 deletions

View File

@ -22,6 +22,6 @@ Who doesn't like cookies? I'm [a baker](https://redzuurdesem.be/) - I would know
I achieved this by ditching Google Analytics and hosting third-party libraries myself. So _rest assured_, Google does not know you were here! Instead, I use [GoatCounter](https://www.goatcounter.com), a simple and privacy-focused analytics system that is self-hosted. It does _not_ require any cookie and runs on my own SSL-verified domain. I achieved this by ditching Google Analytics and hosting third-party libraries myself. So _rest assured_, Google does not know you were here! Instead, I use [GoatCounter](https://www.goatcounter.com), a simple and privacy-focused analytics system that is self-hosted. It does _not_ require any cookie and runs on my own SSL-verified domain.
There is no commenting system anymore. One less thing to be worried about. Simply reply via e-mail or Mastodon instead. There are no YouTube-embedded videos that come with free tracking cookies. There is no commenting system anymore. One less thing to be worried about. Simply reply via e-mail or Mastodon instead. There are no YouTube-embedded videos that come with free tracking cookies: self-hosted thumbnails are embedded instead.
Read more about how tracking works in [this blog post](/post/2020/06/tracking-and-privacy-on-websites/). Read more about how tracking works in [this blog post](/post/2020/06/tracking-and-privacy-on-websites/).

View File

@ -1,4 +1,18 @@
[ [
{
"author": {
"name": "Jefklak",
"picture": "/pictures/jefklakscodex.com"
},
"name": "E3 2021: a Retro PC Gamer's Perspective",
"content": "The summer of 2021 is here: not only the sun, but also hope is in the air. Most conferences are still mostly virtually presented, but at least this time E3 isnt completely canceled. Even though most of the bombs still need to be dropped (Switch Pr...",
"published": "2021-06-14T00:00:00+00:00",
"url": "https://jefklakscodex.com/articles/features/e3-2021-pc/",
"type": "mention",
"source": "https://jefklakscodex.com/articles/features/e3-2021-pc/",
"target": "https://brainbaking.com/post/2020/06/about-perseverance/",
"relativeTarget": "/post/2020/06/about-perseverance/"
},
{ {
"author": { "author": {
"name": "Peter Rukavina", "name": "Peter Rukavina",

View File

@ -1,5 +1,5 @@
const { mastodon, goodreads, lunr, webmention } = require('jam-my-stack'); const { mastodon, goodreads, lunr, webmention, youtube } = require('jam-my-stack');
const fsp = require('fs').promises; const fsp = require('fs').promises;
@ -36,6 +36,14 @@ const fsp = require('fs').promises;
console.log("5. Sending webmentions...") console.log("5. Sending webmentions...")
const since = await webmention.send("brainbaking.com") const since = await webmention.send("brainbaking.com")
console.log(` -- done`) console.log(` -- done`)
// 6. generate youtube thumbnails
console.log("6. Generating YouTube thumbnails...")
await youtube.thumbify({
postDir: `${__dirname}/content/post`,
downloadDir: `${__dirname}/static/img/yt`,
overlayImg: `${__dirname}/play.png`
})
console.log("-- all done!") console.log("-- all done!")
})() })()

View File

@ -0,0 +1,5 @@
<figure>
<a href="https://www.youtube.com/watch?v={{ index .Params 0 }}" class="lbox">
<img loading="lazy" class="img-responsive" src="/img/yt/{{ index .Params 0 }}.jpg" alt="YouTube video {{ index .Params 0 }}">
</a>
</figure>

View File

@ -27,6 +27,6 @@
}, },
"homepage": "https://brainbaking.com", "homepage": "https://brainbaking.com",
"dependencies": { "dependencies": {
"jam-my-stack": "^1.0.17" "jam-my-stack": "^1.0.19"
} }
} }

BIN
play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

754
yarn.lock

File diff suppressed because it is too large Load Diff