Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

Trouble getting themes to load

theme

Solved by Karmalakas View solution

Started by Russell 5 years ago · 4 replies · 2296 views
5 years ago

I'm new to Grav, and I'm having trouble getting themes to load properly. I have it installed on my laptop and my VPS, Arch and Debian respectively, and when I change from Quark, it appears that the HTML doesn't even get rendered. This is what I see:

HTML
<link href="/user/themes/grayscale/css/bootstrap.min.css" type="text/css" rel="stylesheet"> <link href="/user/themes/grayscale/css/grayscale.css" type="text/css" rel="stylesheet"> <link href="/user/themes/grayscale/css/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet"> <link href="/user/plugins/markdown-notices/assets/notices.css" type="text/css" rel="stylesheet">
Grav

<h1>My Home Page or Whatever...</h1> <h2>tips, tricks, interesting, ramblings, etc.</h2> <p>This page is somewhat a project to learn Grav as a CMS and blogging solution. I like it because I can write new articles, pages, whatever in vim using markdown and that's it. No stupid database to keep up with, the admin panel is largely optional... It just seems like a pretty slick solution. I don't really have much to talk about, so this is just a collection of short how-to articles and that sort of thing. It's not really for anyone but me.</p> <h3>Find out all about Grav</h3> <ul> <li>Learn about <strong>Grav</strong> by checking out our dedicated <a href="http://learn.getgrav.org">Learn Grav</a> site.</li> <li>Download <strong>plugins</strong>, <strong>themes</strong>, as well as other Grav <strong>skeleton</strong> packages from the <a href="http://getgrav.org/downloads">Grav Downloads</a> page.</li> <li>Check out our <a href="http://getgrav.org/blog">Grav Development Blog</a> to find out the latest goings on in the Grav-verse.</li> </ul>

Copyright © Grav 2014 · by VC
<script src="/system/assets/jquery/jquery-2.x.min.js"></script> <script src="/user/themes/grayscale/js/bootstrap.min.js"></script> <script src="/user/themes/grayscale/js/jquery.easing.min.js"></script> <script src="/user/themes/grayscale/js/grayscale.js"></script> 

I've tried using the Admin panel on the Arch install and directly editing the user/config/system.yaml on the Debian install with the same results. I can switch back to Quark, and it's fine. I was even able to switch to DarkQuark and it worked, but Grayscale doesn't work on either system. I also tried Chalk on my laptop/Arch install and had the same result.

I don't have any idea what would cause this. I'm not finding anything in my system logs.

UPDATE: It actually is rendering the html. If I view the source, it's showing &gt; and &lt; everywhere. It also has the usual html tags in the source. Totally bizzare!!

last edited 04/29/21 by Russell
5 years ago

Did a quick run on all themes. It seems that 77/112 themes do not use filter |raw on *content, *css() or *js()

I created an issue to start a discussion with the team to notify developers and users for this.

👍 2
last edited 04/29/21 by pamtbaau
5 years ago Karmalakas You most likely have old theme designed for Grav 1.6 (or older), which presumes content is…

I've been going through the theme file by file searching for }} and adding |raw where applicable. I finally got it to load though there are still some errors. Changing the line {{ assets.css() }} to {{ assets.css()|raw }} is what finally got the stylesheets to load.

Thanks for the help. I wonder if I should clone the theme from github and submit my fixes? I don't know much about grav yet, but I seem to be making progress on getting this theme to work.

5 years ago

@rustbuckett:
I wonder if I should clone the theme from github and submit my fixes?

If theme is still supported, then why not 🙂

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 319 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago