PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, July 18, 2022

[FIXED] Why does liquid {%SEO%} tag not get integrated into head? instead it shows in body

 July 18, 2022     document-body, head, jekyll, liquid     No comments   

Issue

For some unknown reason any LIQUID syntax used inside <head> ends up in the <body>

What I have done?

1) I cloned a template and build my own layout with JEKYLL static site generator.
2) I installed all gems (check gemlist: 'jekyll-seo-tag' 'liquid 4.0')
3) I configured config.yml
4) I added {%SEO%} to <head>

Minimal

<head>

  <meta charset="utf-8">
  <meta name="author" content="Gino Ludikhuyze">
  <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <!-- Title -->

  <title>title</title>

  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="style.css">
  <link rel="stylesheet" href="css/responsive.css">
  <script src="js/vendor/modernizr-2.8.3.min.js"></script>

  {% seo %}

</head>

What is happening?

If I render the website, online or local host, It shows a white GAP at the top. If I inspect it. It shows my liquid TAG in the body.

What I expect to happen?

That liquid should work in cohesion with jekyll.

Link to repo: https://github.com/bomengeduld/reno
Link to website: https://bomengeduld.github.io/reno/


Solution

Your index.html should start with (empty frontmatter):

---
---

Otherwise the Liquid will not get rendered. That is all!



Answered By - Mr. Hugo
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing