@ -1,21 +1,30 @@
|
||||
|
||||
const { howlongtobeat, webmention } = require('jam-my-stack');
|
||||
const { howlongtobeat, webmention, youtube } = require('jam-my-stack');
|
||||
const fsp = require('fs').promises;
|
||||
|
||||
|
||||
(async function() {
|
||||
// 1. get how long to beat times
|
||||
console.log("1. adding Howlongtobeat info...")
|
||||
await howlongtobeat.howlong(`${__dirname}/content/articles`)
|
||||
|
||||
// 4. get webmentions
|
||||
// 2. get webmentions
|
||||
console.log("2. Fetching webmentions...")
|
||||
const mentions = await webmention.getWebmentions("jefklakscodex.com")
|
||||
const json = JSON.stringify(mentions, null, 4)
|
||||
await fsp.writeFile(`${__dirname}/data/webmentions.json`, json, 'utf-8')
|
||||
|
||||
// 5. send webmentions
|
||||
// 3. send webmentions
|
||||
console.log("3. Sending webmentions...")
|
||||
await webmention.send("jefklakscodex.com")
|
||||
|
||||
// 4. generate youtube thumbnails.
|
||||
console.log("4. Generating YouTube thumbnails...")
|
||||
await youtube.thumbify({
|
||||
postDir: `${__dirname}/content/articles`,
|
||||
downloadDir: `${__dirname}/static/img/yt`,
|
||||
overlayImg: `${__dirname}/play.png`
|
||||
})
|
||||
|
||||
console.log("-- all done!")
|
||||
})()
|
||||
|
@ -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>
|
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 55 KiB |