rknightuk/eleventy-plugin-post-graph

Rendering issue with post graph on my blog

cfjedimaster opened this issue · 4 comments

Check out my post graph here:

https://www.raymondcamden.com/postgraph

Two issues I've noticed:

  • 2018 and 2007 are 2x size wise. Any reason why?
  • This is probably RTFM, but the dark spaces mean no content, green mean content... what do the empty spaces imply?

Hi Raymond, will look into this when I get a chance.

But to answer your second question the empty spaces at the start are for the year starting on a specific day - so this year started on sunday so there are 6 empty spaces first.

So the issue here was when using a markdown page, some of the newlines were adding in paragraph tags. I managed to replicate this my end so if you could try the latest version (1.0.2) it should fix it. If it doesn't, please reopen this and I'll take another look 😊

@cfjedimaster I've now pushed another fix on 1.0.3 which should also help.

So, I updated, and nothing went wrong locally, but locally I only load a small subset of posts to keep my builds quicker. When I deployed, it failed because the output messed with HTMLMIN. Here's a portion of that output:

8:05:30 AM: [11ty] Problem writing Eleventy templates: (more in DEBUG output)
8:05:30 AM: [11ty] 1. Having trouble writing to "_site/postgraph/index.html" from "./src/misc/postgraph.md" (via EleventyTemplateError)
8:05:30 AM: [11ty] 2. Transform `htmlmin` encountered an error when transforming ./src/misc/postgraph.md. (via EleventyTransformError)
8:05:30 AM: [11ty] 3. Parse Error: <div class="epg" style="color: var(--text);
[11ty] <p>margin: 20px 0;&quot;&gt;

There was a crap ton more in the log, but that gives you an idea. Now, I know that's not your plugin so it may not be the fault of this plugin, but figured I'd share it. For now, I'm going to disable htmlmin for this file.