Search code examples
node.jsexpressgithubsvgreadme

Home-brewed view counter on GitHub profile malfunctioning?


I recently made myself a view counter to embed in Markdown, but for some odd reason GitHub's flavored Markdown is doing the weirdest thing.

The way my counter is set up, you can view the counter at the path /viewcount/:countername, and the Express path parameters would catch the counter's name and compare it against a json database to pull the data and serve an svg, but I added in an extra "404" counter so that it doesn't display nothing when there is no data. It works fine in other Markdown files. The problem is, even when I have a working counter GitHub seems to show the 404 counter anyway (and when I try logging the request data, it shows nothing).

Here's my GitHub profile, can you help me find a solution?


Solution

  • Answer: Curiously urls ending in .svg do not display their intended content. Changing the url to end in .png displayed the image correctly!