victorhugo.html | update current

This commit is contained in:
Don Harper 2020-08-24 23:02:33 -05:00
parent a1bee77348
commit 6d9a4ab439

View file

@ -1,19 +1,17 @@
{{ if .Site.IsServer }} {{ if .Site.IsServer }}
{{ if eq .Params.Victor_Hugo "true" }} {{ if .Params.Victor_Hugo }}
{{ if .Params.focus_keyword }} {{ if .Params.focus_keyword }}
<!-- Victor Hugo the SEO tool --> <!-- Victor Hugo the SEO tool -->
{{ if eq .Params.clean "true" }}{{ else }}
<!-- jQuery import --> <!-- 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> <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
{{ end }} {{ end }}
<script> <script>
window.addEventListener('DOMContentLoaded', function(){
$(document).ready(function(){
// VICTOR HUGO // VICTOR HUGO
// By Javier Cabrera // By Javier Cabrera
// https://github.com/doncabreraphone/victorhugo // https://github.com/doncabreraphone/victorhugo
@ -647,6 +645,7 @@
// META DESCRIPTION // META DESCRIPTION
var victorhugo__meta_description = $("meta[name='description'").attr("content"); var victorhugo__meta_description = $("meta[name='description'").attr("content");
if (victorhugo__meta_description){
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'); $("#meta__description").text( "No meta description has been specified. Search engines will display copy from the page instead." ).addClass('fix');
@ -657,7 +656,9 @@
} else if(victorhugo__meta_description.length >= 320) { } 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'); $("#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 // CONTENT
var victorhugo__content = "{{ .Content | lower }}"; var victorhugo__content = "{{ .Content | lower }}";
@ -1309,7 +1310,6 @@
animation: Close .4s forwards; animation: Close .4s forwards;
} }
@keyframes Open { @keyframes Open {
0% { 0% {
transform: translateX(-900px); transform: translateX(-900px);
@ -1343,7 +1343,6 @@
</style> </style>
<a href="#" id="victorhugo__open"> <a href="#" id="victorhugo__open">
<img src="https://raw.githubusercontent.com/doncabreraphone/victorhugo/master/misc/victorhugo__logo_small.png"> <img src="https://raw.githubusercontent.com/doncabreraphone/victorhugo/master/misc/victorhugo__logo_small.png">
</a> </a>
@ -1547,7 +1546,7 @@
<ul style="list-style-type: none; margin: 0; padding: 0 15px;"> <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> </ul>
@ -1568,6 +1567,5 @@
{{ else }} {{ else }}
{{ end }} {{ end }}
{{ end }} {{ end }}