victorhugo.html | update current
This commit is contained in:
parent
a1bee77348
commit
6d9a4ab439
1 changed files with 17 additions and 19 deletions
|
|
@ -1,19 +1,17 @@
|
|||
{{ if .Site.IsServer }}
|
||||
|
||||
{{ if eq .Params.Victor_Hugo "true" }}
|
||||
{{ if .Params.Victor_Hugo }}
|
||||
|
||||
{{ if .Params.focus_keyword }}
|
||||
<!-- Victor Hugo the SEO tool -->
|
||||
|
||||
{{ if eq .Params.clean "true" }}{{ else }}
|
||||
<!-- jQuery import -->
|
||||
{{ if eq .Params.Victor_Hugo_clean "true" }}{{ else }}
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
window.addEventListener('DOMContentLoaded', function(){
|
||||
// VICTOR HUGO
|
||||
// By Javier Cabrera
|
||||
// https://github.com/doncabreraphone/victorhugo
|
||||
|
|
@ -647,18 +645,21 @@
|
|||
|
||||
// META DESCRIPTION
|
||||
var victorhugo__meta_description = $("meta[name='description'").attr("content");
|
||||
if (victorhugo__meta_description){
|
||||
|
||||
if(victorhugo__meta_description === "") {
|
||||
$("#meta__description").text( "No meta description has been specified. Search engines will display copy from the page instead." ).addClass('fix');
|
||||
} else if(victorhugo__meta_description.length < 5) {
|
||||
$("#meta__description").text( "The meta description is under 120 characters long. However, up to 320 characters are available." ).addClass('improve');
|
||||
} else if(victorhugo__meta_description.length >= 125 && victorhugo__meta_description.length <= 320 ) {
|
||||
$("#meta__description").text( "The meta description has a nice length." ).addClass("good").appendTo($("#meta__description").parent());
|
||||
} else if(victorhugo__meta_description.length >= 320) {
|
||||
$("#meta__description").text( "The meta description is over 320 characters. Reducing the length will ensure the entire description will be visible.").addClass('fix');
|
||||
if(victorhugo__meta_description === "") {
|
||||
$("#meta__description").text( "No meta description has been specified. Search engines will display copy from the page instead." ).addClass('fix');
|
||||
} else if(victorhugo__meta_description.length < 5) {
|
||||
$("#meta__description").text( "The meta description is under 120 characters long. However, up to 320 characters are available." ).addClass('improve');
|
||||
} else if(victorhugo__meta_description.length >= 125 && victorhugo__meta_description.length <= 320 ) {
|
||||
$("#meta__description").text( "The meta description has a nice length." ).addClass("good").appendTo($("#meta__description").parent());
|
||||
} else if(victorhugo__meta_description.length >= 320) {
|
||||
$("#meta__description").text( "The meta description is over 320 characters. Reducing the length will ensure the entire description will be visible.").addClass('fix');
|
||||
}
|
||||
} else {
|
||||
$("#meta__description").html( "The meta description is not set. Please add a <a href='https://github.com/doncabreraphone/victorhugo/blob/master/misc/hugo-seo-snippets.md'>meta description</a> to your post.").addClass('fix');
|
||||
}
|
||||
|
||||
|
||||
// CONTENT
|
||||
var victorhugo__content = "{{ .Content | lower }}";
|
||||
var victorhugo__rawcontent = victorhugo__content;
|
||||
|
|
@ -1308,7 +1309,6 @@
|
|||
.victorhugo__close {
|
||||
animation: Close .4s forwards;
|
||||
}
|
||||
|
||||
|
||||
@keyframes Open {
|
||||
0% {
|
||||
|
|
@ -1343,7 +1343,6 @@
|
|||
|
||||
</style>
|
||||
|
||||
|
||||
<a href="#" id="victorhugo__open">
|
||||
<img src="https://raw.githubusercontent.com/doncabreraphone/victorhugo/master/misc/victorhugo__logo_small.png">
|
||||
</a>
|
||||
|
|
@ -1547,7 +1546,7 @@
|
|||
|
||||
<ul style="list-style-type: none; margin: 0; padding: 0 15px;">
|
||||
|
||||
<li style="text-indent: -1rem; margin: 15px 0;"><span style="font-size: 2rem; vertical-align: middle; line-height: 1.2rem; color: #dc3232">•</span> You forgot to add a ".Params.Focus_Keyword" in the front matter of this page.</li>
|
||||
<li style="text-indent: -1rem; margin: 15px 0;"><span style="font-size: 2rem; vertical-align: middle; line-height: 1.2rem; color: #dc3232">•</span> You forgot to add, either "Focus_Keyword", or "Victor_Hugo" params in the front matter of this page. <a href="https://github.com/doncabreraphone/victorhugo/#configure-victor-hugo" target="_blank">Read More.</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
@ -1568,6 +1567,5 @@
|
|||
|
||||
{{ else }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue