I'm converting from a Wordpress site to Grav and despite a lot of head banging to try to get the Quark theme to do what the WP theme was doing (mostly got it, thanks) I still have one sticky thing:
My WP theme had the ability to do an MP4 as the hero image of a page. Grav seems to lack that ability. Is there a way to it without hard coding something in the template/blog.html.twig file?
That's what I was afraid of. Grav looks like it would be this great simple thing on the surface, but I've spent weeks now recreating was was literally a few minutes of work in Wordpress. Not sure if it's really all that worth it.
It depends on what you actually want and - more importantly - need. What was your reason to move to Grav? Did you do a research and consider all the differences between the two?
mytheme -> blueprints -> modular -> videohero.yaml (sorry, i forgot the blueprint when i first published my solution)
YAML
title:Hero'@extends':defaultform:fields:tabs:fields:buttons:type:tabtitle:Herofields:header.hero_classes:type:textlabel:Hero Classesmarkdown:truedescription:'There are several Hero class options that can be listed here (space separated):<br />`text-light`, `text-dark`, `title-h1h2`, `parallax`, `overlay-dark-gradient`, `overlay-light-gradient`, `overlay-dark`, `overlay-light`, `hero-fullscreen`, `hero-large`, `hero-medium`, `hero-small`, `hero-tiny`<br />Please consult the [Quark documentation](https://github.com/getgrav/grav-theme-quark#hero-options) for more details.'header.hero_image:type:filepickerlabel:Hero Imagepreview_images:truedescription:'If not specified, this defaults to the first image found in the page''s folder'header.video_mp4:type:textlabel:Background Video (mp4 Format)help:URL to a mp4 video which is used as background video. If background video is played, we don't see background image.
I currently have the default “Quark” theme activated. I followed all the steps you mentioned in your reply, but unfortunately nothing is showing up in the Hero section. Also, when I visited the “Themes” page, I couldn’t find any theme named “mytheme”. Could you please help me figure out what’s missing.
As I mention in the instructions, I assume that you have installed a child theme (mytheme). You must create the directories mentioned there and create/copy the necessary files into them.
I run Grav on a shared CPanel hosting, and I have installed Devtools via “Plugins” page, but when I’m trying to add Base Theme with the command:
BASH
bin/plugindevtoolsnew-theme
I got the following error:
[username@server bin]$ bash plugin devtools new-theme plugin: line 2: ?php: No such file or directory plugin: line 4: /bin: Is a directory plugin: line 5: syntax error near unexpected token (' plugin: line 5: * @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved.’
please notice that I have the file “plugin” inside the “bin” folder!.
@ghorabws, Please try as mentioned in the docs: $ bin/plugin devtools new-theme.
$ bash plugin devtools new-theme will throw error as shown $ ./plugin devtools new-theme will throw Grav error "FATAL: Must be run from ROOT directory of Grav!"
Now I’m trying the following, in the “Grav” root directory:
bash bin/plugin devtools new-theme
gives the error:
bin/plugin: line 2: ?php: No such file or directory bin/plugin: line 4: /bin: Is a directory bin/plugin: line 5: syntax error near unexpected token (' bin/plugin: line 5: * @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved.’