feat: add youtube shortcode
This commit is contained in:
parent
4c1b65ac93
commit
77da511139
11 changed files with 46 additions and 15 deletions
14
config/shortcodes/youtube.js
Normal file
14
config/shortcodes/youtube.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* Sourced from eleventy-excellent's youtube shortcode
|
||||
* https://github.com/madrilene/eleventy-excellent/blob/main/config/shortcodes/youtube-lite/index.js
|
||||
*/
|
||||
const liteYoutube = (id, label) => {
|
||||
return `
|
||||
<div class="youtube-embed"> <lite-youtube videoid="${id}" style="background-image: url('https://i.ytimg.com/vi/${id}/hqdefault.jpg');">
|
||||
<button type="button" class="lty-playbtn">
|
||||
<span class="lyt-visually-hidden">${label}</span>
|
||||
</button>
|
||||
</lite-youtube></div>
|
||||
`;
|
||||
};
|
||||
|
||||
module.exports = liteYoutube;
|
|
@ -16,6 +16,7 @@ const {
|
|||
} = require("./config/filters/index.js");
|
||||
const markdown = require("./config/plugins/markdown.js");
|
||||
const imageShortcode = require("./config/shortcodes/image.js");
|
||||
const liteYoutube = require("./config/shortcodes/youtube.js");
|
||||
|
||||
module.exports = (eleventyConfig) => {
|
||||
eleventyConfig.addWatchTarget("./src/assets");
|
||||
|
@ -47,7 +48,10 @@ module.exports = (eleventyConfig) => {
|
|||
|
||||
// --------------------- Markdown -----------------------
|
||||
eleventyConfig.setLibrary("md", markdown);
|
||||
|
||||
// --------------------- Shortcodes -----------------------
|
||||
eleventyConfig.addShortcode("image", imageShortcode);
|
||||
eleventyConfig.addShortcode("youtube", liteYoutube);
|
||||
|
||||
return {
|
||||
// Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
{% include "css/spacing.njk" %}
|
||||
{% endset %}
|
||||
<style>{{ css | minifyCss | safe }}</style>
|
||||
{% if youtube %}
|
||||
<!-- youtube, if true in frontmatter -->
|
||||
<script type="module"
|
||||
src="https://cdn.jsdelivr.net/npm/@justinribeiro/lite-youtube@1.4.0/lite-youtube.min.js"></script>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body class="[ flex-col ]">
|
||||
{% include "partials/header.html" %}
|
||||
|
|
|
@ -4,6 +4,7 @@ subtitle: PlayStation Portable
|
|||
date: 2016-03-16
|
||||
image: https://cdn.wonderfulfrog.com/p3p.jpg
|
||||
tags: ["psp", "persona"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
My completion time was somewhere around 72 hours. It's hard to talk about such a story-dense game without spoiling too much - but what I will say about the story is that it's probably one of the best I've ever experienced. The game is likely not for everyone... the playtime alone might turn some people off. I think of it more like a large book - it'll take you a while to get through - but the major plot points keep you engrossed. You get attached to the characters - because of the game length. By the end of the game they are all close friends.
|
||||
|
@ -16,13 +17,13 @@ The battle system is not without its shortcomings - it feels a little unforgivin
|
|||
|
||||
I can't end it without mentioning the music. Second to the story, it's top-notch, definitely some of the best I've heard in any game full stop. I have a feeling the music in a vacuum won't have the same impact as when its heard in-game. Regardless, here are a few favourites:
|
||||
|
||||
TODO: YouTube: https://www.youtube.com/watch?v=6jFaoLrLzd4
|
||||
{% youtube "6jFaoLrLzd4", "Persona 3 OST - Mass Destruction" %}
|
||||
|
||||
https://www.youtube.com/watch?v=e2Gyaqf7EoU
|
||||
{% youtube "e2Gyaqf7EoU", "Persona 3 OST - Iwatodai Dorm" %}
|
||||
|
||||
https://www.youtube.com/watch?v=sFH7O9huUYU
|
||||
{% youtube "sFH7O9huUYU", "Paulownian Mall - Persona 3" %}
|
||||
|
||||
https://www.youtube.com/watch?v=yoVn6Eh6rus
|
||||
{% youtube "yoVn6Eh6rus", "Persona 3 OST: Unavoidable Battle" %}
|
||||
|
||||
If you're looking for an RPG with a top-notch story, this is the one. If you're looking for one with compelling gameplay... keep looking I'd say.
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Give In to Feel Good
|
|||
date: 2020-08-16
|
||||
excerpt: Procrastination isn’t just about laziness, is it?
|
||||
tags: ["procrastination", "mental health"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
Procrastination is something I struggle with every single day. I find it often strikes as critical thoughts:
|
||||
|
@ -17,7 +18,7 @@ The thoughts I get all the time are like a form of anxiety. I don’t cope well
|
|||
|
||||
[This thread on Hacker News](https://news.ycombinator.com/item?id=24120275) prompted my journey into my own procrastination, and [this video](https://www.youtube.com/watch?v=mhFQA998WiA) from the thread helped me look at procrastination in a different way. This was a lightbulb moment for me. To me my source of procrastination is not myself being lazy or uninterested, but being critical. I’m a perfectionist (and I’ve come to realize I don’t like that), and I am plagued by reasons I shouldn’t start a task. This helps me at least identify the problem.
|
||||
|
||||
TODO: YouTube shortcode: mhFQA998WiA
|
||||
{% youtube "mhFQA998WiA", "Teaching Talk: Helping Students Who Procrastinate (Tim Pychyl)" %}
|
||||
|
||||
I have some actionable goals that I want to try:
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Recently
|
|||
date: 2022-02-01T23:49:47.158Z
|
||||
excerpt: February 2022.
|
||||
tags: ["recently"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
{% image "https://cdn.wonderfulfrog.com/lastfm-feb-2022.jpeg", "My most-played music last month.", "" %}
|
||||
|
@ -25,7 +26,7 @@ Again, the immune system is a violent thing, and it's hard to explain without re
|
|||
|
||||
## Playing
|
||||
|
||||
TODO: YouTube: vFhzUdVs9-E
|
||||
{% youtube "vFhzUdVs9-E", "The Witcher 3: Hillarious goat quest" %}
|
||||
|
||||
I started [The Witcher 3](https://store.steampowered.com/app/292030/The_Witcher_3_Wild_Hunt/) last month. I'm determined to get through it and find out what the fuss is about. It's got its hooks in me good. It suffers from classic open-world tropes like an overabundance of quests, too many locations to visit, weird janky physics, and plenty of other funky bugs.
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Recently
|
|||
date: 2021-03-05
|
||||
excerpt: February 2021.
|
||||
tags: ["recently", "valheim"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
{% image "https://cdn.wonderfulfrog.com/forestsunrise.png", "A screenshot of Valheim with a sunrise coming through a thick, dense forest." , "" %}
|
||||
|
@ -57,7 +58,7 @@ We recently discovered that with the Star acquisition from Disney that Futurama
|
|||
|
||||
Here’s my favorite bit ever:
|
||||
|
||||
TODO: YouTube: pjsQ-seC31U
|
||||
{% youtube "sE8aVgOxjJU", "Futurama - No good, it's full of steam!" %}
|
||||
|
||||
## Playing
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Recently
|
|||
date: 2021-04-01T19:03:49.841Z
|
||||
excerpt: March 2021.
|
||||
tags: ["recently", "valheim"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
{% image "https://cdn.wonderfulfrog.com/coolbow.png", "My Valheim character under the moon." %}
|
||||
|
@ -27,7 +28,7 @@ Been keeping busy on the games front lately! The Switch is a wonderful console.
|
|||
|
||||
Our group finished what I would consider to be the “campaign” of the game: the 5 bosses. We wrapped up about mid-March, slaying the mighty Yalguth after a long, hard battle. It was a lot of fun because it required coordination and resource management.
|
||||
|
||||

|
||||
{% image "https://cdn.wonderfulfrog.com/theend.png", "Our heroes stand triumphant and display their grisly trophy!", "Our heroes stand triumphant and display their grisly trophy!" %}
|
||||
|
||||
Since we finished all the bosses, we’ve fallen off the game. Without the next boss to work toward, the game became resource-gathering and base-building. A fun activity, but does not appeal to everyone. Without my friends playing, I don’t find myself all that interested.
|
||||
|
||||
|
@ -35,7 +36,7 @@ For $20 though, some of the best times I’ve had with a game in recent memory.
|
|||
|
||||
There are updates planned for Valheim that could be pretty exciting (like the Mistlands, Firelands, and Deep North being implemented), which might pull our group back in.
|
||||
|
||||

|
||||
{% image "https://cdn.wonderfulfrog.com/yagluthsummon.png", "The summoning area for Yagluth, the final boss. He wants totems from his Fuling followers.", "The summoning area for Yagluth, the final boss. He wants totems from his Fuling followers." %}
|
||||
|
||||
### Stardew Valley
|
||||
|
||||
|
@ -75,10 +76,10 @@ Tomorrow (April 2nd) is Bandcamp Friday!!
|
|||
|
||||
## Watching
|
||||
|
||||
TODO: YouTube: VrKW58MS12g
|
||||
{% youtube "VrKW58MS12g", "Glitterbomb Trap Catches Phone Scammer (who gets arrested)" %}
|
||||
|
||||
It never ceases to amaze me how far Mark Rober will go to be annoying to package thieves and scammers. The interesting part of this video is showing how deep the rabbit hole goes with these scammer ring. Rober teamed up with other YouTubers to show all of this — I found Jim Browning’s video incredibly interesting because it showed me a fascinating part of the ring: the money mule.
|
||||
|
||||
TODO: YouTube: Xvjjpzyiig4
|
||||
{% youtube "Xvjjpzyiig4", "Catching Money Mules ft. Mark Rober" %}
|
||||
|
||||
See everyone next month. ✌️
|
||||
|
|
|
@ -4,6 +4,7 @@ draft: false
|
|||
date: 2021-05-01T19:03:49.841Z
|
||||
excerpt: April 2021.
|
||||
tags: ["recently"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
{% image "https://cdn.wonderfulfrog.com/mistergotcha.png", "The Nib's 'Mister Gotcha' comic" %}
|
||||
|
@ -16,7 +17,7 @@ Have you been feeling “blah” lately? You’re not depressed or overly anxiou
|
|||
|
||||
I’ve been reading a lot of articles and posts on Apple and the App Store: Apple vs. Epic, antitrust lawsuits, Apple crushing competitors. There’s a lot to unpack, and I plan to in another post. For now though I want to leave you with MKBHD’s excellent “Apple vs. The Paradox of Choice”. This is what happens when we put too much trust into one company without any checks and balances.
|
||||
|
||||
TODO YouTube: qNAo0UdYF6g
|
||||
{% youtube "qNAo0UdYF6g", "Apple vs The Paradox of Choice!" %}
|
||||
|
||||
You know the state of the video game industry is in a bad spot when [Sony is patenting an AI that will play video games for you][sonyai]. The intent appears to be innocent at first — it will learn how you play and assist you — but the larger implication I feel is that it will play games _for you_, as in you sit there and watch and it’ll do everything. Because games are too grind-y these days, right? Even though it was the game industry itself that got us to this point. The relentless pursuit of maximizing retention and engagement propels into games that are playing themselves.
|
||||
|
||||
|
@ -32,7 +33,7 @@ The second season is not as great. They zeroed into the family drama aspect of t
|
|||
|
||||
I recommend though for anyone with Apple TV+.
|
||||
|
||||
TODO YouTube: ijKAtzQY1wc
|
||||
{% youtube "ijKAtzQY1wc", "Yasuke | Official Trailer | Netflix" %}
|
||||
|
||||
I discovered [Yasuke][yasuke] as a new album from Flying Lotus (which is _phenomenal_), but the premise and protagonist sold me on it. I’ve only seen one episode, but I’m hungry for more.
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@ title: "Tadpoles: The Big Little Migration"
|
|||
date: 2021-01-10
|
||||
excerpt: A short film about frogs.
|
||||
tags: ["short film", "frogs"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
TODO: YouTube: 5S-lZtE1J6M
|
||||
{% youtube "5S-lZtE1J6M", "Tadpoles: The Big Little Migration" %}
|
||||
|
||||
Frogs are undoubtedly my favorite animal, and seeing a short film about them beings me so much joy. The tadpole is not a stage in a frog's life you see emphasized much. Not to mention this was filmed right in my beautiful province!
|
||||
|
||||
|
|
|
@ -3,9 +3,10 @@ title: Take The Power Back (Over My Music)
|
|||
date: 2020-07-26
|
||||
excerpt: One guy's struggle to regain ownership of some MP3 files.
|
||||
tags: ["music", "beets", "plex"]
|
||||
youtube: true
|
||||
---
|
||||
|
||||
TODO: Come up with a YouTube shortcode for this video: qKSNABST4b0
|
||||
{% youtube "qKSNABST4b0", "Rage Against The Machine - Take The Power Back (Audio)" %}
|
||||
|
||||
When did Rage Against the Machine [get so political](https://www.nme.com/news/music/tom-morello-twitter-respond-to-people-only-just-realising-rage-against-the-machine-are-political-2685353), anyway?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue