I’ve made my Eleventy website’s links have image icons and for some reason, when I add the third and last image asset it turns the entire page into a link.
can you check in the DOM inspector to see if it’s parsed the way you want? you have some errors in the HTML syntax. the indentation is not clear in the source code, so it’ll be easier to see the hierarchy from the DOM inspector too.
Thanks for your fast response! I’m not super sure if this answers your question but here’s a screenshot of where the “/work” href shows up, especially in and around the area where the unwanted link shows up.
there’s not even a <header> element, instead there’s <main>
something starts an <a href="/work"> link toward the beginning, compared to the source where it’s the last link
something linking to /posts/newpost/ which didn’t even appear
come to think of it, this seems like it’s coming from another part of your code, outside of the header.
see that red underlined < character in the line with the error? look over at the matching >. actually there isn’t one.
bad luck on the error message though, it looks like when the editor can’t find the matching >, it instead thinks you meant to type a literal “<” less than sign.
Okay so the /newpost was a test blog post I made to see if it would work - it did so I deleted it, and I’ve had a look through the code and it’s definitely not there still. Is it possible there’s something happening on the backend thru eleventy that I can’t see?
Reckon I should just kill this and start again? Or is there somewhere else I should look? I’m not too fussed honestly - most of it is just reuploading assets. It’s likely, with my fiddling around with it earlier, that I’ve messed something up somewhere.
I did as you said and did a project-wide search for “newpost” and nothing came up, so I started again from scratch.
I have made minimal changes: fonts, colours, text positioning and link name changes.
But again the same issue - where I add an image asset to the last link turns the whole page into a link - has occurred. Here’s a new image from right-click and inspecting the problem area.