Giter Club home page Giter Club logo

doncabreraphone / victorhugo Goto Github PK

View Code? Open in Web Editor NEW
72.0 11.0 7.0 367 KB

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.

License: GNU General Public License v3.0

HTML 100.00%
seo-optimization seotools seo-plugin

victorhugo's People

Contributors

doncabreraphone avatar jesstruck avatar marlonluan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

victorhugo's Issues

Misc problems

Ola Javier, just few things :

  • {{ if eq .Params.clean "true" }}{{ else }} should read {{ if eq .Params.Victor_Hugo_Clean "true" }}{{ else }}
  • Or better : {{ if eq site.Params.Victor_Hugo_Clean "true" }}{{ else }} so you give this parameter only once in your config.toml
  • According to this code, your README should read :
    • Victor_Hugo_Clean: accepts true or false. If true, it will not import jQuery. If it is set to false, it will import jQuery.

And more generally, are you thinking about adapting it for not only simple pages (blog) but also for the main index.html ?
Because I have a web site on one page and it doesn't work (i did not dig yet in the code to find the problems).

Thanks anyway.

Transition to a Hugo Module?

Have you considered making victorhugo into a Hugo Module? Some examples of this in action are at https://github.com/gohugoio/hugo-mod-jslibs. I think it might make victorhugo even easier to hook into a web site; it will allow users to more easily keep their version of victorhugo up-to-date; and it will likely mean you can modify victorhugo in ways that could make it more maintainable, rather than have it continue to be one big file.

victorhugo_google_snippet is not working on the frontpage

First thanks for developing this :D

the victorhugo_google_snippet does not support running on the front page, because, in line 1449 it says {{ $victorhugo__slug := substr $victorhugo__slug 1 200 }} // ignoring the first character and then takes the next 200 this is not working if the page is the frontpage because then the slug is / and ignoring the first char will leave the string empty.

Initial feedback

Hello. Well done! And thank you.

Here are a few issues that I noticed while getting this working:

  • My site uses the defer attribute on the <script> tag that loads jQuery, which means jQuery is not loaded before inline Javascript, which meant initially that victorhugo was broken on my site. I fixed this by changing this line to instead say window.addEventListener('DOMContentLoaded', function(){, which removes the dependency on jQuery until after it has loaded, even if it is marked defer.
  • victorhugo fails completely if the <meta name="description"> tag is missing entirely. In my case, I had included the partial {{ template "_internal/schema.html" . -}}, which has itemprop as its attribute instead of name. Not sure what the difference is, but ideally this wouldn't cause the code to fail entirely.

Once I resolved these two issues, victorhugo is very informative.

subheading and Flesch Reading Ease errors

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 [email protected], thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.