Hello,
I’ve been following the Hugo Quickstart tutorial using the Ananke theme and I’ve successfully added an HTML image with an image map containing href links. It works but the theme scales the image so I’m forced to manually scale all the coordinates in the map. Is there a native Hugo or Markdown way to add an image map?
Here’s an example of what I’m doing now:
---
title: "Top Level"
date: 2021-05-04T11:09:54-07:00
featured_image: "/images/my-image-200dpi.png"
description:Top Level Design
draft: true
---
# Top-Level Hardware
The top level block diagram is shown below:
<img src="/images/my-image-200dpi.png" alt="image using html" usemap="#my-image-map" />
<map name="my-image-map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:rob -->
<area shape="rect" coords="52,92,87,176" href="/circuits/power-supply" />
<area shape="rect" coords="11,56,60,82" href="/circuits/power-on-circuit" />
<area shape="rect" coords="151,46,374,193" href="/circuits/read-only-memory" />
<area shape="rect" coords="424,70,480,106" href="/circuits/clock-driver" />
<area shape="rect" coords="492,42,624,196" href="/circuits/display-system" />
<area shape="rect" coords="520,56,590,88" href="/circuits/cathode-driver" />
<area shape="rect" coords="520,106,590,138" href="/circuits/led-display" />
<area shape="rect" coords="520,153,590,186" href="/circuits/anode-driver" />
<area shape="rect" coords="6,204,101,332" href="/circuits/keyboard" />
<area shape="rect" coords="113,210,278,319" href="/circuits/control-and-timing" />
<area shape="rect" coords="460,210,610,319" href="/circuits/arithmetic-and-register" />
<area shape="rect" coords="381,353,460,385" href="/circuits/data-storage-circuit" />
</map>
Above is image using html. Click a block.
Note that I’m not much of a web programmer - I don’t have experience with javascript, css, or the like so I’d like to use the normal markdown syntax but I need an image map function. I use Dokuwiki quite a bit at the office and there’s an image map plug-in available for it. I’m hoping for something like that.
Thanks,
-Rob