I’m trying to create a new, so far private theme and it seems to work more or less.
But it doesn’t show up in the Admin GUI.
I copied all the files (.gitignore, blueprints.yaml (no homepage, demo, bugs links yet), CHANGELOG.md, languages.yaml, LICENSE, photographer.php (renamed), photographer.yaml (renamed), README.md, screenshot.jpg, thumbnail.jpg) from the root of the Photographer theme to my theme and adapted the contents and the images. I entered my theme in /user/config/system.yaml under theme. Still, no sign of it in the Admin GUI. But I noticed sometimes a mixup with Photographer. So I temporarely, as I thought, switched over to Photographer, but then couldn’t go back via the Admin GUI.
So I deleted the Photographer and Quark themes from the installation, corrected the /user/config/system.yaml and my site works again with my theme. In the Admin GUI under Themes I now only get “The connection to the GPM cannot be established”.
What is my theme missing that it won’t show up there?
In case you ask: No, it is not meant to be published and it is anyway by far not ripe for that.
I think I should be able to work with strictly local themes in the GUI, but how?
If all you want is making some changes to theme Photographer, you could make an inherited theme based on Photographer. The easiest way to create an inherited theme is to let Grav do the work using the ‘devtools’ plugin. See Inheriting using the CLI.
If you do want to make a copy, you can use the $ bin/plugins devtools newtheme command, and choose ‘copy’ when asked.
And if you want to create a new theme with basic functionality, you could create one using the same $ bin/plugins devtools newtheme command, but choose ‘pure blank’.
@pamtbaau Thank you for your tips.
I want to create a new theme “from scratch” and only took Photographer as an example from which I could start.
Is there a way to do what you suggested on Windows via the Admin GUI, FTP and an editor? So far I’ve never worked with the CLI.
My theme is all there already and the site works (needing some fine-tuning though), only missing some internal mechanics, I suppose, to be considered a theme by Grav.
“private” means locally installed and not meant for publishing.
Even if I disappoint you, but so far I happily work on my Windows machine with an editor and via FTP on my shared hosting with Apache. No local XAMPP. For me it would be nice if I could keep it that way and not install whatever Linux.
So for me the question now is how I could do my way what the devtool does?
If there really is no way I would try to do it via the shell access I have on the shared hosting.
Private vs Public
Thanks for the explanation.
Question: Does that mean that a theme in Grav only works if it is published on Github, ‘private’ or ‘public’?
No disappointment here, you should work the way you see fit.
Using WSL is really comfortable though…
No separate Linux installation with dual boots, virtual machines or whatever. It is (near) seamlessly integrated into Windows 10 itself and is installable via the Windows Store. You can explore WSL files using Windows Explorer, edit files with any editor (vscode) and access windows files from WSL.
You do have to install Apache though, which is explained by the step-by-step docs.
Unfortunately, I know no other way then to use a command prompt to run the devtools plugin. If you have access to the shell on you host, you should be fine.
Are you familiar with the preinstalled OpenSSH client which comes with Windows 10? If not, here is a howto.
Private vs Public:
No, you don’t need to publish you theme (or plugin) to Github.
Only if you want to make your theme available to the community, it must be available in a public repo on Github.
I installed the devtools via the Admin GUI.
On my Windows 10 (v1909) ssh was already there and I installed the Windows Terminal. Then logged in via ssh at my shared hosting with the Grav installation.
After struggling with the permissions for the bin folder and its files - voilà - bin/plugin devtools newtheme worked.