doncabreraphone / victorhugo

The most popular search engine optimization plug-in for Hugo (a static site generator). Victor Hugo helps you write good SEO content for your blog, the easy way. UPDATE: I am currently in the process of making Victor Hugo a standalone tool that can be used with any static website, not just Hugo.
GNU General Public License v3.0
72 stars 7 forks source link

subheading and Flesch Reading Ease errors #6

Open mfioretti opened 3 years ago

mfioretti commented 3 years ago

Greetings,

I have just installed this Hugo partial, MANY thanks for writing it.

I have found two bugs so far, one easily solvable, the other I don't know.

The first is that the regex that counts the subheadings should change from

'<h2>' to '<h2 ' (or even '</h2>'?)

Otherwise it will NOT recognize subheadings with attributes, as it happens with my current theme, which generates headings like:

<h2 id="Conclusions">Conclusions</h2>

The other problem is much harder for me to investigate and fix. The Flesch reading ease formula seems really broken. It returns -17, or 17, but if I copy the same text from the browser to a text editor, save it as testing.txt, and feed THAT file to the Flesch tool at http://flesh.sourceforge.net/ , it returns 51.

Of course, even that tool may be buggy, but... 17? No way. The sample text is not THAT hard to read, for sure. 51 is way, way more realistic.

I can provide the raw markdown file that generates that result, but I would rather not leave it here on github. To have it and test, pls email mfioretti@nexaima.net, thanks.

doncabreraphone commented 3 years ago

Hello @mfioretti , thanks for stopping by!

I have just installed this Hugo partial, MANY thanks for writing it.

You're welcome! I'm hoping to do some more work on this one later this weekend.

The first bug: considered it fixed. The second one I'm currently investigating, since as far as I know, it is working as expected. I will dig a little more in a few days ;)