diff --git a/.eleventy.js b/.eleventy.js
index 85d0e797..23bd0dd2 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -11,7 +11,7 @@ const groupByYear = require("./src/filters/group_by_year.js");
const thumbnails = require("./src/thumbnails.js");
const tab_gallery = require("./src/shortcodes/make_tab_gallery.js");
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
-
+const install_media_objects = require("./src/media_object.js");
const {
fortawesomeBrandsPlugin,
} = require('@vidhill/fortawesome-brands-11ty-shortcode');
@@ -22,10 +22,13 @@ module.exports = function(eleventyConfig) {
const markdownLib = markdownIt({html: true, typographer: true});
markdownLib.use(markdownItAnchor);
markdownLib.use(markdownItAttrs);
+
eleventyConfig.setLibrary("md", markdownLib);
eleventyConfig.addPlugin(fortawesomeBrandsPlugin);
eleventyConfig.addPlugin(syntaxHighlight);
+ install_media_objects(eleventyConfig);
+
//copy through assets
eleventyConfig.addPassthroughCopy("admin");
eleventyConfig.addPassthroughCopy("assets");
diff --git a/content/2010/01/2010-01-19-the-lego-rcx-inside-and-out.md b/content/2010/01/2010-01-19-the-lego-rcx-inside-and-out.md
index 0c517981..9aeebae7 100644
--- a/content/2010/01/2010-01-19-the-lego-rcx-inside-and-out.md
+++ b/content/2010/01/2010-01-19-the-lego-rcx-inside-and-out.md
@@ -46,25 +46,19 @@ The Lego RCX is no longer available, but there are many books on the subject wor
(paid links)
-
+{% amazon_media "content/amazon_product_images/71O7fqvyWML._AC_SL1024_.jpg", "LEGO 51515 MINDSTORMS Robot Inventor Robotics Kit, Coding Set for Kids, 5in1 App Remote Control Programmable Interactive Toy", "https://amzn.to/41FUj0J" %}
+ This is the current generation in awesome Lego robot and contraption building kits.
+ This toy comes with 4 smart motors, an LED screen, speaker for sounds, a distance sensor,
+ colour sensor, 6 axis gyroscope (orientation sensor).
+ Your imagination is the only limit. Build a robot with Lego, and program it with blocks or MicroPython.
+ As it's Lego, you can extend it with any other bricks from the Lego system.
+{% endamazon_media %}
-(paid links)
-
-
-
-[NQC](/wiki/nqc)
+[NQC](/wiki/nqc) - Not Quite C - is a C-like language for programming the RCX. It is a great way to get started with the RCX, and is a good way to learn C programming. NQC is a free download, and is available for Windows, Linux and Mac OS X.
## LeJOS - A Java based Lego RCX System
@@ -201,20 +195,31 @@ These items will help you to open up and look inside an RCX. Make sure you don't
(paid links)
-
-  | A flat-head jewellers screwdriver.
-here are some very fiddly screws when opening devices like this, once you've levered off the case. These Jewellers sets are just the trick to do so.
- |
-  | Safety Goggles
+{% amazon_media "content/amazon_product_images/81c9LK5TiWL._AC_SX679_.jpg", "iFixit Essential Electronics Toolkit, Basic tool-set with 16 precision bits (4 mm), magnetic screwdriver & opening tools for electronic devices", "https://amzn.to/3P6OguA" %}
+This kit contains a lot of the tools you'll need to get the RCX open.
+
+The spudger and flat blade are perfect for levering the case open to get to screws inside.
+
+There are some very fiddly screws when opening devices like this, nice you've levered off the case. So a small set of screwdriver heads for these is also useful.
+
+The tweezers are helpful for getting screws back in later too. We like the iFixit tool quality, and their mission in helping people fix and maintain their own devices.
+{% endamazon_media %}
+
+{% amazon_media "content/amazon_product_images/71dkYvW25kL._SX522_.jpg", "DeWALT Safety Goggles DPG82-11D", "https://amzn.to/4gGtX3v" %}
As you pull things like this apart, tiny plastic bits can sometimes ping off, and if you are unlucky, you may get one in the eye - ouch! A reasonable pair of goggles is highly recommended when getting into the innards of any gadgets- because for the extra time, money and inconvenience, none of them outweigh the value of your eyes.
- |
-  |
-A positionable lamp
+
+These DeWalt goggles come from a well known brand, and are designed to keep your view clear, because foggy goggles end up over you head and not over your eyes! They are scratch resistant and designed for comfort.
+{% endamazon_media %}
+
+{% amazon_media "content/amazon_product_images/61+M7Z-G-HS._AC_SX679_.jpg", "A positionable desk lamp", "https://amzn.to/3P9iJs8" %}
A good lamp makes working with these things far easier - otherwise you find yourself holding it closely to your eyes and angling it to the light just to find something. With a good light - you just wont need that. A good thing too - as poor lighting may lead to you taking of goggles as you pry at the fiddly parts. Get a good desk lamp!
- |
-  |
-An Antistatic Wrist Strap
-While some recommend this, as your contact may cause some devices to malfunction, I rarely, if ever use a wrist strap. You may be carrying a charge - especially if you are wearing woolly jumpers or other static build clothes. However, instead of a strap, tapping on an earthed device may be just as useful. |
+{% endamazon_media %}
+
+{% amazon_media "content/amazon_product_images/71vFRH2IrrL._AC_SX679_.jpg", "An Antistatic Wrist Strap", "https://amzn.to/3BBYUGF" %}
+
+While some recommend this, as your contact may cause some devices to malfunction, I rarely, if ever use a wrist strap. You may be carrying a charge - especially if you are wearing woolly jumpers or other static build clothes. However, instead of a strap, tapping on an earthed device may be just as useful.
+
+{% endamazon_media %}
### Steps
@@ -325,13 +330,11 @@ You may get somewhere in using an older version of Quicktime to prevent errors i
Virtual Box is freely downloadable at [Virtualbox.org](http://www.virtualbox.org/). You will just need a version of Windows – I recommend 98 (which dates the RCX!) as there are no patches needed for the Mindstorms software. Just make sure you use the Windows 98 VM only for Mindstorms and do not go on the net with Windows 98.
-
In Windows 7, with the more expensive editions (which you can purchase through an Anytime upgrade), you get a version of Virtual PC, with an older version of Windows running in it, for just this kind of compatibility problem. However that is XP, and the compatibility patches that Lego were hosting have long since been removed.
Unfortunately, Lego do not support the consumer RCX so much any more, and the downloads have now also gone from their education site.
-For a simpler route in terms of drivers and so on, you may find [NQC](http://bricxcc.sourceforge.net/nqc/) and [Brickx Command Centre](http://bricxcc.sourceforge.net/) easier, although programming them takes more work and patience
-.
+For a simpler route in terms of drivers and so on, you may find [NQC](http://bricxcc.sourceforge.net/nqc/) and [Brickx Command Centre](http://bricxcc.sourceforge.net/) easier, although programming them takes more work and patience.
## More RCX, Mindstorms and Lego Information
diff --git a/content/amazon_product_images/.purpose.txt b/content/amazon_product_images/.purpose.txt
new file mode 100644
index 00000000..9a88e5df
--- /dev/null
+++ b/content/amazon_product_images/.purpose.txt
@@ -0,0 +1,2 @@
+This folder is for Amazon Product images only.
+All items in this folder belong to Amazon and its program, and not covered by the general license for the site. The licenses and copyrights of Amazon and it's marketplace users apply here.
diff --git a/content/amazon_product_images/51WPUFfE3BL.jpg b/content/amazon_product_images/51WPUFfE3BL.jpg
new file mode 100644
index 00000000..cebff7f7
Binary files /dev/null and b/content/amazon_product_images/51WPUFfE3BL.jpg differ
diff --git a/content/amazon_product_images/61+M7Z-G-HS._AC_SX679_.jpg b/content/amazon_product_images/61+M7Z-G-HS._AC_SX679_.jpg
new file mode 100644
index 00000000..2a6f46d7
Binary files /dev/null and b/content/amazon_product_images/61+M7Z-G-HS._AC_SX679_.jpg differ
diff --git a/content/amazon_product_images/71O7fqvyWML._AC_SL1024_.jpg b/content/amazon_product_images/71O7fqvyWML._AC_SL1024_.jpg
new file mode 100644
index 00000000..1496210d
Binary files /dev/null and b/content/amazon_product_images/71O7fqvyWML._AC_SL1024_.jpg differ
diff --git a/content/amazon_product_images/71dkYvW25kL._SX522_.jpg b/content/amazon_product_images/71dkYvW25kL._SX522_.jpg
new file mode 100644
index 00000000..638e27b7
Binary files /dev/null and b/content/amazon_product_images/71dkYvW25kL._SX522_.jpg differ
diff --git a/content/amazon_product_images/71vFRH2IrrL._AC_SX679_.jpg b/content/amazon_product_images/71vFRH2IrrL._AC_SX679_.jpg
new file mode 100644
index 00000000..bc390a79
Binary files /dev/null and b/content/amazon_product_images/71vFRH2IrrL._AC_SX679_.jpg differ
diff --git a/content/amazon_product_images/81c9LK5TiWL._AC_SX679_.jpg b/content/amazon_product_images/81c9LK5TiWL._AC_SX679_.jpg
new file mode 100644
index 00000000..5192ee6d
Binary files /dev/null and b/content/amazon_product_images/81c9LK5TiWL._AC_SX679_.jpg differ
diff --git a/src/media_object.js b/src/media_object.js
new file mode 100644
index 00000000..cc5f8198
--- /dev/null
+++ b/src/media_object.js
@@ -0,0 +1,23 @@
+
+function amazon_media(content, img_src, title, link) {
+ if (img_src.startsWith("content/")) {
+ img_src = img_src.replace("content/", "/");
+ }
+ return `
+
+ `
+}
+
+module.exports = function install_media_objects(eleventyConfig) {
+ console.log("Installing media objects");
+ eleventyConfig.addPairedShortcode("amazon_media", amazon_media);
+};