From 0d71deaa433bd3b0a9f850e9ccb9534ae99d60f5 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sun, 11 Apr 2021 12:26:43 +0100 Subject: [PATCH] added podcast and audio shortcodes --- content/post/testing-new-shortcodes.md | 20 +++++++++++++++++++- layouts/shortcodes/anchor.html | 1 + layouts/shortcodes/audio.html | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 layouts/shortcodes/anchor.html create mode 100644 layouts/shortcodes/audio.html diff --git a/content/post/testing-new-shortcodes.md b/content/post/testing-new-shortcodes.md index 1df9492..df3976d 100644 --- a/content/post/testing-new-shortcodes.md +++ b/content/post/testing-new-shortcodes.md @@ -3,7 +3,6 @@ title: "Testing New Shortcodes" date: 2021-04-10T11:27:58+01:00 draft: false --- -{{< time.inline >}}{{ now }}{{< /time.inline >}} Today, I'm just testing out a few new Hugo shortcodes I added to the site. I've culled these from around the internet, and hacked together some of my own. You might find them useful, if you're doing static blogging yourself. You can find all the code on the repo for this site, **{{< newtab title="found here." url="https://gitea.gmgauthier.com/gmgauthier/personal-blog" >}}** As I do more and more blogging from the static site generator, this sort of thing will be more and more useful to me, at least. @@ -42,6 +41,25 @@ A gist: {{< gist gmgauthier 183a5ff2116f8a8feafc64a3363d09db >}} +An Anchor Podcast: + +{{< anchor exitingthecave "Short-Reads-The-Consolation-of-Philosophy--Book-4--Chapter-3---What-Good-and-Evil-Deserve-eo17qb" >}} + +MP3 Audio Player: + +{{< audio "https://soundbible.com/mp3/UFO_Takeoff-Sonidor-1604321570.mp3" >}} + I'm not really sure I see a need for the strikethrough shortcode. But maybe there are instances when the double-tilde causes problems? Here's a shortcode that will put the current year into this box: [ {{< year >}} ]. That's nifty, but again, not sure why I would need that. Maybe for a copyright notice? So far, all of this has been done without javascript. I've also discovered that syntax highlighting can be done without javascript as well, and good thing, because highlightjs was causing problems for me. So, now, the site is roughly 97% javascript free. The only thing using javascript is the theme framework, in order to enable the menuing (pure-min, and responsive). + +As for code, I've removed the theme's highlightjs, and decided to just use the built-in Hugo highlighter, and pygments highlight themes, because it allows me to use standard markdown code fencing: + +```js +var x = 5; +var y = 6; +var z = x + y; +document.getElementById("demo").innerHTML = "The value of z is: " + z; +``` + +Latest Build Time: {{< time.inline >}}{{ now }}{{< /time.inline >}} diff --git a/layouts/shortcodes/anchor.html b/layouts/shortcodes/anchor.html new file mode 100644 index 0000000..6d5939d --- /dev/null +++ b/layouts/shortcodes/anchor.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/layouts/shortcodes/audio.html b/layouts/shortcodes/audio.html new file mode 100644 index 0000000..4c6aacf --- /dev/null +++ b/layouts/shortcodes/audio.html @@ -0,0 +1,5 @@ +
+ +
\ No newline at end of file